From 94a4be625405b568ea4884a58cc7e121e065825b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 06:10:53 +0000 Subject: [PATCH] Bump modernc.org/sqlite from 1.19.3 to 1.20.4 --- updated-dependencies: - dependency-name: modernc.org/sqlite dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 7 +- go.sum | 14 +- .../github.com/dustin/go-humanize/.travis.yml | 21 + vendor/github.com/dustin/go-humanize/LICENSE | 21 + .../dustin/go-humanize/README.markdown | 124 + vendor/github.com/dustin/go-humanize/big.go | 31 + .../github.com/dustin/go-humanize/bigbytes.go | 173 + vendor/github.com/dustin/go-humanize/bytes.go | 143 + vendor/github.com/dustin/go-humanize/comma.go | 116 + .../github.com/dustin/go-humanize/commaf.go | 40 + vendor/github.com/dustin/go-humanize/ftoa.go | 46 + .../github.com/dustin/go-humanize/humanize.go | 8 + .../github.com/dustin/go-humanize/number.go | 192 + .../github.com/dustin/go-humanize/ordinals.go | 25 + vendor/github.com/dustin/go-humanize/si.go | 123 + vendor/github.com/dustin/go-humanize/times.go | 117 + vendor/modernc.org/libc/Makefile | 6 + vendor/modernc.org/libc/capi_openbsd_386.go | 12 +- vendor/modernc.org/libc/capi_openbsd_amd64.go | 6 +- vendor/modernc.org/libc/capi_openbsd_arm64.go | 6 +- vendor/modernc.org/libc/capi_windows_386.go | 16 + .../libc/errno/capi_darwin_amd64.go | 2 +- .../libc/errno/capi_openbsd_386.go | 2 +- .../libc/errno/capi_openbsd_arm64.go | 2 +- .../libc/errno/capi_windows_386.go | 2 +- .../libc/errno/errno_darwin_amd64.go | 240 +- .../libc/errno/errno_openbsd_386.go | 229 +- .../libc/errno/errno_openbsd_amd64.go | 2 +- .../libc/errno/errno_openbsd_arm64.go | 6 +- .../libc/errno/errno_windows_386.go | 379 +- vendor/modernc.org/libc/etc.go | 2 + .../libc/fcntl/capi_darwin_amd64.go | 2 +- .../libc/fcntl/capi_openbsd_386.go | 2 +- .../libc/fcntl/capi_openbsd_arm64.go | 2 +- .../libc/fcntl/capi_windows_386.go | 2 +- .../libc/fcntl/fcntl_darwin_amd64.go | 344 +- .../libc/fcntl/fcntl_openbsd_386.go | 956 +- .../libc/fcntl/fcntl_openbsd_amd64.go | 58 +- .../libc/fcntl/fcntl_openbsd_arm64.go | 170 +- .../libc/fcntl/fcntl_windows_386.go | 339 +- .../modernc.org/libc/fts/capi_darwin_amd64.go | 2 +- .../modernc.org/libc/fts/capi_openbsd_386.go | 2 +- .../libc/fts/capi_openbsd_arm64.go | 2 +- .../modernc.org/libc/fts/fts_darwin_amd64.go | 360 +- .../modernc.org/libc/fts/fts_netbsd_amd64.go | 1 + vendor/modernc.org/libc/fts/fts_netbsd_arm.go | 1 + .../modernc.org/libc/fts/fts_openbsd_386.go | 2401 +-- .../modernc.org/libc/fts/fts_openbsd_amd64.go | 66 +- .../modernc.org/libc/fts/fts_openbsd_arm64.go | 178 +- .../modernc.org/libc/grp/capi_darwin_amd64.go | 2 +- .../modernc.org/libc/grp/capi_openbsd_386.go | 2 +- .../libc/grp/capi_openbsd_arm64.go | 2 +- .../modernc.org/libc/grp/grp_darwin_amd64.go | 44 +- .../modernc.org/libc/grp/grp_openbsd_386.go | 753 +- .../modernc.org/libc/grp/grp_openbsd_amd64.go | 58 +- .../modernc.org/libc/grp/grp_openbsd_arm64.go | 170 +- .../libc/langinfo/capi_darwin_amd64.go | 2 +- .../libc/langinfo/capi_openbsd_386.go | 2 +- .../libc/langinfo/capi_openbsd_arm64.go | 2 +- .../libc/langinfo/langinfo_darwin_amd64.go | 150 +- .../libc/langinfo/langinfo_openbsd_386.go | 824 +- .../libc/langinfo/langinfo_openbsd_amd64.go | 2 +- .../libc/langinfo/langinfo_openbsd_arm64.go | 16 +- vendor/modernc.org/libc/libc_darwin.go | 3 + vendor/modernc.org/libc/libc_freebsd.go | 3 + vendor/modernc.org/libc/libc_linux.go | 3 + vendor/modernc.org/libc/libc_netbsd.go | 3 + vendor/modernc.org/libc/libc_openbsd.go | 9 +- vendor/modernc.org/libc/libc_openbsd_386.go | 2 +- vendor/modernc.org/libc/libc_windows_386.go | 35 + .../libc/limits/capi_darwin_amd64.go | 2 +- .../libc/limits/capi_openbsd_386.go | 2 +- .../libc/limits/capi_openbsd_arm64.go | 2 +- .../libc/limits/capi_windows_386.go | 2 +- .../libc/limits/limits_openbsd_386.go | 580 +- .../libc/limits/limits_openbsd_amd64.go | 5 +- .../libc/limits/limits_openbsd_arm64.go | 36 +- .../libc/limits/limits_windows_386.go | 295 +- vendor/modernc.org/libc/musl_darwin_amd64.go | 1464 +- vendor/modernc.org/libc/musl_darwin_arm64.go | 1464 +- vendor/modernc.org/libc/musl_openbsd_386.go | 4494 +---- vendor/modernc.org/libc/musl_openbsd_amd64.go | 4586 ++--- vendor/modernc.org/libc/musl_openbsd_arm64.go | 4678 ++--- vendor/modernc.org/libc/musl_windows_386.go | 36 +- .../libc/netdb/capi_darwin_amd64.go | 2 +- .../libc/netdb/capi_openbsd_386.go | 2 +- .../libc/netdb/capi_openbsd_arm64.go | 2 +- .../libc/netdb/netdb_darwin_amd64.go | 1458 +- .../libc/netdb/netdb_openbsd_386.go | 1527 +- .../libc/netdb/netdb_openbsd_amd64.go | 58 +- .../libc/netdb/netdb_openbsd_arm64.go | 170 +- .../libc/netinet/in/capi_darwin_amd64.go | 2 +- .../libc/netinet/in/capi_openbsd_386.go | 2 +- .../libc/netinet/in/capi_openbsd_arm64.go | 2 +- .../libc/netinet/in/in_darwin_amd64.go | 1358 +- .../libc/netinet/in/in_openbsd_386.go | 1767 +- .../libc/netinet/in/in_openbsd_amd64.go | 58 +- .../libc/netinet/in/in_openbsd_arm64.go | 170 +- .../libc/poll/capi_darwin_amd64.go | 2 +- .../modernc.org/libc/poll/capi_openbsd_386.go | 2 +- .../libc/poll/capi_openbsd_arm64.go | 2 +- .../libc/poll/poll_darwin_amd64.go | 52 +- .../modernc.org/libc/poll/poll_openbsd_386.go | 966 +- .../libc/poll/poll_openbsd_amd64.go | 15 +- .../libc/poll/poll_openbsd_arm64.go | 123 +- vendor/modernc.org/libc/probes.go | 169 + vendor/modernc.org/libc/pthread.go | 8 + .../libc/pthread/capi_darwin_amd64.go | 2 +- .../libc/pthread/capi_openbsd_386.go | 2 +- .../libc/pthread/capi_openbsd_arm64.go | 2 +- .../libc/pthread/capi_windows_386.go | 2 +- .../libc/pthread/pthread_darwin_amd64.go | 164 +- .../libc/pthread/pthread_netbsd_amd64.go | 1 + .../libc/pthread/pthread_netbsd_arm.go | 1 + .../libc/pthread/pthread_openbsd_386.go | 1895 ++- .../libc/pthread/pthread_openbsd_amd64.go | 71 +- .../libc/pthread/pthread_openbsd_arm64.go | 256 +- .../libc/pthread/pthread_windows_386.go | 742 +- .../modernc.org/libc/pwd/capi_darwin_amd64.go | 2 +- .../modernc.org/libc/pwd/capi_openbsd_386.go | 2 +- .../libc/pwd/capi_openbsd_arm64.go | 2 +- .../modernc.org/libc/pwd/pwd_darwin_amd64.go | 88 +- .../modernc.org/libc/pwd/pwd_openbsd_386.go | 836 +- .../modernc.org/libc/pwd/pwd_openbsd_amd64.go | 58 +- .../modernc.org/libc/pwd/pwd_openbsd_arm64.go | 170 +- .../libc/signal/capi_darwin_amd64.go | 2 +- .../libc/signal/capi_openbsd_386.go | 2 +- .../libc/signal/capi_openbsd_arm64.go | 2 +- .../libc/signal/capi_windows_386.go | 2 +- .../libc/signal/signal_darwin_amd64.go | 304 +- .../libc/signal/signal_openbsd_386.go | 1939 +-- .../libc/signal/signal_openbsd_amd64.go | 62 +- .../libc/signal/signal_openbsd_arm64.go | 225 +- .../libc/signal/signal_windows_386.go | 237 +- .../libc/stdio/capi_darwin_amd64.go | 2 +- .../libc/stdio/capi_openbsd_386.go | 2 +- .../libc/stdio/capi_openbsd_arm64.go | 2 +- .../libc/stdio/capi_windows_386.go | 2 +- .../libc/stdio/stdio_darwin_amd64.go | 110 +- .../libc/stdio/stdio_openbsd_386.go | 857 +- .../libc/stdio/stdio_openbsd_amd64.go | 58 +- .../libc/stdio/stdio_openbsd_arm64.go | 170 +- .../libc/stdio/stdio_windows_386.go | 356 +- .../libc/stdlib/capi_darwin_amd64.go | 2 +- .../libc/stdlib/capi_openbsd_386.go | 2 +- .../libc/stdlib/capi_openbsd_arm64.go | 2 +- .../libc/stdlib/capi_windows_386.go | 2 +- .../libc/stdlib/stdlib_darwin_amd64.go | 600 +- .../libc/stdlib/stdlib_openbsd_386.go | 843 +- .../libc/stdlib/stdlib_openbsd_amd64.go | 58 +- .../libc/stdlib/stdlib_openbsd_arm64.go | 173 +- .../libc/stdlib/stdlib_windows_386.go | 430 +- .../libc/sys/socket/capi_darwin_amd64.go | 2 +- .../libc/sys/socket/capi_openbsd_386.go | 2 +- .../libc/sys/socket/capi_openbsd_arm64.go | 2 +- .../libc/sys/socket/socket_darwin_amd64.go | 636 +- .../libc/sys/socket/socket_openbsd_386.go | 1485 +- .../libc/sys/socket/socket_openbsd_amd64.go | 99 +- .../libc/sys/socket/socket_openbsd_arm64.go | 211 +- .../libc/sys/stat/capi_darwin_amd64.go | 2 +- .../libc/sys/stat/capi_openbsd_386.go | 2 +- .../libc/sys/stat/capi_openbsd_arm64.go | 2 +- .../libc/sys/stat/capi_windows_386.go | 2 +- .../libc/sys/stat/stat_darwin_amd64.go | 194 +- .../libc/sys/stat/stat_netbsd_amd64.go | 1 + .../libc/sys/stat/stat_netbsd_arm.go | 1 + .../libc/sys/stat/stat_openbsd_386.go | 2085 +-- .../libc/sys/stat/stat_openbsd_amd64.go | 64 +- .../libc/sys/stat/stat_openbsd_arm64.go | 176 +- .../libc/sys/stat/stat_windows_386.go | 369 +- .../libc/sys/types/capi_darwin_amd64.go | 2 +- .../libc/sys/types/capi_openbsd_386.go | 2 +- .../libc/sys/types/capi_openbsd_arm64.go | 2 +- .../libc/sys/types/capi_windows_386.go | 2 +- .../libc/sys/types/types_darwin_amd64.go | 162 +- .../libc/sys/types/types_openbsd_386.go | 1478 +- .../libc/sys/types/types_openbsd_amd64.go | 58 +- .../libc/sys/types/types_openbsd_arm64.go | 170 +- .../libc/sys/types/types_windows_386.go | 233 +- .../libc/termios/capi_darwin_amd64.go | 2 +- .../libc/termios/capi_openbsd_386.go | 2 +- .../libc/termios/capi_openbsd_arm64.go | 2 +- .../libc/termios/termios_darwin_amd64.go | 418 +- .../libc/termios/termios_openbsd_386.go | 1089 +- .../libc/termios/termios_openbsd_amd64.go | 15 +- .../libc/termios/termios_openbsd_arm64.go | 123 +- .../libc/time/capi_darwin_amd64.go | 2 +- .../modernc.org/libc/time/capi_openbsd_386.go | 2 +- .../libc/time/capi_openbsd_arm64.go | 2 +- .../modernc.org/libc/time/capi_windows_386.go | 2 +- .../libc/time/time_darwin_amd64.go | 66 +- .../libc/time/time_netbsd_amd64.go | 1 + .../modernc.org/libc/time/time_netbsd_arm.go | 1 + .../modernc.org/libc/time/time_openbsd_386.go | 905 +- .../libc/time/time_openbsd_amd64.go | 15 +- .../libc/time/time_openbsd_arm64.go | 123 +- .../modernc.org/libc/time/time_windows_386.go | 274 +- .../libc/unistd/capi_darwin_amd64.go | 2 +- .../libc/unistd/capi_openbsd_386.go | 2 +- .../libc/unistd/capi_openbsd_arm64.go | 2 +- .../libc/unistd/capi_windows_386.go | 2 +- .../libc/unistd/unistd_darwin_amd64.go | 730 +- .../libc/unistd/unistd_openbsd_386.go | 2123 +-- .../libc/unistd/unistd_openbsd_amd64.go | 58 +- .../libc/unistd/unistd_openbsd_arm64.go | 170 +- .../libc/unistd/unistd_windows_386.go | 392 +- .../libc/utime/capi_darwin_amd64.go | 2 +- .../libc/utime/capi_openbsd_386.go | 2 +- .../libc/utime/capi_openbsd_arm64.go | 2 +- .../libc/utime/capi_windows_386.go | 2 +- .../libc/utime/utime_darwin_amd64.go | 58 +- .../libc/utime/utime_openbsd_386.go | 603 +- .../libc/utime/utime_openbsd_amd64.go | 15 +- .../libc/utime/utime_openbsd_arm64.go | 123 +- .../libc/utime/utime_windows_386.go | 215 +- .../modernc.org/libc/uuid/capi_openbsd_386.go | 2 +- .../libc/uuid/capi_openbsd_arm64.go | 2 +- .../libc/uuid/uuid/capi_darwin_amd64.go | 2 +- .../libc/uuid/uuid/uuid_darwin_amd64.go | 34 +- .../modernc.org/libc/uuid/uuid_netbsd_arm.go | 5 +- .../modernc.org/libc/uuid/uuid_openbsd_386.go | 1572 +- .../libc/uuid/uuid_openbsd_amd64.go | 58 +- .../libc/uuid/uuid_openbsd_arm64.go | 170 +- .../libc/wctype/capi_darwin_amd64.go | 2 +- .../libc/wctype/capi_openbsd_386.go | 28 +- .../libc/wctype/capi_openbsd_arm64.go | 2 +- .../libc/wctype/capi_windows_386.go | 2 +- .../libc/wctype/wctype_darwin_amd64.go | 96 +- .../libc/wctype/wctype_openbsd_386.go | 800 +- .../libc/wctype/wctype_openbsd_amd64.go | 2 +- .../libc/wctype/wctype_openbsd_arm64.go | 110 +- .../libc/wctype/wctype_windows_386.go | 241 +- vendor/modernc.org/sqlite/AUTHORS | 2 + vendor/modernc.org/sqlite/CONTRIBUTORS | 5 +- vendor/modernc.org/sqlite/Makefile | 3 +- vendor/modernc.org/sqlite/doc.go | 29 +- vendor/modernc.org/sqlite/generator.go | 106 +- .../sqlite/lib/capi_darwin_amd64.go | 12 +- .../sqlite/lib/capi_darwin_arm64.go | 12 +- .../sqlite/lib/capi_freebsd_386.go | 12 +- .../sqlite/lib/capi_freebsd_amd64.go | 12 +- .../sqlite/lib/capi_freebsd_arm.go | 12 +- .../sqlite/lib/capi_freebsd_arm64.go | 12 +- .../modernc.org/sqlite/lib/capi_linux_386.go | 12 +- .../sqlite/lib/capi_linux_amd64.go | 12 +- .../modernc.org/sqlite/lib/capi_linux_arm.go | 12 +- .../sqlite/lib/capi_linux_arm64.go | 12 +- .../sqlite/lib/capi_linux_ppc64le.go | 12 +- .../sqlite/lib/capi_linux_riscv64.go | 12 +- .../sqlite/lib/capi_linux_s390x.go | 12 +- .../sqlite/lib/capi_netbsd_amd64.go | 10 +- .../sqlite/lib/capi_openbsd_amd64.go | 12 +- .../sqlite/lib/capi_openbsd_arm64.go | 12 +- .../sqlite/lib/capi_windows_amd64.go | 12 +- .../sqlite/lib/capi_windows_arm64.go | 12 +- vendor/modernc.org/sqlite/lib/mutex.go | 141 +- .../sqlite/lib/sqlite_darwin_amd64.go | 13927 +++++++-------- .../sqlite/lib/sqlite_darwin_arm64.go | 14051 ++++++++-------- .../sqlite/lib/sqlite_freebsd_386.go | 13834 ++++++++------- .../sqlite/lib/sqlite_freebsd_amd64.go | 13835 ++++++++------- .../sqlite/lib/sqlite_freebsd_arm.go | 13825 ++++++++------- .../sqlite/lib/sqlite_freebsd_arm64.go | 13835 ++++++++------- .../sqlite/lib/sqlite_linux_386.go | 13836 ++++++++------- .../sqlite/lib/sqlite_linux_amd64.go | 13837 ++++++++------- .../sqlite/lib/sqlite_linux_arm.go | 13827 ++++++++------- .../sqlite/lib/sqlite_linux_arm64.go | 13837 ++++++++------- .../sqlite/lib/sqlite_linux_ppc64le.go | 13837 ++++++++------- .../sqlite/lib/sqlite_linux_riscv64.go | 13837 ++++++++------- .../sqlite/lib/sqlite_linux_s390x.go | 13837 ++++++++------- .../sqlite/lib/sqlite_netbsd_amd64.go | 13190 ++++++++------- .../sqlite/lib/sqlite_openbsd_amd64.go | 13811 ++++++++------- .../sqlite/lib/sqlite_openbsd_arm64.go | 13811 ++++++++------- .../sqlite/lib/sqlite_windows_amd64.go | 13944 +++++++-------- .../sqlite/lib/sqlite_windows_arm64.go | 13944 +++++++-------- vendor/modernc.org/sqlite/sqlite.go | 54 +- vendor/modules.txt | 9 +- 276 files changed, 157980 insertions(+), 154950 deletions(-) create mode 100644 vendor/github.com/dustin/go-humanize/.travis.yml create mode 100644 vendor/github.com/dustin/go-humanize/LICENSE create mode 100644 vendor/github.com/dustin/go-humanize/README.markdown create mode 100644 vendor/github.com/dustin/go-humanize/big.go create mode 100644 vendor/github.com/dustin/go-humanize/bigbytes.go create mode 100644 vendor/github.com/dustin/go-humanize/bytes.go create mode 100644 vendor/github.com/dustin/go-humanize/comma.go create mode 100644 vendor/github.com/dustin/go-humanize/commaf.go create mode 100644 vendor/github.com/dustin/go-humanize/ftoa.go create mode 100644 vendor/github.com/dustin/go-humanize/humanize.go create mode 100644 vendor/github.com/dustin/go-humanize/number.go create mode 100644 vendor/github.com/dustin/go-humanize/ordinals.go create mode 100644 vendor/github.com/dustin/go-humanize/si.go create mode 100644 vendor/github.com/dustin/go-humanize/times.go create mode 100644 vendor/modernc.org/libc/probes.go diff --git a/go.mod b/go.mod index 7bc25e85b5..79f895fa15 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( gorm.io/driver/sqlite v1.4.4 gorm.io/gorm v1.24.5 gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5 - modernc.org/sqlite v1.19.3 + modernc.org/sqlite v1.20.4 ) require ( @@ -70,6 +70,7 @@ require ( github.com/demisto/goxforce v0.0.0-20160322194047-db8357535b1d // indirect github.com/desertbit/closer/v3 v3.1.2 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/gobwas/httphead v0.1.0 // indirect @@ -113,8 +114,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/uint128 v1.2.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect - modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8 // indirect - modernc.org/libc v1.21.2 // indirect + modernc.org/ccgo/v3 v3.16.13 // indirect + modernc.org/libc v1.22.2 // indirect modernc.org/mathutil v1.5.0 // indirect modernc.org/memory v1.4.0 // indirect modernc.org/opt v0.1.3 // indirect diff --git a/go.sum b/go.sum index ebd2841758..22bc63841e 100644 --- a/go.sum +++ b/go.sum @@ -85,6 +85,7 @@ github.com/desertbit/readline v1.5.1/go.mod h1:pHQgTsCFs9Cpfh5mlSUFi9Xa5kkL4d8L1 github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -143,6 +144,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -524,20 +526,20 @@ lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8 h1:0+dsXf0zeLx9ixj4nilg6jKe5Bg1ilzBwSFq4kJmIUc= -modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= +modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/libc v1.21.2 h1:V053DgNSpAY+IPrO3XlWqrFKUiQqHyPqG4dsx42Ulck= -modernc.org/libc v1.21.2/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= +modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0= +modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.4.0 h1:crykUfNSnMAXaOJnnxcSzbUGMqkLWjklJKkBK2nwZwk= modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.19.3 h1:dIoagx6yIQT3V/zOSeAyZ8OqQyEr17YTgETOXTZNJMA= -modernc.org/sqlite v1.19.3/go.mod h1:xiyJD7FY8mTZXnQwE/gEL1STtFrrnDx03V8KhVQmcr8= +modernc.org/sqlite v1.20.4 h1:J8+m2trkN+KKoE7jglyHYYYiaq5xmz2HoHJIiBlRzbE= +modernc.org/sqlite v1.20.4/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34= diff --git a/vendor/github.com/dustin/go-humanize/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml new file mode 100644 index 0000000000..ba95cdd15c --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/.travis.yml @@ -0,0 +1,21 @@ +sudo: false +language: go +go: + - 1.3.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - master +matrix: + allow_failures: + - go: master + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/github.com/dustin/go-humanize/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE new file mode 100644 index 0000000000..8d9a94a906 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2005-2008 Dustin Sallings + +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. + + diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown new file mode 100644 index 0000000000..91b4ae5646 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/README.markdown @@ -0,0 +1,124 @@ +# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize) + +Just a few functions for helping humanize times and sizes. + +`go get` it as `github.com/dustin/go-humanize`, import it as +`"github.com/dustin/go-humanize"`, use it as `humanize`. + +See [godoc](https://godoc.org/github.com/dustin/go-humanize) for +complete documentation. + +## Sizes + +This lets you take numbers like `82854982` and convert them to useful +strings like, `83 MB` or `79 MiB` (whichever you prefer). + +Example: + +```go +fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB. +``` + +## Times + +This lets you take a `time.Time` and spit it out in relative terms. +For example, `12 seconds ago` or `3 days from now`. + +Example: + +```go +fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago. +``` + +Thanks to Kyle Lemons for the time implementation from an IRC +conversation one day. It's pretty neat. + +## Ordinals + +From a [mailing list discussion][odisc] where a user wanted to be able +to label ordinals. + + 0 -> 0th + 1 -> 1st + 2 -> 2nd + 3 -> 3rd + 4 -> 4th + [...] + +Example: + +```go +fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend. +``` + +## Commas + +Want to shove commas into numbers? Be my guest. + + 0 -> 0 + 100 -> 100 + 1000 -> 1,000 + 1000000000 -> 1,000,000,000 + -100000 -> -100,000 + +Example: + +```go +fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491. +``` + +## Ftoa + +Nicer float64 formatter that removes trailing zeros. + +```go +fmt.Printf("%f", 2.24) // 2.240000 +fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24 +fmt.Printf("%f", 2.0) // 2.000000 +fmt.Printf("%s", humanize.Ftoa(2.0)) // 2 +``` + +## SI notation + +Format numbers with [SI notation][sinotation]. + +Example: + +```go +humanize.SI(0.00000000223, "M") // 2.23 nM +``` + +## English-specific functions + +The following functions are in the `humanize/english` subpackage. + +### Plurals + +Simple English pluralization + +```go +english.PluralWord(1, "object", "") // object +english.PluralWord(42, "object", "") // objects +english.PluralWord(2, "bus", "") // buses +english.PluralWord(99, "locus", "loci") // loci + +english.Plural(1, "object", "") // 1 object +english.Plural(42, "object", "") // 42 objects +english.Plural(2, "bus", "") // 2 buses +english.Plural(99, "locus", "loci") // 99 loci +``` + +### Word series + +Format comma-separated words lists with conjuctions: + +```go +english.WordSeries([]string{"foo"}, "and") // foo +english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar +english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz + +english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz +``` + +[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion +[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go new file mode 100644 index 0000000000..f49dc337dc --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/big.go @@ -0,0 +1,31 @@ +package humanize + +import ( + "math/big" +) + +// order of magnitude (to a max order) +func oomm(n, b *big.Int, maxmag int) (float64, int) { + mag := 0 + m := &big.Int{} + for n.Cmp(b) >= 0 { + n.DivMod(n, b, m) + mag++ + if mag == maxmag && maxmag >= 0 { + break + } + } + return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag +} + +// total order of magnitude +// (same as above, but with no upper limit) +func oom(n, b *big.Int) (float64, int) { + mag := 0 + m := &big.Int{} + for n.Cmp(b) >= 0 { + n.DivMod(n, b, m) + mag++ + } + return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag +} diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go new file mode 100644 index 0000000000..1a2bf61723 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bigbytes.go @@ -0,0 +1,173 @@ +package humanize + +import ( + "fmt" + "math/big" + "strings" + "unicode" +) + +var ( + bigIECExp = big.NewInt(1024) + + // BigByte is one byte in bit.Ints + BigByte = big.NewInt(1) + // BigKiByte is 1,024 bytes in bit.Ints + BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp) + // BigMiByte is 1,024 k bytes in bit.Ints + BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp) + // BigGiByte is 1,024 m bytes in bit.Ints + BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp) + // BigTiByte is 1,024 g bytes in bit.Ints + BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp) + // BigPiByte is 1,024 t bytes in bit.Ints + BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp) + // BigEiByte is 1,024 p bytes in bit.Ints + BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp) + // BigZiByte is 1,024 e bytes in bit.Ints + BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp) + // BigYiByte is 1,024 z bytes in bit.Ints + BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp) +) + +var ( + bigSIExp = big.NewInt(1000) + + // BigSIByte is one SI byte in big.Ints + BigSIByte = big.NewInt(1) + // BigKByte is 1,000 SI bytes in big.Ints + BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp) + // BigMByte is 1,000 SI k bytes in big.Ints + BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp) + // BigGByte is 1,000 SI m bytes in big.Ints + BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp) + // BigTByte is 1,000 SI g bytes in big.Ints + BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp) + // BigPByte is 1,000 SI t bytes in big.Ints + BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp) + // BigEByte is 1,000 SI p bytes in big.Ints + BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp) + // BigZByte is 1,000 SI e bytes in big.Ints + BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp) + // BigYByte is 1,000 SI z bytes in big.Ints + BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp) +) + +var bigBytesSizeTable = map[string]*big.Int{ + "b": BigByte, + "kib": BigKiByte, + "kb": BigKByte, + "mib": BigMiByte, + "mb": BigMByte, + "gib": BigGiByte, + "gb": BigGByte, + "tib": BigTiByte, + "tb": BigTByte, + "pib": BigPiByte, + "pb": BigPByte, + "eib": BigEiByte, + "eb": BigEByte, + "zib": BigZiByte, + "zb": BigZByte, + "yib": BigYiByte, + "yb": BigYByte, + // Without suffix + "": BigByte, + "ki": BigKiByte, + "k": BigKByte, + "mi": BigMiByte, + "m": BigMByte, + "gi": BigGiByte, + "g": BigGByte, + "ti": BigTiByte, + "t": BigTByte, + "pi": BigPiByte, + "p": BigPByte, + "ei": BigEiByte, + "e": BigEByte, + "z": BigZByte, + "zi": BigZiByte, + "y": BigYByte, + "yi": BigYiByte, +} + +var ten = big.NewInt(10) + +func humanateBigBytes(s, base *big.Int, sizes []string) string { + if s.Cmp(ten) < 0 { + return fmt.Sprintf("%d B", s) + } + c := (&big.Int{}).Set(s) + val, mag := oomm(c, base, len(sizes)-1) + suffix := sizes[mag] + f := "%.0f %s" + if val < 10 { + f = "%.1f %s" + } + + return fmt.Sprintf(f, val, suffix) + +} + +// BigBytes produces a human readable representation of an SI size. +// +// See also: ParseBigBytes. +// +// BigBytes(82854982) -> 83 MB +func BigBytes(s *big.Int) string { + sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} + return humanateBigBytes(s, bigSIExp, sizes) +} + +// BigIBytes produces a human readable representation of an IEC size. +// +// See also: ParseBigBytes. +// +// BigIBytes(82854982) -> 79 MiB +func BigIBytes(s *big.Int) string { + sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"} + return humanateBigBytes(s, bigIECExp, sizes) +} + +// ParseBigBytes parses a string representation of bytes into the number +// of bytes it represents. +// +// See also: BigBytes, BigIBytes. +// +// ParseBigBytes("42 MB") -> 42000000, nil +// ParseBigBytes("42 mib") -> 44040192, nil +func ParseBigBytes(s string) (*big.Int, error) { + lastDigit := 0 + hasComma := false + for _, r := range s { + if !(unicode.IsDigit(r) || r == '.' || r == ',') { + break + } + if r == ',' { + hasComma = true + } + lastDigit++ + } + + num := s[:lastDigit] + if hasComma { + num = strings.Replace(num, ",", "", -1) + } + + val := &big.Rat{} + _, err := fmt.Sscanf(num, "%f", val) + if err != nil { + return nil, err + } + + extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) + if m, ok := bigBytesSizeTable[extra]; ok { + mv := (&big.Rat{}).SetInt(m) + val.Mul(val, mv) + rv := &big.Int{} + rv.Div(val.Num(), val.Denom()) + return rv, nil + } + + return nil, fmt.Errorf("unhandled size name: %v", extra) +} diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go new file mode 100644 index 0000000000..0b498f4885 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bytes.go @@ -0,0 +1,143 @@ +package humanize + +import ( + "fmt" + "math" + "strconv" + "strings" + "unicode" +) + +// IEC Sizes. +// kibis of bits +const ( + Byte = 1 << (iota * 10) + KiByte + MiByte + GiByte + TiByte + PiByte + EiByte +) + +// SI Sizes. +const ( + IByte = 1 + KByte = IByte * 1000 + MByte = KByte * 1000 + GByte = MByte * 1000 + TByte = GByte * 1000 + PByte = TByte * 1000 + EByte = PByte * 1000 +) + +var bytesSizeTable = map[string]uint64{ + "b": Byte, + "kib": KiByte, + "kb": KByte, + "mib": MiByte, + "mb": MByte, + "gib": GiByte, + "gb": GByte, + "tib": TiByte, + "tb": TByte, + "pib": PiByte, + "pb": PByte, + "eib": EiByte, + "eb": EByte, + // Without suffix + "": Byte, + "ki": KiByte, + "k": KByte, + "mi": MiByte, + "m": MByte, + "gi": GiByte, + "g": GByte, + "ti": TiByte, + "t": TByte, + "pi": PiByte, + "p": PByte, + "ei": EiByte, + "e": EByte, +} + +func logn(n, b float64) float64 { + return math.Log(n) / math.Log(b) +} + +func humanateBytes(s uint64, base float64, sizes []string) string { + if s < 10 { + return fmt.Sprintf("%d B", s) + } + e := math.Floor(logn(float64(s), base)) + suffix := sizes[int(e)] + val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10 + f := "%.0f %s" + if val < 10 { + f = "%.1f %s" + } + + return fmt.Sprintf(f, val, suffix) +} + +// Bytes produces a human readable representation of an SI size. +// +// See also: ParseBytes. +// +// Bytes(82854982) -> 83 MB +func Bytes(s uint64) string { + sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} + return humanateBytes(s, 1000, sizes) +} + +// IBytes produces a human readable representation of an IEC size. +// +// See also: ParseBytes. +// +// IBytes(82854982) -> 79 MiB +func IBytes(s uint64) string { + sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} + return humanateBytes(s, 1024, sizes) +} + +// ParseBytes parses a string representation of bytes into the number +// of bytes it represents. +// +// See Also: Bytes, IBytes. +// +// ParseBytes("42 MB") -> 42000000, nil +// ParseBytes("42 mib") -> 44040192, nil +func ParseBytes(s string) (uint64, error) { + lastDigit := 0 + hasComma := false + for _, r := range s { + if !(unicode.IsDigit(r) || r == '.' || r == ',') { + break + } + if r == ',' { + hasComma = true + } + lastDigit++ + } + + num := s[:lastDigit] + if hasComma { + num = strings.Replace(num, ",", "", -1) + } + + f, err := strconv.ParseFloat(num, 64) + if err != nil { + return 0, err + } + + extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) + if m, ok := bytesSizeTable[extra]; ok { + f *= float64(m) + if f >= math.MaxUint64 { + return 0, fmt.Errorf("too large: %v", s) + } + return uint64(f), nil + } + + return 0, fmt.Errorf("unhandled size name: %v", extra) +} diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go new file mode 100644 index 0000000000..520ae3e57d --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/comma.go @@ -0,0 +1,116 @@ +package humanize + +import ( + "bytes" + "math" + "math/big" + "strconv" + "strings" +) + +// Comma produces a string form of the given number in base 10 with +// commas after every three orders of magnitude. +// +// e.g. Comma(834142) -> 834,142 +func Comma(v int64) string { + sign := "" + + // Min int64 can't be negated to a usable value, so it has to be special cased. + if v == math.MinInt64 { + return "-9,223,372,036,854,775,808" + } + + if v < 0 { + sign = "-" + v = 0 - v + } + + parts := []string{"", "", "", "", "", "", ""} + j := len(parts) - 1 + + for v > 999 { + parts[j] = strconv.FormatInt(v%1000, 10) + switch len(parts[j]) { + case 2: + parts[j] = "0" + parts[j] + case 1: + parts[j] = "00" + parts[j] + } + v = v / 1000 + j-- + } + parts[j] = strconv.Itoa(int(v)) + return sign + strings.Join(parts[j:], ",") +} + +// Commaf produces a string form of the given number in base 10 with +// commas after every three orders of magnitude. +// +// e.g. Commaf(834142.32) -> 834,142.32 +func Commaf(v float64) string { + buf := &bytes.Buffer{} + if v < 0 { + buf.Write([]byte{'-'}) + v = 0 - v + } + + comma := []byte{','} + + parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".") + pos := 0 + if len(parts[0])%3 != 0 { + pos += len(parts[0]) % 3 + buf.WriteString(parts[0][:pos]) + buf.Write(comma) + } + for ; pos < len(parts[0]); pos += 3 { + buf.WriteString(parts[0][pos : pos+3]) + buf.Write(comma) + } + buf.Truncate(buf.Len() - 1) + + if len(parts) > 1 { + buf.Write([]byte{'.'}) + buf.WriteString(parts[1]) + } + return buf.String() +} + +// CommafWithDigits works like the Commaf but limits the resulting +// string to the given number of decimal places. +// +// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3 +func CommafWithDigits(f float64, decimals int) string { + return stripTrailingDigits(Commaf(f), decimals) +} + +// BigComma produces a string form of the given big.Int in base 10 +// with commas after every three orders of magnitude. +func BigComma(b *big.Int) string { + sign := "" + if b.Sign() < 0 { + sign = "-" + b.Abs(b) + } + + athousand := big.NewInt(1000) + c := (&big.Int{}).Set(b) + _, m := oom(c, athousand) + parts := make([]string, m+1) + j := len(parts) - 1 + + mod := &big.Int{} + for b.Cmp(athousand) >= 0 { + b.DivMod(b, athousand, mod) + parts[j] = strconv.FormatInt(mod.Int64(), 10) + switch len(parts[j]) { + case 2: + parts[j] = "0" + parts[j] + case 1: + parts[j] = "00" + parts[j] + } + j-- + } + parts[j] = strconv.Itoa(int(b.Int64())) + return sign + strings.Join(parts[j:], ",") +} diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go new file mode 100644 index 0000000000..620690dec7 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/commaf.go @@ -0,0 +1,40 @@ +// +build go1.6 + +package humanize + +import ( + "bytes" + "math/big" + "strings" +) + +// BigCommaf produces a string form of the given big.Float in base 10 +// with commas after every three orders of magnitude. +func BigCommaf(v *big.Float) string { + buf := &bytes.Buffer{} + if v.Sign() < 0 { + buf.Write([]byte{'-'}) + v.Abs(v) + } + + comma := []byte{','} + + parts := strings.Split(v.Text('f', -1), ".") + pos := 0 + if len(parts[0])%3 != 0 { + pos += len(parts[0]) % 3 + buf.WriteString(parts[0][:pos]) + buf.Write(comma) + } + for ; pos < len(parts[0]); pos += 3 { + buf.WriteString(parts[0][pos : pos+3]) + buf.Write(comma) + } + buf.Truncate(buf.Len() - 1) + + if len(parts) > 1 { + buf.Write([]byte{'.'}) + buf.WriteString(parts[1]) + } + return buf.String() +} diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go new file mode 100644 index 0000000000..1c62b640d4 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ftoa.go @@ -0,0 +1,46 @@ +package humanize + +import ( + "strconv" + "strings" +) + +func stripTrailingZeros(s string) string { + offset := len(s) - 1 + for offset > 0 { + if s[offset] == '.' { + offset-- + break + } + if s[offset] != '0' { + break + } + offset-- + } + return s[:offset+1] +} + +func stripTrailingDigits(s string, digits int) string { + if i := strings.Index(s, "."); i >= 0 { + if digits <= 0 { + return s[:i] + } + i++ + if i+digits >= len(s) { + return s + } + return s[:i+digits] + } + return s +} + +// Ftoa converts a float to a string with no trailing zeros. +func Ftoa(num float64) string { + return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) +} + +// FtoaWithDigits converts a float to a string but limits the resulting string +// to the given number of decimal places, and no trailing zeros. +func FtoaWithDigits(num float64, digits int) string { + return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits)) +} diff --git a/vendor/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go new file mode 100644 index 0000000000..a2c2da31ef --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/humanize.go @@ -0,0 +1,8 @@ +/* +Package humanize converts boring ugly numbers to human-friendly strings and back. + +Durations can be turned into strings such as "3 days ago", numbers +representing sizes like 82854982 into useful strings like, "83 MB" or +"79 MiB" (whichever you prefer). +*/ +package humanize diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go new file mode 100644 index 0000000000..dec6186599 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/number.go @@ -0,0 +1,192 @@ +package humanize + +/* +Slightly adapted from the source to fit go-humanize. + +Author: https://github.com/gorhill +Source: https://gist.github.com/gorhill/5285193 + +*/ + +import ( + "math" + "strconv" +) + +var ( + renderFloatPrecisionMultipliers = [...]float64{ + 1, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000, + 1000000000, + } + + renderFloatPrecisionRounders = [...]float64{ + 0.5, + 0.05, + 0.005, + 0.0005, + 0.00005, + 0.000005, + 0.0000005, + 0.00000005, + 0.000000005, + 0.0000000005, + } +) + +// FormatFloat produces a formatted number as string based on the following user-specified criteria: +// * thousands separator +// * decimal separator +// * decimal precision +// +// Usage: s := RenderFloat(format, n) +// The format parameter tells how to render the number n. +// +// See examples: http://play.golang.org/p/LXc1Ddm1lJ +// +// Examples of format strings, given n = 12345.6789: +// "#,###.##" => "12,345.67" +// "#,###." => "12,345" +// "#,###" => "12345,678" +// "#\u202F###,##" => "12 345,68" +// "#.###,###### => 12.345,678900 +// "" (aka default format) => 12,345.67 +// +// The highest precision allowed is 9 digits after the decimal symbol. +// There is also a version for integer number, FormatInteger(), +// which is convenient for calls within template. +func FormatFloat(format string, n float64) string { + // Special cases: + // NaN = "NaN" + // +Inf = "+Infinity" + // -Inf = "-Infinity" + if math.IsNaN(n) { + return "NaN" + } + if n > math.MaxFloat64 { + return "Infinity" + } + if n < -math.MaxFloat64 { + return "-Infinity" + } + + // default format + precision := 2 + decimalStr := "." + thousandStr := "," + positiveStr := "" + negativeStr := "-" + + if len(format) > 0 { + format := []rune(format) + + // If there is an explicit format directive, + // then default values are these: + precision = 9 + thousandStr = "" + + // collect indices of meaningful formatting directives + formatIndx := []int{} + for i, char := range format { + if char != '#' && char != '0' { + formatIndx = append(formatIndx, i) + } + } + + if len(formatIndx) > 0 { + // Directive at index 0: + // Must be a '+' + // Raise an error if not the case + // index: 0123456789 + // +0.000,000 + // +000,000.0 + // +0000.00 + // +0000 + if formatIndx[0] == 0 { + if format[formatIndx[0]] != '+' { + panic("RenderFloat(): invalid positive sign directive") + } + positiveStr = "+" + formatIndx = formatIndx[1:] + } + + // Two directives: + // First is thousands separator + // Raise an error if not followed by 3-digit + // 0123456789 + // 0.000,000 + // 000,000.00 + if len(formatIndx) == 2 { + if (formatIndx[1] - formatIndx[0]) != 4 { + panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers") + } + thousandStr = string(format[formatIndx[0]]) + formatIndx = formatIndx[1:] + } + + // One directive: + // Directive is decimal separator + // The number of digit-specifier following the separator indicates wanted precision + // 0123456789 + // 0.00 + // 000,0000 + if len(formatIndx) == 1 { + decimalStr = string(format[formatIndx[0]]) + precision = len(format) - formatIndx[0] - 1 + } + } + } + + // generate sign part + var signStr string + if n >= 0.000000001 { + signStr = positiveStr + } else if n <= -0.000000001 { + signStr = negativeStr + n = -n + } else { + signStr = "" + n = 0.0 + } + + // split number into integer and fractional parts + intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision]) + + // generate integer part string + intStr := strconv.FormatInt(int64(intf), 10) + + // add thousand separator if required + if len(thousandStr) > 0 { + for i := len(intStr); i > 3; { + i -= 3 + intStr = intStr[:i] + thousandStr + intStr[i:] + } + } + + // no fractional part, we can leave now + if precision == 0 { + return signStr + intStr + } + + // generate fractional part + fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision])) + // may need padding + if len(fracStr) < precision { + fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr + } + + return signStr + intStr + decimalStr + fracStr +} + +// FormatInteger produces a formatted number as string. +// See FormatFloat. +func FormatInteger(format string, n int) string { + return FormatFloat(format, float64(n)) +} diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go new file mode 100644 index 0000000000..43d88a8619 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ordinals.go @@ -0,0 +1,25 @@ +package humanize + +import "strconv" + +// Ordinal gives you the input number in a rank/ordinal format. +// +// Ordinal(3) -> 3rd +func Ordinal(x int) string { + suffix := "th" + switch x % 10 { + case 1: + if x%100 != 11 { + suffix = "st" + } + case 2: + if x%100 != 12 { + suffix = "nd" + } + case 3: + if x%100 != 13 { + suffix = "rd" + } + } + return strconv.Itoa(x) + suffix +} diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go new file mode 100644 index 0000000000..ae659e0e49 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/si.go @@ -0,0 +1,123 @@ +package humanize + +import ( + "errors" + "math" + "regexp" + "strconv" +) + +var siPrefixTable = map[float64]string{ + -24: "y", // yocto + -21: "z", // zepto + -18: "a", // atto + -15: "f", // femto + -12: "p", // pico + -9: "n", // nano + -6: "µ", // micro + -3: "m", // milli + 0: "", + 3: "k", // kilo + 6: "M", // mega + 9: "G", // giga + 12: "T", // tera + 15: "P", // peta + 18: "E", // exa + 21: "Z", // zetta + 24: "Y", // yotta +} + +var revSIPrefixTable = revfmap(siPrefixTable) + +// revfmap reverses the map and precomputes the power multiplier +func revfmap(in map[float64]string) map[string]float64 { + rv := map[string]float64{} + for k, v := range in { + rv[v] = math.Pow(10, k) + } + return rv +} + +var riParseRegex *regexp.Regexp + +func init() { + ri := `^([\-0-9.]+)\s?([` + for _, v := range siPrefixTable { + ri += v + } + ri += `]?)(.*)` + + riParseRegex = regexp.MustCompile(ri) +} + +// ComputeSI finds the most appropriate SI prefix for the given number +// and returns the prefix along with the value adjusted to be within +// that prefix. +// +// See also: SI, ParseSI. +// +// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p") +func ComputeSI(input float64) (float64, string) { + if input == 0 { + return 0, "" + } + mag := math.Abs(input) + exponent := math.Floor(logn(mag, 10)) + exponent = math.Floor(exponent/3) * 3 + + value := mag / math.Pow(10, exponent) + + // Handle special case where value is exactly 1000.0 + // Should return 1 M instead of 1000 k + if value == 1000.0 { + exponent += 3 + value = mag / math.Pow(10, exponent) + } + + value = math.Copysign(value, input) + + prefix := siPrefixTable[exponent] + return value, prefix +} + +// SI returns a string with default formatting. +// +// SI uses Ftoa to format float value, removing trailing zeros. +// +// See also: ComputeSI, ParseSI. +// +// e.g. SI(1000000, "B") -> 1 MB +// e.g. SI(2.2345e-12, "F") -> 2.2345 pF +func SI(input float64, unit string) string { + value, prefix := ComputeSI(input) + return Ftoa(value) + " " + prefix + unit +} + +// SIWithDigits works like SI but limits the resulting string to the +// given number of decimal places. +// +// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB +// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF +func SIWithDigits(input float64, decimals int, unit string) string { + value, prefix := ComputeSI(input) + return FtoaWithDigits(value, decimals) + " " + prefix + unit +} + +var errInvalid = errors.New("invalid input") + +// ParseSI parses an SI string back into the number and unit. +// +// See also: SI, ComputeSI. +// +// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil) +func ParseSI(input string) (float64, string, error) { + found := riParseRegex.FindStringSubmatch(input) + if len(found) != 4 { + return 0, "", errInvalid + } + mag := revSIPrefixTable[found[2]] + unit := found[3] + + base, err := strconv.ParseFloat(found[1], 64) + return base * mag, unit, err +} diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go new file mode 100644 index 0000000000..dd3fbf5efc --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/times.go @@ -0,0 +1,117 @@ +package humanize + +import ( + "fmt" + "math" + "sort" + "time" +) + +// Seconds-based time units +const ( + Day = 24 * time.Hour + Week = 7 * Day + Month = 30 * Day + Year = 12 * Month + LongTime = 37 * Year +) + +// Time formats a time into a relative string. +// +// Time(someT) -> "3 weeks ago" +func Time(then time.Time) string { + return RelTime(then, time.Now(), "ago", "from now") +} + +// A RelTimeMagnitude struct contains a relative time point at which +// the relative format of time will switch to a new format string. A +// slice of these in ascending order by their "D" field is passed to +// CustomRelTime to format durations. +// +// The Format field is a string that may contain a "%s" which will be +// replaced with the appropriate signed label (e.g. "ago" or "from +// now") and a "%d" that will be replaced by the quantity. +// +// The DivBy field is the amount of time the time difference must be +// divided by in order to display correctly. +// +// e.g. if D is 2*time.Minute and you want to display "%d minutes %s" +// DivBy should be time.Minute so whatever the duration is will be +// expressed in minutes. +type RelTimeMagnitude struct { + D time.Duration + Format string + DivBy time.Duration +} + +var defaultMagnitudes = []RelTimeMagnitude{ + {time.Second, "now", time.Second}, + {2 * time.Second, "1 second %s", 1}, + {time.Minute, "%d seconds %s", time.Second}, + {2 * time.Minute, "1 minute %s", 1}, + {time.Hour, "%d minutes %s", time.Minute}, + {2 * time.Hour, "1 hour %s", 1}, + {Day, "%d hours %s", time.Hour}, + {2 * Day, "1 day %s", 1}, + {Week, "%d days %s", Day}, + {2 * Week, "1 week %s", 1}, + {Month, "%d weeks %s", Week}, + {2 * Month, "1 month %s", 1}, + {Year, "%d months %s", Month}, + {18 * Month, "1 year %s", 1}, + {2 * Year, "2 years %s", 1}, + {LongTime, "%d years %s", Year}, + {math.MaxInt64, "a long while %s", 1}, +} + +// RelTime formats a time into a relative string. +// +// It takes two times and two labels. In addition to the generic time +// delta string (e.g. 5 minutes), the labels are used applied so that +// the label corresponding to the smaller time is applied. +// +// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier" +func RelTime(a, b time.Time, albl, blbl string) string { + return CustomRelTime(a, b, albl, blbl, defaultMagnitudes) +} + +// CustomRelTime formats a time into a relative string. +// +// It takes two times two labels and a table of relative time formats. +// In addition to the generic time delta string (e.g. 5 minutes), the +// labels are used applied so that the label corresponding to the +// smaller time is applied. +func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string { + lbl := albl + diff := b.Sub(a) + + if a.After(b) { + lbl = blbl + diff = a.Sub(b) + } + + n := sort.Search(len(magnitudes), func(i int) bool { + return magnitudes[i].D > diff + }) + + if n >= len(magnitudes) { + n = len(magnitudes) - 1 + } + mag := magnitudes[n] + args := []interface{}{} + escaped := false + for _, ch := range mag.Format { + if escaped { + switch ch { + case 's': + args = append(args, lbl) + case 'd': + args = append(args, diff/mag.DivBy) + } + escaped = false + } else { + escaped = ch == '%' + } + } + return fmt.Sprintf(mag.Format, args...) +} diff --git a/vendor/modernc.org/libc/Makefile b/vendor/modernc.org/libc/Makefile index 7df405003a..e9c5b256bd 100644 --- a/vendor/modernc.org/libc/Makefile +++ b/vendor/modernc.org/libc/Makefile @@ -111,6 +111,12 @@ openbsd_amd64: go generate 2>&1 | tee log-generate go build -v ./... # +# only on openbsd/386 +openbsd_386: + @echo "Should be executed only on openbsd/386." + go generate 2>&1 | tee log-generate + go build -v ./... + # only on openbsd/arm64 openbsd_arm64: @echo "Should be executed only on openbsd/arm64." diff --git a/vendor/modernc.org/libc/capi_openbsd_386.go b/vendor/modernc.org/libc/capi_openbsd_386.go index 2e751280b8..dbcc423bea 100644 --- a/vendor/modernc.org/libc/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/capi_openbsd_386.go @@ -3,13 +3,14 @@ package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ - "_CurrentRuneLocale": {}, - "_DefaultRuneLocale": {}, + "_C_ctype_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, "__assert": {}, + "__assert13": {}, + "__assert2": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, @@ -84,6 +85,7 @@ var CAPI = map[string]struct{}{ "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_get_mb_cur_max": {}, + "__errno": {}, "__errno_location": {}, "__error": {}, "__floatscan": {}, @@ -109,6 +111,7 @@ var CAPI = map[string]struct{}{ "__lookup_serv": {}, "__mb_sb_limit": {}, "__runes_for_locale": {}, + "__sF": {}, "__shgetc": {}, "__shlim": {}, "__srget": {}, @@ -125,11 +128,14 @@ var CAPI = map[string]struct{}{ "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, + "_ctype_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, + "_tolower_tab_": {}, + "_toupper_tab_": {}, "abort": {}, "abs": {}, "accept": {}, @@ -248,6 +254,7 @@ var CAPI = map[string]struct{}{ "gethostbyname2_r": {}, "gethostname": {}, "getnameinfo": {}, + "getpagesize": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, @@ -279,6 +286,7 @@ var CAPI = map[string]struct{}{ "isalpha": {}, "isascii": {}, "isatty": {}, + "isblank": {}, "isdigit": {}, "islower": {}, "isnan": {}, diff --git a/vendor/modernc.org/libc/capi_openbsd_amd64.go b/vendor/modernc.org/libc/capi_openbsd_amd64.go index e1a5623ec4..7ba9c55da2 100644 --- a/vendor/modernc.org/libc/capi_openbsd_amd64.go +++ b/vendor/modernc.org/libc/capi_openbsd_amd64.go @@ -3,8 +3,7 @@ package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ - "_CurrentRuneLocale": {}, - "_DefaultRuneLocale": {}, + "_C_ctype_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, @@ -50,6 +49,7 @@ var CAPI = map[string]struct{}{ "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, + "__builtin_isblank": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, @@ -129,6 +129,7 @@ var CAPI = map[string]struct{}{ "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, + "_ctype_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, @@ -286,6 +287,7 @@ var CAPI = map[string]struct{}{ "isalpha": {}, "isascii": {}, "isatty": {}, + "isblank": {}, "isdigit": {}, "islower": {}, "isnan": {}, diff --git a/vendor/modernc.org/libc/capi_openbsd_arm64.go b/vendor/modernc.org/libc/capi_openbsd_arm64.go index e1a5623ec4..7ba9c55da2 100644 --- a/vendor/modernc.org/libc/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/capi_openbsd_arm64.go @@ -3,8 +3,7 @@ package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ - "_CurrentRuneLocale": {}, - "_DefaultRuneLocale": {}, + "_C_ctype_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, @@ -50,6 +49,7 @@ var CAPI = map[string]struct{}{ "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, + "__builtin_isblank": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, @@ -129,6 +129,7 @@ var CAPI = map[string]struct{}{ "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, + "_ctype_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, @@ -286,6 +287,7 @@ var CAPI = map[string]struct{}{ "isalpha": {}, "isascii": {}, "isatty": {}, + "isblank": {}, "isdigit": {}, "islower": {}, "isnan": {}, diff --git a/vendor/modernc.org/libc/capi_windows_386.go b/vendor/modernc.org/libc/capi_windows_386.go index dec91841be..fc04042ffb 100644 --- a/vendor/modernc.org/libc/capi_windows_386.go +++ b/vendor/modernc.org/libc/capi_windows_386.go @@ -363,6 +363,21 @@ var CAPI = map[string]struct{}{ "__ms_vswscanf": {}, "__ms_vwscanf": {}, "__putenv": {}, + "__stdio_common_vfprintf": {}, + "__stdio_common_vfprintf_p": {}, + "__stdio_common_vfprintf_s": {}, + "__stdio_common_vfscanf": {}, + "__stdio_common_vfwprintf_s": {}, + "__stdio_common_vfwscanf": {}, + "__stdio_common_vsnprintf_s": {}, + "__stdio_common_vsnwprintf_s": {}, + "__stdio_common_vsprintf": {}, + "__stdio_common_vsprintf_p": {}, + "__stdio_common_vsprintf_s": {}, + "__stdio_common_vsscanf": {}, + "__stdio_common_vswprintf": {}, + "__stdio_common_vswprintf_s": {}, + "__stdio_common_vswscanf": {}, "__strchrnul": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, @@ -386,6 +401,7 @@ var CAPI = map[string]struct{}{ "_findfirst64i32": {}, "_findnext32": {}, "_findnext64i32": {}, + "_fstat": {}, "_fstat64": {}, "_fstati64": {}, "_ftime": {}, diff --git a/vendor/modernc.org/libc/errno/capi_darwin_amd64.go b/vendor/modernc.org/libc/errno/capi_darwin_amd64.go index fbe477aad3..68fbc75f08 100644 --- a/vendor/modernc.org/libc/errno/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/errno/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT. package errno diff --git a/vendor/modernc.org/libc/errno/capi_openbsd_386.go b/vendor/modernc.org/libc/errno/capi_openbsd_386.go index 4e5fd8bdd6..46d0ab052e 100644 --- a/vendor/modernc.org/libc/errno/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/errno/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o errno/errno_freebsd_386.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_openbsd_386.go -pkgname errno', DO NOT EDIT. package errno diff --git a/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go b/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go index d81a2a189f..fd86138aea 100644 --- a/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o errno/errno_openbsd_amd64.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_openbsd_arm64.go -pkgname errno', DO NOT EDIT. package errno diff --git a/vendor/modernc.org/libc/errno/capi_windows_386.go b/vendor/modernc.org/libc/errno/capi_windows_386.go index bf2350226e..ccd54b7624 100644 --- a/vendor/modernc.org/libc/errno/capi_windows_386.go +++ b/vendor/modernc.org/libc/errno/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT. package errno diff --git a/vendor/modernc.org/libc/errno/errno_darwin_amd64.go b/vendor/modernc.org/libc/errno/errno_darwin_amd64.go index 5b6df9d925..6b369d2fc3 100644 --- a/vendor/modernc.org/libc/errno/errno_darwin_amd64.go +++ b/vendor/modernc.org/libc/errno/errno_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT. package errno @@ -15,125 +15,125 @@ var _ atomic.Value var _ unsafe.Pointer const ( - E2BIG = 7 - EACCES = 13 - EADDRINUSE = 48 - EADDRNOTAVAIL = 49 - EAFNOSUPPORT = 47 - EAGAIN = 35 - EALREADY = 37 - EAUTH = 80 - EBADARCH = 86 - EBADEXEC = 85 - EBADF = 9 - EBADMACHO = 88 - EBADMSG = 94 - EBADRPC = 72 - EBUSY = 16 - ECANCELED = 89 - ECHILD = 10 - ECONNABORTED = 53 - ECONNREFUSED = 61 - ECONNRESET = 54 - EDEADLK = 11 - EDESTADDRREQ = 39 - EDEVERR = 83 - EDOM = 33 - EDQUOT = 69 - EEXIST = 17 - EFAULT = 14 - EFBIG = 27 - EFTYPE = 79 - EHOSTDOWN = 64 - EHOSTUNREACH = 65 - EIDRM = 90 - EILSEQ = 92 - EINPROGRESS = 36 - EINTR = 4 - EINVAL = 22 - EIO = 5 - EISCONN = 56 - EISDIR = 21 - ELAST = 106 - ELOOP = 62 - EMFILE = 24 - EMLINK = 31 - EMSGSIZE = 40 - EMULTIHOP = 95 - ENAMETOOLONG = 63 - ENEEDAUTH = 81 - ENETDOWN = 50 - ENETRESET = 52 - ENETUNREACH = 51 - ENFILE = 23 - ENOATTR = 93 - ENOBUFS = 55 - ENODATA = 96 - ENODEV = 19 - ENOENT = 2 - ENOEXEC = 8 - ENOLCK = 77 - ENOLINK = 97 - ENOMEM = 12 - ENOMSG = 91 - ENOPOLICY = 103 - ENOPROTOOPT = 42 - ENOSPC = 28 - ENOSR = 98 - ENOSTR = 99 - ENOSYS = 78 - ENOTBLK = 15 - ENOTCONN = 57 - ENOTDIR = 20 - ENOTEMPTY = 66 - ENOTRECOVERABLE = 104 - ENOTSOCK = 38 - ENOTSUP = 45 - ENOTTY = 25 - ENXIO = 6 - EOPNOTSUPP = 102 - EOVERFLOW = 84 - EOWNERDEAD = 105 - EPERM = 1 - EPFNOSUPPORT = 46 - EPIPE = 32 - EPROCLIM = 67 - EPROCUNAVAIL = 76 - EPROGMISMATCH = 75 - EPROGUNAVAIL = 74 - EPROTO = 100 - EPROTONOSUPPORT = 43 - EPROTOTYPE = 41 - EPWROFF = 82 - EQFULL = 106 - ERANGE = 34 - EREMOTE = 71 - EROFS = 30 - ERPCMISMATCH = 73 - ESHLIBVERS = 87 - ESHUTDOWN = 58 - ESOCKTNOSUPPORT = 44 - ESPIPE = 29 - ESRCH = 3 - ESTALE = 70 - ETIME = 101 - ETIMEDOUT = 60 - ETOOMANYREFS = 59 - ETXTBSY = 26 - EUSERS = 68 - EWOULDBLOCK = 35 - EXDEV = 18 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_ERRNO_T = 0 - X_FILE_OFFSET_BITS = 64 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS_ERRNO_H_ = 0 + E2BIG = 7 // errno.h:94:1: + EACCES = 13 // errno.h:101:1: + EADDRINUSE = 48 // errno.h:161:1: + EADDRNOTAVAIL = 49 // errno.h:162:1: + EAFNOSUPPORT = 47 // errno.h:160:1: + EAGAIN = 35 // errno.h:129:1: + EALREADY = 37 // errno.h:132:1: + EAUTH = 80 // errno.h:213:1: + EBADARCH = 86 // errno.h:226:1: + EBADEXEC = 85 // errno.h:225:1: + EBADF = 9 // errno.h:96:1: + EBADMACHO = 88 // errno.h:228:1: + EBADMSG = 94 // errno.h:240:1: + EBADRPC = 72 // errno.h:201:1: + EBUSY = 16 // errno.h:106:1: + ECANCELED = 89 // errno.h:231:1: + ECHILD = 10 // errno.h:97:1: + ECONNABORTED = 53 // errno.h:168:1: + ECONNREFUSED = 61 // errno.h:178:1: + ECONNRESET = 54 // errno.h:169:1: + EDEADLK = 11 // errno.h:98:1: + EDESTADDRREQ = 39 // errno.h:136:1: + EDEVERR = 83 // errno.h:218:1: + EDOM = 33 // errno.h:125:1: + EDQUOT = 69 // errno.h:195:1: + EEXIST = 17 // errno.h:107:1: + EFAULT = 14 // errno.h:102:1: + EFBIG = 27 // errno.h:117:1: + EFTYPE = 79 // errno.h:212:1: + EHOSTDOWN = 64 // errno.h:185:1: + EHOSTUNREACH = 65 // errno.h:187:1: + EIDRM = 90 // errno.h:233:1: + EILSEQ = 92 // errno.h:235:1: + EINPROGRESS = 36 // errno.h:131:1: + EINTR = 4 // errno.h:91:1: + EINVAL = 22 // errno.h:112:1: + EIO = 5 // errno.h:92:1: + EISCONN = 56 // errno.h:171:1: + EISDIR = 21 // errno.h:111:1: + ELAST = 106 // errno.h:263:1: + ELOOP = 62 // errno.h:180:1: + EMFILE = 24 // errno.h:114:1: + EMLINK = 31 // errno.h:121:1: + EMSGSIZE = 40 // errno.h:137:1: + EMULTIHOP = 95 // errno.h:241:1: + ENAMETOOLONG = 63 // errno.h:181:1: + ENEEDAUTH = 81 // errno.h:214:1: + ENETDOWN = 50 // errno.h:165:1: + ENETRESET = 52 // errno.h:167:1: + ENETUNREACH = 51 // errno.h:166:1: + ENFILE = 23 // errno.h:113:1: + ENOATTR = 93 // errno.h:237:1: + ENOBUFS = 55 // errno.h:170:1: + ENODATA = 96 // errno.h:242:1: + ENODEV = 19 // errno.h:109:1: + ENOENT = 2 // errno.h:89:1: + ENOEXEC = 8 // errno.h:95:1: + ENOLCK = 77 // errno.h:208:1: + ENOLINK = 97 // errno.h:243:1: + ENOMEM = 12 // errno.h:100:1: + ENOMSG = 91 // errno.h:234:1: + ENOPOLICY = 103 // errno.h:254:1: + ENOPROTOOPT = 42 // errno.h:139:1: + ENOSPC = 28 // errno.h:118:1: + ENOSR = 98 // errno.h:244:1: + ENOSTR = 99 // errno.h:245:1: + ENOSYS = 78 // errno.h:209:1: + ENOTBLK = 15 // errno.h:104:1: + ENOTCONN = 57 // errno.h:172:1: + ENOTDIR = 20 // errno.h:110:1: + ENOTEMPTY = 66 // errno.h:188:1: + ENOTRECOVERABLE = 104 // errno.h:257:1: + ENOTSOCK = 38 // errno.h:135:1: + ENOTSUP = 45 // errno.h:144:1: + ENOTTY = 25 // errno.h:115:1: + ENXIO = 6 // errno.h:93:1: + EOPNOTSUPP = 102 // errno.h:251:1: + EOVERFLOW = 84 // errno.h:221:1: + EOWNERDEAD = 105 // errno.h:258:1: + EPERM = 1 // errno.h:88:1: + EPFNOSUPPORT = 46 // errno.h:158:1: + EPIPE = 32 // errno.h:122:1: + EPROCLIM = 67 // errno.h:192:1: + EPROCUNAVAIL = 76 // errno.h:205:1: + EPROGMISMATCH = 75 // errno.h:204:1: + EPROGUNAVAIL = 74 // errno.h:203:1: + EPROTO = 100 // errno.h:246:1: + EPROTONOSUPPORT = 43 // errno.h:140:1: + EPROTOTYPE = 41 // errno.h:138:1: + EPWROFF = 82 // errno.h:217:1: + EQFULL = 106 // errno.h:262:1: + ERANGE = 34 // errno.h:126:1: + EREMOTE = 71 // errno.h:200:1: + EROFS = 30 // errno.h:120:1: + ERPCMISMATCH = 73 // errno.h:202:1: + ESHLIBVERS = 87 // errno.h:227:1: + ESHUTDOWN = 58 // errno.h:174:1: + ESOCKTNOSUPPORT = 44 // errno.h:142:1: + ESPIPE = 29 // errno.h:119:1: + ESRCH = 3 // errno.h:90:1: + ESTALE = 70 // errno.h:198:1: + ETIME = 101 // errno.h:247:1: + ETIMEDOUT = 60 // errno.h:177:1: + ETOOMANYREFS = 59 // errno.h:175:1: + ETXTBSY = 26 // errno.h:116:1: + EUSERS = 68 // errno.h:193:1: + EWOULDBLOCK = 35 // errno.h:130:1: + EXDEV = 18 // errno.h:108:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_LP64 = 1 // :1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS_ERRNO_H_ = 0 // errno.h:70:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/errno/errno_openbsd_386.go b/vendor/modernc.org/libc/errno/errno_openbsd_386.go index f714b6223a..7dbe6dda38 100644 --- a/vendor/modernc.org/libc/errno/errno_openbsd_386.go +++ b/vendor/modernc.org/libc/errno/errno_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o errno/errno_freebsd_386.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_openbsd_386.go -pkgname errno', DO NOT EDIT. package errno @@ -15,116 +15,110 @@ var _ atomic.Value var _ unsafe.Pointer const ( - E2BIG = 7 // errno.h:57:1: - EACCES = 13 // errno.h:64:1: - EADDRINUSE = 48 // errno.h:112:1: - EADDRNOTAVAIL = 49 // errno.h:113:1: - EAFNOSUPPORT = 47 // errno.h:111:1: - EAGAIN = 35 // errno.h:94:1: - EALREADY = 37 // errno.h:98:1: - EAUTH = 80 // errno.h:161:1: - EBADF = 9 // errno.h:59:1: - EBADMSG = 89 // errno.h:173:1: - EBADRPC = 72 // errno.h:149:1: - EBUSY = 16 // errno.h:69:1: - ECANCELED = 85 // errno.h:166:1: - ECAPMODE = 94 // errno.h:180:1: - ECHILD = 10 // errno.h:60:1: - ECONNABORTED = 53 // errno.h:119:1: - ECONNREFUSED = 61 // errno.h:127:1: - ECONNRESET = 54 // errno.h:120:1: - EDEADLK = 11 // errno.h:61:1: - EDESTADDRREQ = 39 // errno.h:102:1: - EDOM = 33 // errno.h:90:1: - EDOOFUS = 88 // errno.h:170:1: - EDQUOT = 69 // errno.h:144:1: - EEXIST = 17 // errno.h:70:1: - EFAULT = 14 // errno.h:65:1: - EFBIG = 27 // errno.h:82:1: - EFTYPE = 79 // errno.h:160:1: - EHOSTDOWN = 64 // errno.h:135:1: - EHOSTUNREACH = 65 // errno.h:136:1: - EIDRM = 82 // errno.h:163:1: - EILSEQ = 86 // errno.h:167:1: - EINPROGRESS = 36 // errno.h:97:1: - EINTEGRITY = 97 // errno.h:183:1: - EINTR = 4 // errno.h:54:1: - EINVAL = 22 // errno.h:75:1: - EIO = 5 // errno.h:55:1: - EISCONN = 56 // errno.h:122:1: - EISDIR = 21 // errno.h:74:1: - ELAST = 97 // errno.h:187:1: - ELOOP = 62 // errno.h:129:1: - EMFILE = 24 // errno.h:77:1: - EMLINK = 31 // errno.h:86:1: - EMSGSIZE = 40 // errno.h:103:1: - EMULTIHOP = 90 // errno.h:174:1: - ENAMETOOLONG = 63 // errno.h:131:1: - ENEEDAUTH = 81 // errno.h:162:1: - ENETDOWN = 50 // errno.h:116:1: - ENETRESET = 52 // errno.h:118:1: - ENETUNREACH = 51 // errno.h:117:1: - ENFILE = 23 // errno.h:76:1: - ENOATTR = 87 // errno.h:168:1: - ENOBUFS = 55 // errno.h:121:1: - ENODEV = 19 // errno.h:72:1: - ENOENT = 2 // errno.h:52:1: - ENOEXEC = 8 // errno.h:58:1: - ENOLCK = 77 // errno.h:156:1: - ENOLINK = 91 // errno.h:175:1: - ENOMEM = 12 // errno.h:63:1: - ENOMSG = 83 // errno.h:164:1: - ENOPROTOOPT = 42 // errno.h:105:1: - ENOSPC = 28 // errno.h:83:1: - ENOSYS = 78 // errno.h:157:1: - ENOTBLK = 15 // errno.h:67:1: - ENOTCAPABLE = 93 // errno.h:179:1: - ENOTCONN = 57 // errno.h:123:1: - ENOTDIR = 20 // errno.h:73:1: - ENOTEMPTY = 66 // errno.h:138:1: - ENOTRECOVERABLE = 95 // errno.h:181:1: - ENOTSOCK = 38 // errno.h:101:1: - ENOTSUP = 45 // errno.h:109:1: - ENOTTY = 25 // errno.h:78:1: - ENXIO = 6 // errno.h:56:1: - EOPNOTSUPP = 45 // errno.h:108:1: - EOVERFLOW = 84 // errno.h:165:1: - EOWNERDEAD = 96 // errno.h:182:1: - EPERM = 1 // errno.h:51:1: - EPFNOSUPPORT = 46 // errno.h:110:1: - EPIPE = 32 // errno.h:87:1: - EPROCLIM = 67 // errno.h:142:1: - EPROCUNAVAIL = 76 // errno.h:153:1: - EPROGMISMATCH = 75 // errno.h:152:1: - EPROGUNAVAIL = 74 // errno.h:151:1: - EPROTO = 92 // errno.h:176:1: - EPROTONOSUPPORT = 43 // errno.h:106:1: - EPROTOTYPE = 41 // errno.h:104:1: - ERANGE = 34 // errno.h:91:1: - EREMOTE = 71 // errno.h:148:1: - EROFS = 30 // errno.h:85:1: - ERPCMISMATCH = 73 // errno.h:150:1: - ESHUTDOWN = 58 // errno.h:124:1: - ESOCKTNOSUPPORT = 44 // errno.h:107:1: - ESPIPE = 29 // errno.h:84:1: - ESRCH = 3 // errno.h:53:1: - ESTALE = 70 // errno.h:147:1: - ETIMEDOUT = 60 // errno.h:126:1: - ETOOMANYREFS = 59 // errno.h:125:1: - ETXTBSY = 26 // errno.h:80:1: - EUSERS = 68 // errno.h:143:1: - EWOULDBLOCK = 35 // errno.h:96:1: - EXDEV = 18 // errno.h:71:1: - X_ERRNO_T_DEFINED = 0 // errno.h:203:1: + E2BIG = 7 // errno.h:48:1: + EACCES = 13 // errno.h:55:1: + EADDRINUSE = 48 // errno.h:103:1: + EADDRNOTAVAIL = 49 // errno.h:104:1: + EAFNOSUPPORT = 47 // errno.h:102:1: + EAGAIN = 35 // errno.h:83:1: + EALREADY = 37 // errno.h:86:1: + EAUTH = 80 // errno.h:155:1: + EBADF = 9 // errno.h:50:1: + EBADMSG = 92 // errno.h:170:1: + EBADRPC = 72 // errno.h:143:1: + EBUSY = 16 // errno.h:60:1: + ECANCELED = 88 // errno.h:166:1: + ECHILD = 10 // errno.h:51:1: + ECONNABORTED = 53 // errno.h:110:1: + ECONNREFUSED = 61 // errno.h:120:1: + ECONNRESET = 54 // errno.h:111:1: + EDEADLK = 11 // errno.h:52:1: + EDESTADDRREQ = 39 // errno.h:90:1: + EDOM = 33 // errno.h:79:1: + EDQUOT = 69 // errno.h:137:1: + EEXIST = 17 // errno.h:61:1: + EFAULT = 14 // errno.h:56:1: + EFBIG = 27 // errno.h:71:1: + EFTYPE = 79 // errno.h:154:1: + EHOSTDOWN = 64 // errno.h:127:1: + EHOSTUNREACH = 65 // errno.h:129:1: + EIDRM = 89 // errno.h:167:1: + EILSEQ = 84 // errno.h:160:1: + EINPROGRESS = 36 // errno.h:85:1: + EINTR = 4 // errno.h:45:1: + EINVAL = 22 // errno.h:66:1: + EIO = 5 // errno.h:46:1: + EIPSEC = 82 // errno.h:157:1: + EISCONN = 56 // errno.h:113:1: + EISDIR = 21 // errno.h:65:1: + ELAST = 95 // errno.h:175:1: + ELOOP = 62 // errno.h:122:1: + EMEDIUMTYPE = 86 // errno.h:163:1: + EMFILE = 24 // errno.h:68:1: + EMLINK = 31 // errno.h:75:1: + EMSGSIZE = 40 // errno.h:91:1: + ENAMETOOLONG = 63 // errno.h:123:1: + ENEEDAUTH = 81 // errno.h:156:1: + ENETDOWN = 50 // errno.h:107:1: + ENETRESET = 52 // errno.h:109:1: + ENETUNREACH = 51 // errno.h:108:1: + ENFILE = 23 // errno.h:67:1: + ENOATTR = 83 // errno.h:158:1: + ENOBUFS = 55 // errno.h:112:1: + ENODEV = 19 // errno.h:63:1: + ENOENT = 2 // errno.h:43:1: + ENOEXEC = 8 // errno.h:49:1: + ENOLCK = 77 // errno.h:150:1: + ENOMEDIUM = 85 // errno.h:162:1: + ENOMEM = 12 // errno.h:54:1: + ENOMSG = 90 // errno.h:168:1: + ENOPROTOOPT = 42 // errno.h:93:1: + ENOSPC = 28 // errno.h:72:1: + ENOSYS = 78 // errno.h:151:1: + ENOTBLK = 15 // errno.h:58:1: + ENOTCONN = 57 // errno.h:114:1: + ENOTDIR = 20 // errno.h:64:1: + ENOTEMPTY = 66 // errno.h:130:1: + ENOTRECOVERABLE = 93 // errno.h:171:1: + ENOTSOCK = 38 // errno.h:89:1: + ENOTSUP = 91 // errno.h:169:1: + ENOTTY = 25 // errno.h:69:1: + ENXIO = 6 // errno.h:47:1: + EOPNOTSUPP = 45 // errno.h:98:1: + EOVERFLOW = 87 // errno.h:165:1: + EOWNERDEAD = 94 // errno.h:172:1: + EPERM = 1 // errno.h:42:1: + EPFNOSUPPORT = 46 // errno.h:100:1: + EPIPE = 32 // errno.h:76:1: + EPROCLIM = 67 // errno.h:134:1: + EPROCUNAVAIL = 76 // errno.h:147:1: + EPROGMISMATCH = 75 // errno.h:146:1: + EPROGUNAVAIL = 74 // errno.h:145:1: + EPROTO = 95 // errno.h:173:1: + EPROTONOSUPPORT = 43 // errno.h:94:1: + EPROTOTYPE = 41 // errno.h:92:1: + ERANGE = 34 // errno.h:80:1: + EREMOTE = 71 // errno.h:142:1: + EROFS = 30 // errno.h:74:1: + ERPCMISMATCH = 73 // errno.h:144:1: + ESHUTDOWN = 58 // errno.h:116:1: + ESOCKTNOSUPPORT = 44 // errno.h:96:1: + ESPIPE = 29 // errno.h:73:1: + ESRCH = 3 // errno.h:44:1: + ESTALE = 70 // errno.h:140:1: + ETIMEDOUT = 60 // errno.h:119:1: + ETOOMANYREFS = 59 // errno.h:117:1: + ETXTBSY = 26 // errno.h:70:1: + EUSERS = 68 // errno.h:135:1: + EWOULDBLOCK = 35 // errno.h:84:1: + EXDEV = 18 // errno.h:62:1: + X_ERRNO_H_ = 0 // errno.h:40:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_ILP32 = 1 // :1:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_ERRNO_H_ = 0 // errno.h:41:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -136,23 +130,4 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// 11 was EAGAIN - -// math software - -// non-blocking and interrupt i/o - -// ipc/network software -- argument errors - -// ipc/network software -- operational errors - -// should be rearranged - -// quotas & mush - -// Network File System - -// ISO/IEC 9899:2011 K.3.2.2 -type Errno_t = int32 /* errno.h:204:13 */ - var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go b/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go index 12d66db04e..5add30b6db 100644 --- a/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go +++ b/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go @@ -118,7 +118,7 @@ const ( X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: X_RET_PROTECTOR = 1 // :2:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go b/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go index 12d66db04e..4fd737835b 100644 --- a/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go +++ b/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o errno/errno_openbsd_amd64.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_openbsd_arm64.go -pkgname errno', DO NOT EDIT. package errno @@ -115,10 +115,10 @@ const ( X_ERRNO_H_ = 0 // errno.h:40:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: X_RET_PROTECTOR = 1 // :2:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/errno/errno_windows_386.go b/vendor/modernc.org/libc/errno/errno_windows_386.go index 54c4a0c147..d31ff3e072 100644 --- a/vendor/modernc.org/libc/errno/errno_windows_386.go +++ b/vendor/modernc.org/libc/errno/errno_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname errno', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT. package errno @@ -15,168 +15,168 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - E2BIG = 7 - EACCES = 13 - EADDRINUSE = 100 - EADDRNOTAVAIL = 101 - EAFNOSUPPORT = 102 - EAGAIN = 11 - EALREADY = 103 - EBADF = 9 - EBADMSG = 104 - EBUSY = 16 - ECANCELED = 105 - ECHILD = 10 - ECONNABORTED = 106 - ECONNREFUSED = 107 - ECONNRESET = 108 - EDEADLK = 36 - EDEADLOCK = 36 - EDESTADDRREQ = 109 - EDOM = 33 - EEXIST = 17 - EFAULT = 14 - EFBIG = 27 - EHOSTUNREACH = 110 - EIDRM = 111 - EILSEQ = 42 - EINPROGRESS = 112 - EINTR = 4 - EINVAL = 22 - EIO = 5 - EISCONN = 113 - EISDIR = 21 - ELOOP = 114 - EMFILE = 24 - EMLINK = 31 - EMSGSIZE = 115 - ENAMETOOLONG = 38 - ENETDOWN = 116 - ENETRESET = 117 - ENETUNREACH = 118 - ENFILE = 23 - ENOBUFS = 119 - ENODATA = 120 - ENODEV = 19 - ENOENT = 2 - ENOEXEC = 8 - ENOFILE = 2 - ENOLCK = 39 - ENOLINK = 121 - ENOMEM = 12 - ENOMSG = 122 - ENOPROTOOPT = 123 - ENOSPC = 28 - ENOSR = 124 - ENOSTR = 125 - ENOSYS = 40 - ENOTCONN = 126 - ENOTDIR = 20 - ENOTEMPTY = 41 - ENOTRECOVERABLE = 127 - ENOTSOCK = 128 - ENOTSUP = 129 - ENOTTY = 25 - ENXIO = 6 - EOPNOTSUPP = 130 - EOVERFLOW = 132 - EOWNERDEAD = 133 - EPERM = 1 - EPIPE = 32 - EPROTO = 134 - EPROTONOSUPPORT = 135 - EPROTOTYPE = 136 - ERANGE = 34 - EROFS = 30 - ESPIPE = 29 - ESRCH = 3 - ETIME = 137 - ETIMEDOUT = 138 - ETXTBSY = 139 - EWOULDBLOCK = 140 - EXDEV = 18 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - STRUNCATE = 80 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_ERRNO_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_ERRNO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + E2BIG = 7 // errno.h:31:1: + EACCES = 13 // errno.h:37:1: + EADDRINUSE = 100 // errno.h:86:1: + EADDRNOTAVAIL = 101 // errno.h:90:1: + EAFNOSUPPORT = 102 // errno.h:82:1: + EAGAIN = 11 // errno.h:35:1: + EALREADY = 103 // errno.h:106:1: + EBADF = 9 // errno.h:33:1: + EBADMSG = 104 // errno.h:182:1: + EBUSY = 16 // errno.h:39:1: + ECANCELED = 105 // errno.h:154:1: + ECHILD = 10 // errno.h:34:1: + ECONNABORTED = 106 // errno.h:102:1: + ECONNREFUSED = 107 // errno.h:110:1: + ECONNRESET = 108 // errno.h:114:1: + EDEADLK = 36 // errno.h:55:1: + EDEADLOCK = 36 // errno.h:71:1: + EDESTADDRREQ = 109 // errno.h:118:1: + EDOM = 33 // errno.h:54:1: + EEXIST = 17 // errno.h:40:1: + EFAULT = 14 // errno.h:38:1: + EFBIG = 27 // errno.h:48:1: + EHOSTUNREACH = 110 // errno.h:122:1: + EIDRM = 111 // errno.h:186:1: + EILSEQ = 42 // errno.h:66:1: + EINPROGRESS = 112 // errno.h:158:1: + EINTR = 4 // errno.h:28:1: + EINVAL = 22 // errno.h:64:1: + EIO = 5 // errno.h:29:1: + EISCONN = 113 // errno.h:94:1: + EISDIR = 21 // errno.h:44:1: + ELOOP = 114 // errno.h:227:1: + EMFILE = 24 // errno.h:46:1: + EMLINK = 31 // errno.h:52:1: + EMSGSIZE = 115 // errno.h:126:1: + ENAMETOOLONG = 38 // errno.h:56:1: + ENETDOWN = 116 // errno.h:130:1: + ENETRESET = 117 // errno.h:134:1: + ENETUNREACH = 118 // errno.h:138:1: + ENFILE = 23 // errno.h:45:1: + ENOBUFS = 119 // errno.h:98:1: + ENODATA = 120 // errno.h:190:1: + ENODEV = 19 // errno.h:42:1: + ENOENT = 2 // errno.h:25:1: + ENOEXEC = 8 // errno.h:32:1: + ENOFILE = 2 // errno.h:26:1: + ENOLCK = 39 // errno.h:57:1: + ENOLINK = 121 // errno.h:194:1: + ENOMEM = 12 // errno.h:36:1: + ENOMSG = 122 // errno.h:198:1: + ENOPROTOOPT = 123 // errno.h:142:1: + ENOSPC = 28 // errno.h:49:1: + ENOSR = 124 // errno.h:202:1: + ENOSTR = 125 // errno.h:206:1: + ENOSYS = 40 // errno.h:58:1: + ENOTCONN = 126 // errno.h:150:1: + ENOTDIR = 20 // errno.h:43:1: + ENOTEMPTY = 41 // errno.h:59:1: + ENOTRECOVERABLE = 127 // errno.h:210:1: + ENOTSOCK = 128 // errno.h:146:1: + ENOTSUP = 129 // errno.h:76:1: + ENOTTY = 25 // errno.h:47:1: + ENXIO = 6 // errno.h:30:1: + EOPNOTSUPP = 130 // errno.h:162:1: + EOVERFLOW = 132 // errno.h:235:1: + EOWNERDEAD = 133 // errno.h:170:1: + EPERM = 1 // errno.h:24:1: + EPIPE = 32 // errno.h:53:1: + EPROTO = 134 // errno.h:174:1: + EPROTONOSUPPORT = 135 // errno.h:178:1: + EPROTOTYPE = 136 // errno.h:231:1: + ERANGE = 34 // errno.h:65:1: + EROFS = 30 // errno.h:51:1: + ESPIPE = 29 // errno.h:50:1: + ESRCH = 3 // errno.h:27:1: + ETIME = 137 // errno.h:214:1: + ETIMEDOUT = 138 // errno.h:223:1: + ETXTBSY = 139 // errno.h:218:1: + EWOULDBLOCK = 140 // errno.h:166:1: + EXDEV = 18 // errno.h:41:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + STRUNCATE = 80 // errno.h:67:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_ERRNO_DEFINED = 0 // errno.h:16:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_ERRNO = 0 // errno.h:7:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 // errno.h:63:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -210,6 +210,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -230,6 +235,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -270,26 +281,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -315,29 +328,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // Posix thread extensions. diff --git a/vendor/modernc.org/libc/etc.go b/vendor/modernc.org/libc/etc.go index b52831972a..ca18807261 100644 --- a/vendor/modernc.org/libc/etc.go +++ b/vendor/modernc.org/libc/etc.go @@ -212,6 +212,8 @@ func (t *TLS) Close() { atomic.AddInt32(&tlsBalance, -1) } + t.pthreadData.close(t) + *t = TLS{} } // Alloc allocates n bytes of thread-local storage. It must be paired with a diff --git a/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go b/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go index bf61865dbc..768a82aa6a 100644 --- a/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. package fcntl diff --git a/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go b/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go index aa9d9c02a0..8f05715821 100644 --- a/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fcntl/fcntl_freebsd_386.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT. package fcntl diff --git a/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go b/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go index d6bfbd70d9..7e59565671 100644 --- a/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_amd64.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT. package fcntl diff --git a/vendor/modernc.org/libc/fcntl/capi_windows_386.go b/vendor/modernc.org/libc/fcntl/capi_windows_386.go index 9a3802f37d..a91731bd4a 100644 --- a/vendor/modernc.org/libc/fcntl/capi_windows_386.go +++ b/vendor/modernc.org/libc/fcntl/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT. package fcntl diff --git a/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go index 809181b835..5221b82882 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. package fcntl @@ -15,177 +15,177 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AT_EACCESS = 0x0010 - AT_FDCWD = -2 - AT_FDONLY = 0x0400 - AT_REALDEV = 0x0200 - AT_REMOVEDIR = 0x0080 - AT_SYMLINK_FOLLOW = 0x0040 - AT_SYMLINK_NOFOLLOW = 0x0020 - CPF_IGNORE_MODE = 0x0002 - CPF_MASK = 3 - CPF_OVERWRITE = 0x0001 - FAPPEND = 8 - FASYNC = 64 - FCNTL_FS_SPECIFIC_BASE = 0x00010000 - FD_CLOEXEC = 1 - FFDSYNC = 4194304 - FFSYNC = 128 - FNDELAY = 4 - FNONBLOCK = 4 - FREAD = 0x0001 - FWRITE = 0x0002 - F_ADDFILESIGS = 61 - F_ADDFILESIGS_FOR_DYLD_SIM = 83 - F_ADDFILESIGS_RETURN = 97 - F_ADDSIGS = 59 - F_ALLOCATEALL = 0x00000004 - F_ALLOCATECONTIG = 0x00000002 - F_BARRIERFSYNC = 85 - F_CHECK_LV = 98 - F_CHKCLEAN = 41 - F_DUPFD = 0 - F_DUPFD_CLOEXEC = 67 - F_FINDSIGS = 78 - F_FLUSH_DATA = 40 - F_FREEZE_FS = 53 - F_FULLFSYNC = 51 - F_GETCODEDIR = 72 - F_GETFD = 1 - F_GETFL = 3 - F_GETLK = 7 - F_GETLKPID = 66 - F_GETNOSIGPIPE = 74 - F_GETOWN = 5 - F_GETPATH = 50 - F_GETPATH_MTMINFO = 71 - F_GETPATH_NOFIRMLINK = 102 - F_GETPROTECTIONCLASS = 63 - F_GETPROTECTIONLEVEL = 77 - F_GLOBAL_NOCACHE = 55 - F_LOG2PHYS = 49 - F_LOG2PHYS_EXT = 65 - F_NOCACHE = 48 - F_NODIRECT = 62 - F_PATHPKG_CHECK = 52 - F_PEOFPOSMODE = 3 - F_PREALLOCATE = 42 - F_PUNCHHOLE = 99 - F_RDADVISE = 44 - F_RDAHEAD = 45 - F_RDLCK = 1 - F_SETBACKINGSTORE = 70 - F_SETFD = 2 - F_SETFL = 4 - F_SETLK = 8 - F_SETLKW = 9 - F_SETLKWTIMEOUT = 10 - F_SETNOSIGPIPE = 73 - F_SETOWN = 6 - F_SETPROTECTIONCLASS = 64 - F_SETSIZE = 43 - F_SINGLE_WRITER = 76 - F_SPECULATIVE_READ = 101 - F_THAW_FS = 54 - F_TRANSCODEKEY = 75 - F_TRIM_ACTIVE_FILE = 100 - F_UNLCK = 2 - F_VOLPOSMODE = 4 - F_WRLCK = 3 - LOCK_EX = 0x02 - LOCK_NB = 0x04 - LOCK_SH = 0x01 - LOCK_UN = 0x08 - O_ACCMODE = 0x0003 - O_ALERT = 0x20000000 - O_APPEND = 0x0008 - O_ASYNC = 0x0040 - O_CLOEXEC = 0x1000000 - O_CREAT = 0x0200 - O_DIRECTORY = 0x100000 - O_DP_GETRAWENCRYPTED = 0x0001 - O_DP_GETRAWUNENCRYPTED = 0x0002 - O_DSYNC = 0x400000 - O_EVTONLY = 0x8000 - O_EXCL = 0x0800 - O_EXLOCK = 0x0020 - O_FSYNC = 128 - O_NDELAY = 4 - O_NOCTTY = 0x20000 - O_NOFOLLOW = 0x0100 - O_NONBLOCK = 0x0004 - O_POPUP = 0x80000000 - O_RDONLY = 0x0000 - O_RDWR = 0x0002 - O_SHLOCK = 0x0010 - O_SYMLINK = 0x200000 - O_SYNC = 0x0080 - O_TRUNC = 0x0400 - O_WRONLY = 0x0001 - SEEK_CUR = 1 - SEEK_DATA = 4 - SEEK_END = 2 - SEEK_HOLE = 3 - SEEK_SET = 0 - S_IEXEC = 64 - S_IFBLK = 0060000 - S_IFCHR = 0020000 - S_IFDIR = 0040000 - S_IFIFO = 0010000 - S_IFLNK = 0120000 - S_IFMT = 0170000 - S_IFREG = 0100000 - S_IFSOCK = 0140000 - S_IFWHT = 0160000 - S_IREAD = 256 - S_IRGRP = 0000040 - S_IROTH = 0000004 - S_IRUSR = 0000400 - S_IRWXG = 0000070 - S_IRWXO = 0000007 - S_IRWXU = 0000700 - S_ISGID = 0002000 - S_ISTXT = 512 - S_ISUID = 0004000 - S_ISVTX = 0001000 - S_IWGRP = 0000020 - S_IWOTH = 0000002 - S_IWRITE = 128 - S_IWUSR = 0000200 - S_IXGRP = 0000010 - S_IXOTH = 0000001 - S_IXUSR = 0000100 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILESEC_T = 0 - X_FILE_OFFSET_BITS = 64 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_PID_T = 0 - X_SIZE_T = 0 - X_SYS_FCNTL_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + AT_EACCESS = 0x0010 // fcntl.h:138:1: + AT_FDCWD = -2 // fcntl.h:133:1: + AT_FDONLY = 0x0400 // fcntl.h:144:1: + AT_REALDEV = 0x0200 // fcntl.h:143:1: + AT_REMOVEDIR = 0x0080 // fcntl.h:141:1: + AT_SYMLINK_FOLLOW = 0x0040 // fcntl.h:140:1: + AT_SYMLINK_NOFOLLOW = 0x0020 // fcntl.h:139:1: + CPF_IGNORE_MODE = 0x0002 // fcntl.h:201:1: + CPF_MASK = 3 // fcntl.h:202:1: + CPF_OVERWRITE = 0x0001 // fcntl.h:200:1: + FAPPEND = 8 // fcntl.h:186:1: + FASYNC = 64 // fcntl.h:187:1: + FCNTL_FS_SPECIFIC_BASE = 0x00010000 // fcntl.h:297:1: + FD_CLOEXEC = 1 // fcntl.h:306:1: + FFDSYNC = 4194304 // fcntl.h:189:1: + FFSYNC = 128 // fcntl.h:188:1: + FNDELAY = 4 // fcntl.h:191:1: + FNONBLOCK = 4 // fcntl.h:190:1: + FREAD = 0x0001 // fcntl.h:110:1: + FWRITE = 0x0002 // fcntl.h:111:1: + F_ADDFILESIGS = 61 // fcntl.h:246:1: + F_ADDFILESIGS_FOR_DYLD_SIM = 83 // fcntl.h:279:1: + F_ADDFILESIGS_RETURN = 97 // fcntl.h:285:1: + F_ADDSIGS = 59 // fcntl.h:243:1: + F_ALLOCATEALL = 0x00000004 // fcntl.h:330:1: + F_ALLOCATECONTIG = 0x00000002 // fcntl.h:329:1: + F_BARRIERFSYNC = 85 // fcntl.h:282:1: + F_CHECK_LV = 98 // fcntl.h:286:1: + F_CHKCLEAN = 41 // fcntl.h:225:1: + F_DUPFD = 0 // fcntl.h:210:1: + F_DUPFD_CLOEXEC = 67 // fcntl.h:302:1: + F_FINDSIGS = 78 // fcntl.h:276:1: + F_FLUSH_DATA = 40 // fcntl.h:224:1: + F_FREEZE_FS = 53 // fcntl.h:238:1: + F_FULLFSYNC = 51 // fcntl.h:236:1: + F_GETCODEDIR = 72 // fcntl.h:264:1: + F_GETFD = 1 // fcntl.h:211:1: + F_GETFL = 3 // fcntl.h:213:1: + F_GETLK = 7 // fcntl.h:217:1: + F_GETLKPID = 66 // fcntl.h:256:1: + F_GETNOSIGPIPE = 74 // fcntl.h:267:1: + F_GETOWN = 5 // fcntl.h:215:1: + F_GETPATH = 50 // fcntl.h:235:1: + F_GETPATH_MTMINFO = 71 // fcntl.h:262:1: + F_GETPATH_NOFIRMLINK = 102 // fcntl.h:294:1: + F_GETPROTECTIONCLASS = 63 // fcntl.h:251:1: + F_GETPROTECTIONLEVEL = 77 // fcntl.h:274:1: + F_GLOBAL_NOCACHE = 55 // fcntl.h:240:1: + F_LOG2PHYS = 49 // fcntl.h:234:1: + F_LOG2PHYS_EXT = 65 // fcntl.h:254:1: + F_NOCACHE = 48 // fcntl.h:233:1: + F_NODIRECT = 62 // fcntl.h:248:1: + F_PATHPKG_CHECK = 52 // fcntl.h:237:1: + F_PEOFPOSMODE = 3 // fcntl.h:334:1: + F_PREALLOCATE = 42 // fcntl.h:226:1: + F_PUNCHHOLE = 99 // fcntl.h:288:1: + F_RDADVISE = 44 // fcntl.h:228:1: + F_RDAHEAD = 45 // fcntl.h:229:1: + F_RDLCK = 1 // fcntl.h:309:1: + F_SETBACKINGSTORE = 70 // fcntl.h:261:1: + F_SETFD = 2 // fcntl.h:212:1: + F_SETFL = 4 // fcntl.h:214:1: + F_SETLK = 8 // fcntl.h:218:1: + F_SETLKW = 9 // fcntl.h:219:1: + F_SETLKWTIMEOUT = 10 // fcntl.h:221:1: + F_SETNOSIGPIPE = 73 // fcntl.h:266:1: + F_SETOWN = 6 // fcntl.h:216:1: + F_SETPROTECTIONCLASS = 64 // fcntl.h:252:1: + F_SETSIZE = 43 // fcntl.h:227:1: + F_SINGLE_WRITER = 76 // fcntl.h:271:1: + F_SPECULATIVE_READ = 101 // fcntl.h:292:1: + F_THAW_FS = 54 // fcntl.h:239:1: + F_TRANSCODEKEY = 75 // fcntl.h:269:1: + F_TRIM_ACTIVE_FILE = 100 // fcntl.h:290:1: + F_UNLCK = 2 // fcntl.h:310:1: + F_VOLPOSMODE = 4 // fcntl.h:336:1: + F_WRLCK = 3 // fcntl.h:311:1: + LOCK_EX = 0x02 // fcntl.h:421:1: + LOCK_NB = 0x04 // fcntl.h:422:1: + LOCK_SH = 0x01 // fcntl.h:420:1: + LOCK_UN = 0x08 // fcntl.h:423:1: + O_ACCMODE = 0x0003 // fcntl.h:99:1: + O_ALERT = 0x20000000 // fcntl.h:502:1: + O_APPEND = 0x0008 // fcntl.h:114:1: + O_ASYNC = 0x0040 // fcntl.h:121:1: + O_CLOEXEC = 0x1000000 // fcntl.h:165:1: + O_CREAT = 0x0200 // fcntl.h:125:1: + O_DIRECTORY = 0x100000 // fcntl.h:157:1: + O_DP_GETRAWENCRYPTED = 0x0001 // fcntl.h:174:1: + O_DP_GETRAWUNENCRYPTED = 0x0002 // fcntl.h:175:1: + O_DSYNC = 0x400000 // _o_dsync.h:29:1: + O_EVTONLY = 0x8000 // fcntl.h:149:1: + O_EXCL = 0x0800 // fcntl.h:127:1: + O_EXLOCK = 0x0020 // fcntl.h:120:1: + O_FSYNC = 128 // fcntl.h:122:1: + O_NDELAY = 4 // fcntl.h:192:1: + O_NOCTTY = 0x20000 // fcntl.h:153:1: + O_NOFOLLOW = 0x0100 // fcntl.h:123:1: + O_NONBLOCK = 0x0004 // fcntl.h:113:1: + O_POPUP = 0x80000000 // fcntl.h:501:1: + O_RDONLY = 0x0000 // fcntl.h:96:1: + O_RDWR = 0x0002 // fcntl.h:98:1: + O_SHLOCK = 0x0010 // fcntl.h:119:1: + O_SYMLINK = 0x200000 // fcntl.h:158:1: + O_SYNC = 0x0080 // _o_sync.h:29:1: + O_TRUNC = 0x0400 // fcntl.h:126:1: + O_WRONLY = 0x0001 // fcntl.h:97:1: + SEEK_CUR = 1 // _seek_set.h:34:1: + SEEK_DATA = 4 // _seek_set.h:44:1: + SEEK_END = 2 // _seek_set.h:35:1: + SEEK_HOLE = 3 // _seek_set.h:40:1: + SEEK_SET = 0 // _seek_set.h:33:1: + S_IEXEC = 64 // _s_ifmt.h:72:1: + S_IFBLK = 0060000 // _s_ifmt.h:39:1: + S_IFCHR = 0020000 // _s_ifmt.h:37:1: + S_IFDIR = 0040000 // _s_ifmt.h:38:1: + S_IFIFO = 0010000 // _s_ifmt.h:36:1: + S_IFLNK = 0120000 // _s_ifmt.h:41:1: + S_IFMT = 0170000 // _s_ifmt.h:35:1: + S_IFREG = 0100000 // _s_ifmt.h:40:1: + S_IFSOCK = 0140000 // _s_ifmt.h:42:1: + S_IFWHT = 0160000 // _s_ifmt.h:44:1: + S_IREAD = 256 // _s_ifmt.h:70:1: + S_IRGRP = 0000040 // _s_ifmt.h:55:1: + S_IROTH = 0000004 // _s_ifmt.h:60:1: + S_IRUSR = 0000400 // _s_ifmt.h:50:1: + S_IRWXG = 0000070 // _s_ifmt.h:54:1: + S_IRWXO = 0000007 // _s_ifmt.h:59:1: + S_IRWXU = 0000700 // _s_ifmt.h:49:1: + S_ISGID = 0002000 // _s_ifmt.h:65:1: + S_ISTXT = 512 // _s_ifmt.h:69:1: + S_ISUID = 0004000 // _s_ifmt.h:64:1: + S_ISVTX = 0001000 // _s_ifmt.h:66:1: + S_IWGRP = 0000020 // _s_ifmt.h:56:1: + S_IWOTH = 0000002 // _s_ifmt.h:61:1: + S_IWRITE = 128 // _s_ifmt.h:71:1: + S_IWUSR = 0000200 // _s_ifmt.h:51:1: + S_IXGRP = 0000010 // _s_ifmt.h:57:1: + S_IXOTH = 0000001 // _s_ifmt.h:62:1: + S_IXUSR = 0000100 // _s_ifmt.h:52:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILESEC_T = 0 // _filesec_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:71:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) const ( /* fcntl.h:512:1: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go index 7402dfecac..6ed4d22bd5 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fcntl/fcntl_freebsd_386.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT. package fcntl @@ -15,109 +15,100 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AT_EACCESS = 0x0100 // fcntl.h:224:1: - AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1: - AT_FDCWD = -100 // fcntl.h:219:1: - AT_REMOVEDIR = 0x0800 // fcntl.h:228:1: - AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1: - AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1: - AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1: - FAPPEND = 8 // fcntl.h:193:1: - FASYNC = 64 // fcntl.h:194:1: - FDSYNC = 16777216 // fcntl.h:196:1: - FD_CLOEXEC = 1 // fcntl.h:283:1: - FD_NONE = -200 // fcntl.h:355:1: - FFSYNC = 128 // fcntl.h:195:1: - FNDELAY = 4 // fcntl.h:198:1: - FNONBLOCK = 4 // fcntl.h:197:1: - FRDAHEAD = 512 // fcntl.h:210:1: - FREAD = 0x0001 // fcntl.h:89:1: - FWRITE = 0x0002 // fcntl.h:90:1: - F_ADD_SEALS = 19 // fcntl.h:270:1: - F_CANCEL = 5 // fcntl.h:291:1: - F_DUP2FD = 10 // fcntl.h:255:1: - F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1: - F_DUPFD = 0 // fcntl.h:242:1: - F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1: - F_GETFD = 1 // fcntl.h:243:1: - F_GETFL = 3 // fcntl.h:245:1: - F_GETLK = 11 // fcntl.h:257:1: - F_GETOWN = 5 // fcntl.h:248:1: - F_GET_SEALS = 20 // fcntl.h:271:1: - F_ISUNIONSTACK = 21 // fcntl.h:272:1: - F_KINFO = 22 // fcntl.h:273:1: - F_OGETLK = 7 // fcntl.h:252:1: - F_OSETLK = 8 // fcntl.h:253:1: - F_OSETLKW = 9 // fcntl.h:254:1: - F_RDAHEAD = 16 // fcntl.h:263:1: - F_RDLCK = 1 // fcntl.h:286:1: - F_READAHEAD = 15 // fcntl.h:262:1: - F_SEAL_GROW = 0x0004 // fcntl.h:278:1: - F_SEAL_SEAL = 0x0001 // fcntl.h:276:1: - F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1: - F_SEAL_WRITE = 0x0008 // fcntl.h:279:1: - F_SETFD = 2 // fcntl.h:244:1: - F_SETFL = 4 // fcntl.h:246:1: - F_SETLK = 12 // fcntl.h:258:1: - F_SETLKW = 13 // fcntl.h:259:1: - F_SETLK_REMOTE = 14 // fcntl.h:261:1: - F_SETOWN = 6 // fcntl.h:249:1: - F_UNLCK = 2 // fcntl.h:287:1: - F_UNLCKSYS = 4 // fcntl.h:290:1: - F_WRLCK = 3 // fcntl.h:288:1: - LOCK_EX = 0x02 // fcntl.h:332:1: - LOCK_NB = 0x04 // fcntl.h:333:1: - LOCK_SH = 0x01 // fcntl.h:331:1: - LOCK_UN = 0x08 // fcntl.h:334:1: - O_ACCMODE = 0x0003 // fcntl.h:78:1: - O_APPEND = 0x0008 // fcntl.h:93:1: - O_ASYNC = 0x0040 // fcntl.h:97:1: - O_CLOEXEC = 0x00100000 // fcntl.h:133:1: - O_CREAT = 0x0200 // fcntl.h:104:1: - O_DIRECT = 0x00010000 // fcntl.h:116:1: - O_DIRECTORY = 0x00020000 // fcntl.h:120:1: - O_DSYNC = 0x01000000 // fcntl.h:143:1: - O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1: - O_EXCL = 0x0800 // fcntl.h:106:1: - O_EXEC = 0x00040000 // fcntl.h:121:1: - O_EXLOCK = 0x0020 // fcntl.h:96:1: - O_FSYNC = 0x0080 // fcntl.h:98:1: - O_NDELAY = 4 // fcntl.h:199:1: - O_NOCTTY = 0x8000 // fcntl.h:112:1: - O_NOFOLLOW = 0x0100 // fcntl.h:102:1: - O_NONBLOCK = 0x0004 // fcntl.h:92:1: - O_PATH = 0x00400000 // fcntl.h:138:1: - O_RDONLY = 0x0000 // fcntl.h:75:1: - O_RDWR = 0x0002 // fcntl.h:77:1: - O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1: - O_SEARCH = 262144 // fcntl.h:122:1: - O_SHLOCK = 0x0010 // fcntl.h:95:1: - O_SYNC = 0x0080 // fcntl.h:100:1: - O_TRUNC = 0x0400 // fcntl.h:105:1: - O_TTY_INIT = 0x00080000 // fcntl.h:131:1: - O_VERIFY = 0x00200000 // fcntl.h:137:1: - O_WRONLY = 0x0001 // fcntl.h:76:1: - POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1: - POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1: - POSIX_FADV_NORMAL = 0 // fcntl.h:341:1: - POSIX_FADV_RANDOM = 1 // fcntl.h:342:1: - POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1: - POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MODE_T_DECLARED = 0 // fcntl.h:54:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF_T_DECLARED = 0 // fcntl.h:59:1: - X_PID_T_DECLARED = 0 // fcntl.h:64:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + AT_EACCESS = 0x01 // fcntl.h:200:1: + AT_FDCWD = -100 // fcntl.h:198:1: + AT_REMOVEDIR = 0x08 // fcntl.h:203:1: + AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1: + AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + FAPPEND = 8 // fcntl.h:130:1: + FASYNC = 64 // fcntl.h:131:1: + FD_CLOEXEC = 1 // fcntl.h:163:1: + FFSYNC = 128 // fcntl.h:132:1: + FNDELAY = 4 // fcntl.h:134:1: + FNONBLOCK = 4 // fcntl.h:133:1: + FREAD = 0x0001 // fcntl.h:76:1: + FWRITE = 0x0002 // fcntl.h:77:1: + F_DUPFD = 0 // fcntl.h:143:1: + F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1: + F_GETFD = 1 // fcntl.h:144:1: + F_GETFL = 3 // fcntl.h:146:1: + F_GETLK = 7 // fcntl.h:152:1: + F_GETOWN = 5 // fcntl.h:149:1: + F_ISATTY = 11 // fcntl.h:159:1: + F_RDLCK = 1 // fcntl.h:166:1: + F_SETFD = 2 // fcntl.h:145:1: + F_SETFL = 4 // fcntl.h:147:1: + F_SETLK = 8 // fcntl.h:153:1: + F_SETLKW = 9 // fcntl.h:154:1: + F_SETOWN = 6 // fcntl.h:150:1: + F_UNLCK = 2 // fcntl.h:167:1: + F_WRLCK = 3 // fcntl.h:168:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + LOCK_EX = 0x02 // fcntl.h:192:1: + LOCK_NB = 0x04 // fcntl.h:193:1: + LOCK_SH = 0x01 // fcntl.h:191:1: + LOCK_UN = 0x08 // fcntl.h:194:1: + O_ACCMODE = 0x0003 // fcntl.h:65:1: + O_APPEND = 0x0008 // fcntl.h:80:1: + O_ASYNC = 0x0040 // fcntl.h:84:1: + O_CLOEXEC = 0x10000 // fcntl.h:107:1: + O_CREAT = 0x0200 // fcntl.h:91:1: + O_DIRECTORY = 0x20000 // fcntl.h:108:1: + O_DSYNC = 128 // fcntl.h:100:1: + O_EXCL = 0x0800 // fcntl.h:93:1: + O_EXLOCK = 0x0020 // fcntl.h:83:1: + O_FSYNC = 0x0080 // fcntl.h:85:1: + O_NDELAY = 4 // fcntl.h:135:1: + O_NOCTTY = 0x8000 // fcntl.h:104:1: + O_NOFOLLOW = 0x0100 // fcntl.h:86:1: + O_NONBLOCK = 0x0004 // fcntl.h:79:1: + O_RDONLY = 0x0000 // fcntl.h:62:1: + O_RDWR = 0x0002 // fcntl.h:64:1: + O_RSYNC = 128 // fcntl.h:101:1: + O_SHLOCK = 0x0010 // fcntl.h:82:1: + O_SYNC = 0x0080 // fcntl.h:89:1: + O_TRUNC = 0x0400 // fcntl.h:92:1: + O_WRONLY = 0x0001 // fcntl.h:63:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -129,9 +120,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $ +// $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1983, 1990, 1993 // The Regents of the University of California. All rights reserved. // (c) UNIX System Laboratories, Inc. @@ -165,15 +157,14 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // @(#)fcntl.h 8.3 (Berkeley) 1/21/94 -// $FreeBSD$ // This file includes the definitions for open and fcntl // described by POSIX for ; it also includes // related kernel definitions. -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -204,63 +195,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Testing against Clang-specific extensions. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. - -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -289,118 +256,120 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function attempts to acquire an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function releases a lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function asserts that an exclusive or shared lock is held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function requires that an exclusive or shared lock is or is not held. +// Default values. -// Function should not be analyzed. +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. +// - +// Copyright (c) 1982, 1986, 1991, 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. +// 3. 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -410,11 +379,14 @@ type X__float128 = float64 /* :47:21 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -423,11 +395,44 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -458,17 +463,40 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. // -// Copyright (c) 2002 Mike Barcroft +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ + +// - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -480,11 +508,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -500,18 +524,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -538,160 +556,218 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// max value for an unsigned long long +// Tell sys/endian.h we have MD variants of the swap macros. -// Minimum signal stack size. +// Note that these macros evaluate their arguments several times. -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// Public names -type X__int64_t = int64 /* _types.h:66:20 */ +// These are specified to be function-like macros to match the spec -type X__uint64_t = uint64 /* _types.h:68:28 */ +// POSIX names -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -type Mode_t = X__mode_t /* fcntl.h:53:18 */ +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -type Off_t = X__off_t /* fcntl.h:58:18 */ +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ -type Pid_t = X__pid_t /* fcntl.h:63:18 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. // File status flags: these are used by open(2), fcntl(2). // They are also used (indirectly) in the kernel file structure f_flags, @@ -707,37 +783,22 @@ type Pid_t = X__pid_t /* fcntl.h:63:18 */ // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, // which was documented to use FREAD/FWRITE, continues to work. -// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. - -// Attempt to bypass buffer cache +// POSIX 1003.1 specifies a higher granularity for synchronous operations +// than we support. Since synchronicity is all or nothing in OpenBSD +// we just define these to be the same as O_SYNC. -// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. +// defined by POSIX 1003.1; BSD default, this bit is not required -// XXX missing O_RSYNC. +// defined by POSIX Issue 7 // The O_* flags used to have only F* names, which were used in the kernel -// and by fcntl. We retain the F* names for the kernel f_flag field -// and for backward compatibility for fcntl. These flags are deprecated. - -// Historically, we ran out of bits in f_flag (which was once a short). -// However, the flag bits not set in FMASK are only meaningful in the -// initial open syscall. Those bits were thus given a -// different meaning for fcntl(2). -// Read ahead - -// Magic value that specify the use of the current working directory -// to determine the target of relative file paths in the openat() and -// similar syscalls. - -// Miscellaneous flags for the *at() syscalls. -/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH +// and by fcntl. We retain the F* names for the kernel f_flags field +// and for backward compatibility for fcntl. // Constants used for fcntl(2) // command values -// Seals (F_ADD_SEALS, F_GET_SEALS). - // file descriptor flags (F_GETFD, F_SETFD) // record locking flags (F_GETLK, F_SETLK, F_SETLKW) @@ -750,17 +811,6 @@ type Flock = struct { Fl_pid Pid_t Fl_type int16 Fl_whence int16 - Fl_sysid int32 -} /* fcntl.h:306:1 */ - -// Old advisory file segment locking data type, -// before adding l_sysid. -type X__oflock = struct { - Fl_start Off_t - Fl_len Off_t - Fl_pid Pid_t - Fl_type int16 - Fl_whence int16 -} /* fcntl.h:320:1 */ +} /* fcntl.h:180:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go index 47b82df8cb..15ebbbd42d 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go @@ -74,8 +74,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -87,14 +87,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -102,13 +102,13 @@ const ( X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -333,7 +333,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -503,7 +503,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -663,18 +663,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -756,27 +755,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go index 47b82df8cb..ef4fd3307e 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_amd64.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT. package fcntl @@ -73,9 +73,9 @@ const ( O_WRONLY = 0x0001 // fcntl.h:63:1: PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -83,32 +83,32 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -206,10 +206,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -333,7 +330,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -503,7 +500,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -535,8 +532,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -578,66 +574,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -663,18 +661,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -756,27 +753,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go b/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go index ef167d4008..0055eedf26 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname fcntl', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT. package fcntl @@ -15,148 +15,148 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - F_OK = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - O_ACCMODE = 3 - O_APPEND = 8 - O_BINARY = 32768 - O_CREAT = 256 - O_EXCL = 1024 - O_NOINHERIT = 128 - O_RANDOM = 16 - O_RAW = 32768 - O_RDONLY = 0 - O_RDWR = 2 - O_SEQUENTIAL = 32 - O_TEMPORARY = 64 - O_TEXT = 16384 - O_TRUNC = 512 - O_WRONLY = 1 - R_OK = 4 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - W_OK = 2 - X_OK = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_A_ARCH = 0x20 - X_A_HIDDEN = 0x02 - X_A_NORMAL = 0x00 - X_A_RDONLY = 0x01 - X_A_SUBDIR = 0x10 - X_A_SYSTEM = 0x04 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_MEMORY_DEFINED = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_LSEEK = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FINDDATA_T_DEFINED = 0 - X_FSIZE_T_DEFINED = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_FCNTL = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STRING = 0 - X_INC_STRING_S = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IO_H_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_NLSCMPERROR = 2147483647 - X_NLSCMP_DEFINED = 0 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_O_ACCMODE = 3 - X_O_APPEND = 0x0008 - X_O_BINARY = 0x8000 - X_O_CREAT = 0x0100 - X_O_EXCL = 0x0400 - X_O_NOINHERIT = 0x0080 - X_O_RANDOM = 0x0010 - X_O_RAW = 32768 - X_O_RDONLY = 0x0000 - X_O_RDWR = 0x0002 - X_O_SEQUENTIAL = 0x0020 - X_O_SHORT_LIVED = 0x1000 - X_O_TEMPORARY = 0x0040 - X_O_TEXT = 0x4000 - X_O_TRUNC = 0x0200 - X_O_U16TEXT = 0x20000 - X_O_U8TEXT = 0x40000 - X_O_WRONLY = 0x0001 - X_O_WTEXT = 0x10000 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WConst_return = 0 - X_WFINDDATA_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WIO_DEFINED = 0 - X_WSTRING_DEFINED = 0 - X_WSTRING_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + F_OK = 0 // io.h:182:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + O_ACCMODE = 3 // fcntl.h:50:1: + O_APPEND = 8 // fcntl.h:39:1: + O_BINARY = 32768 // fcntl.h:44:1: + O_CREAT = 256 // fcntl.h:40:1: + O_EXCL = 1024 // fcntl.h:42:1: + O_NOINHERIT = 128 // fcntl.h:47:1: + O_RANDOM = 16 // fcntl.h:49:1: + O_RAW = 32768 // fcntl.h:45:1: + O_RDONLY = 0 // fcntl.h:36:1: + O_RDWR = 2 // fcntl.h:38:1: + O_SEQUENTIAL = 32 // fcntl.h:48:1: + O_TEMPORARY = 64 // fcntl.h:46:1: + O_TEXT = 16384 // fcntl.h:43:1: + O_TRUNC = 512 // fcntl.h:41:1: + O_WRONLY = 1 // fcntl.h:37:1: + R_OK = 4 // io.h:185:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + W_OK = 2 // io.h:184:1: + X_OK = 1 // io.h:183:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_A_ARCH = 0x20 // io.h:156:1: + X_A_HIDDEN = 0x02 // io.h:153:1: + X_A_NORMAL = 0x00 // io.h:151:1: + X_A_RDONLY = 0x01 // io.h:152:1: + X_A_SUBDIR = 0x10 // io.h:155:1: + X_A_SYSTEM = 0x04 // io.h:154:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_MEMORY_DEFINED = 0 // string.h:44:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FINDDATA_T_DEFINED = 0 // io.h:89:1: + X_FSIZE_T_DEFINED = 0 // io.h:30:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_FCNTL = 0 // fcntl.h:11:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STRING = 0 // string.h:7:1: + X_INC_STRING_S = 0 // string_s.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IO_H_ = 0 // io.h:7:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NLSCMPERROR = 2147483647 // string.h:26:1: + X_NLSCMP_DEFINED = 0 // string.h:25:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_O_ACCMODE = 3 // fcntl.h:25:1: + X_O_APPEND = 0x0008 // fcntl.h:16:1: + X_O_BINARY = 0x8000 // fcntl.h:21:1: + X_O_CREAT = 0x0100 // fcntl.h:17:1: + X_O_EXCL = 0x0400 // fcntl.h:19:1: + X_O_NOINHERIT = 0x0080 // fcntl.h:28:1: + X_O_RANDOM = 0x0010 // fcntl.h:33:1: + X_O_RAW = 32768 // fcntl.h:27:1: + X_O_RDONLY = 0x0000 // fcntl.h:13:1: + X_O_RDWR = 0x0002 // fcntl.h:15:1: + X_O_SEQUENTIAL = 0x0020 // fcntl.h:32:1: + X_O_SHORT_LIVED = 0x1000 // fcntl.h:30:1: + X_O_TEMPORARY = 0x0040 // fcntl.h:29:1: + X_O_TEXT = 0x4000 // fcntl.h:20:1: + X_O_TRUNC = 0x0200 // fcntl.h:18:1: + X_O_U16TEXT = 0x20000 // fcntl.h:23:1: + X_O_U8TEXT = 0x40000 // fcntl.h:24:1: + X_O_WRONLY = 0x0001 // fcntl.h:14:1: + X_O_WTEXT = 0x10000 // fcntl.h:22:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WConst_return = 0 // string.h:41:1: + X_WFINDDATA_T_DEFINED = 0 // io.h:148:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WIO_DEFINED = 0 // io.h:295:1: + X_WSTRING_DEFINED = 0 // string.h:129:1: + X_WSTRING_S_DEFINED = 0 // string_s.h:48:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -189,6 +189,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -209,6 +214,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -249,26 +260,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -294,29 +307,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_fsize_t = uint32 /* io.h:29:25 */ type X_finddata32_t = struct { diff --git a/vendor/modernc.org/libc/fts/capi_darwin_amd64.go b/vendor/modernc.org/libc/fts/capi_darwin_amd64.go index 46344857a9..71d2f55c47 100644 --- a/vendor/modernc.org/libc/fts/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/fts/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname fts', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT. package fts diff --git a/vendor/modernc.org/libc/fts/capi_openbsd_386.go b/vendor/modernc.org/libc/fts/capi_openbsd_386.go index 1ca9e17180..a3e34da866 100644 --- a/vendor/modernc.org/libc/fts/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/fts/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fts/fts_freebsd_386.go -pkgname fts', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fts/fts_openbsd_386.go -pkgname fts', DO NOT EDIT. package fts diff --git a/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go b/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go index bedf2641f1..983e56304b 100644 --- a/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fts/fts_openbsd_amd64.go -pkgname fts', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fts/fts_openbsd_arm64.go -pkgname fts', DO NOT EDIT. package fts diff --git a/vendor/modernc.org/libc/fts/fts_darwin_amd64.go b/vendor/modernc.org/libc/fts/fts_darwin_amd64.go index ef7479e784..efe8194337 100644 --- a/vendor/modernc.org/libc/fts/fts_darwin_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname fts', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT. package fts @@ -15,185 +15,185 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSPERMS = 511 - ALLPERMS = 4095 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - DEFFILEMODE = 438 - EF_IS_PURGEABLE = 0x00000008 - EF_IS_SPARSE = 0x00000010 - EF_IS_SYNC_ROOT = 0x00000004 - EF_MAY_SHARE_BLOCKS = 0x00000001 - EF_NO_XATTRS = 0x00000002 - FD_SETSIZE = 1024 - FTS_AGAIN = 1 - FTS_BLOCK_COMPAR = 0x80000000 - FTS_COMFOLLOW = 0x001 - FTS_COMFOLLOWDIR = 0x400 - 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_ISW = 0x04 - FTS_LOGICAL = 0x002 - FTS_MAXLEVEL = 0x7fffffff - FTS_NAMEONLY = 0x100 - FTS_NOCHDIR = 0x004 - FTS_NOINSTR = 3 - FTS_NOSTAT = 0x008 - FTS_NOSTAT_TYPE = 0x800 - FTS_NS = 10 - FTS_NSOK = 11 - FTS_OPTIONMASK = 0xcff - FTS_PHYSICAL = 0x010 - FTS_ROOTLEVEL = 0 - FTS_ROOTPARENTLEVEL = -1 - FTS_SEEDOT = 0x020 - FTS_SKIP = 4 - FTS_SL = 12 - FTS_SLNONE = 13 - FTS_STOP = 0x200 - FTS_SYMFOLLOW = 0x02 - FTS_W = 14 - FTS_WHITEOUT = 0x080 - FTS_XDEV = 0x040 - LITTLE_ENDIAN = 1234 - NBBY = 8 - PDP_ENDIAN = 3412 - SF_APPEND = 0x00040000 - SF_ARCHIVED = 0x00010000 - SF_DATALESS = 0x40000000 - SF_FIRMLINK = 0x00800000 - SF_IMMUTABLE = 0x00020000 - SF_NOUNLINK = 0x00100000 - SF_RESTRICTED = 0x00080000 - SF_SETTABLE = 0x3fff0000 - SF_SUPPORTED = 0x009f0000 - SF_SYNTHETIC = 0xc0000000 - S_BLKSIZE = 512 - S_IEXEC = 64 - S_IFBLK = 0060000 - S_IFCHR = 0020000 - S_IFDIR = 0040000 - S_IFIFO = 0010000 - S_IFLNK = 0120000 - S_IFMT = 0170000 - S_IFREG = 0100000 - S_IFSOCK = 0140000 - S_IFWHT = 0160000 - S_IREAD = 256 - S_IRGRP = 0000040 - S_IROTH = 0000004 - S_IRUSR = 0000400 - S_IRWXG = 0000070 - S_IRWXO = 0000007 - S_IRWXU = 0000700 - S_ISGID = 0002000 - S_ISTXT = 512 - S_ISUID = 0004000 - S_ISVTX = 0001000 - S_IWGRP = 0000020 - S_IWOTH = 0000002 - S_IWRITE = 128 - S_IWUSR = 0000200 - S_IXGRP = 0000010 - S_IXOTH = 0000001 - S_IXUSR = 0000100 - UF_APPEND = 0x00000004 - UF_COMPRESSED = 0x00000020 - UF_DATAVAULT = 0x00000080 - UF_HIDDEN = 0x00008000 - UF_IMMUTABLE = 0x00000002 - UF_NODUMP = 0x00000001 - UF_OPAQUE = 0x00000008 - UF_SETTABLE = 0x0000ffff - UF_TRACKED = 0x00000040 - UTIME_NOW = -1 - UTIME_OMIT = -2 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILESEC_T = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_FTS_H_ = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_SUSECONDS_T = 0 - X_SYS_STAT_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 + ACCESSPERMS = 511 // stat.h:297:1: + ALLPERMS = 4095 // stat.h:299:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + DEFFILEMODE = 438 // stat.h:301:1: + EF_IS_PURGEABLE = 0x00000008 // stat.h:370:1: + EF_IS_SPARSE = 0x00000010 // stat.h:371:1: + EF_IS_SYNC_ROOT = 0x00000004 // stat.h:369:1: + EF_MAY_SHARE_BLOCKS = 0x00000001 // stat.h:367:1: + EF_NO_XATTRS = 0x00000002 // stat.h:368:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + FTS_AGAIN = 1 // fts.h:156:1: + FTS_BLOCK_COMPAR = 0x80000000 // fts.h:108:1: + FTS_COMFOLLOW = 0x001 // fts.h:89:1: + FTS_COMFOLLOWDIR = 0x400 // fts.h:97:1: + FTS_D = 1 // fts.h:135:1: + FTS_DC = 2 // fts.h:136:1: + FTS_DEFAULT = 3 // fts.h:137:1: + FTS_DNR = 4 // fts.h:138:1: + FTS_DONTCHDIR = 0x01 // fts.h:151:1: + FTS_DOT = 5 // fts.h:139:1: + FTS_DP = 6 // fts.h:140:1: + FTS_ERR = 7 // fts.h:141:1: + FTS_F = 8 // fts.h:142:1: + FTS_FOLLOW = 2 // fts.h:157:1: + FTS_INIT = 9 // fts.h:143:1: + FTS_ISW = 0x04 // fts.h:153:1: + FTS_LOGICAL = 0x002 // fts.h:90:1: + FTS_MAXLEVEL = 0x7fffffff // fts.h:132:1: + FTS_NAMEONLY = 0x100 // fts.h:105:1: + FTS_NOCHDIR = 0x004 // fts.h:91:1: + FTS_NOINSTR = 3 // fts.h:158:1: + FTS_NOSTAT = 0x008 // fts.h:92:1: + FTS_NOSTAT_TYPE = 0x800 // fts.h:101:1: + FTS_NS = 10 // fts.h:144:1: + FTS_NSOK = 11 // fts.h:145:1: + FTS_OPTIONMASK = 0xcff // fts.h:102:1: + FTS_PHYSICAL = 0x010 // fts.h:93:1: + FTS_ROOTLEVEL = 0 // fts.h:131:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:130:1: + FTS_SEEDOT = 0x020 // fts.h:94:1: + FTS_SKIP = 4 // fts.h:159:1: + FTS_SL = 12 // fts.h:146:1: + FTS_SLNONE = 13 // fts.h:147:1: + FTS_STOP = 0x200 // fts.h:106:1: + FTS_SYMFOLLOW = 0x02 // fts.h:152:1: + FTS_W = 14 // fts.h:148:1: + FTS_WHITEOUT = 0x080 // fts.h:96:1: + FTS_XDEV = 0x040 // fts.h:95:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + NBBY = 8 // types.h:186:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + SF_APPEND = 0x00040000 // stat.h:340:1: + SF_ARCHIVED = 0x00010000 // stat.h:338:1: + SF_DATALESS = 0x40000000 // stat.h:359:1: + SF_FIRMLINK = 0x00800000 // stat.h:351:1: + SF_IMMUTABLE = 0x00020000 // stat.h:339:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_RESTRICTED = 0x00080000 // stat.h:341:1: + SF_SETTABLE = 0x3fff0000 // stat.h:336:1: + SF_SUPPORTED = 0x009f0000 // stat.h:335:1: + SF_SYNTHETIC = 0xc0000000 // stat.h:337:1: + S_BLKSIZE = 512 // stat.h:303:1: + S_IEXEC = 64 // _s_ifmt.h:72:1: + S_IFBLK = 0060000 // _s_ifmt.h:39:1: + S_IFCHR = 0020000 // _s_ifmt.h:37:1: + S_IFDIR = 0040000 // _s_ifmt.h:38:1: + S_IFIFO = 0010000 // _s_ifmt.h:36:1: + S_IFLNK = 0120000 // _s_ifmt.h:41:1: + S_IFMT = 0170000 // _s_ifmt.h:35:1: + S_IFREG = 0100000 // _s_ifmt.h:40:1: + S_IFSOCK = 0140000 // _s_ifmt.h:42:1: + S_IFWHT = 0160000 // _s_ifmt.h:44:1: + S_IREAD = 256 // _s_ifmt.h:70:1: + S_IRGRP = 0000040 // _s_ifmt.h:55:1: + S_IROTH = 0000004 // _s_ifmt.h:60:1: + S_IRUSR = 0000400 // _s_ifmt.h:50:1: + S_IRWXG = 0000070 // _s_ifmt.h:54:1: + S_IRWXO = 0000007 // _s_ifmt.h:59:1: + S_IRWXU = 0000700 // _s_ifmt.h:49:1: + S_ISGID = 0002000 // _s_ifmt.h:65:1: + S_ISTXT = 512 // _s_ifmt.h:69:1: + S_ISUID = 0004000 // _s_ifmt.h:64:1: + S_ISVTX = 0001000 // _s_ifmt.h:66:1: + S_IWGRP = 0000020 // _s_ifmt.h:56:1: + S_IWOTH = 0000002 // _s_ifmt.h:61:1: + S_IWRITE = 128 // _s_ifmt.h:71:1: + S_IWUSR = 0000200 // _s_ifmt.h:51:1: + S_IXGRP = 0000010 // _s_ifmt.h:57:1: + S_IXOTH = 0000001 // _s_ifmt.h:62:1: + S_IXUSR = 0000100 // _s_ifmt.h:52:1: + UF_APPEND = 0x00000004 // stat.h:313:1: + UF_COMPRESSED = 0x00000020 // stat.h:320:1: + UF_DATAVAULT = 0x00000080 // stat.h:326:1: + UF_HIDDEN = 0x00008000 // stat.h:330:1: + UF_IMMUTABLE = 0x00000002 // stat.h:312:1: + UF_NODUMP = 0x00000001 // stat.h:311:1: + UF_OPAQUE = 0x00000008 // stat.h:314:1: + UF_SETTABLE = 0x0000ffff // stat.h:310:1: + UF_TRACKED = 0x00000040 // stat.h:324:1: + UTIME_NOW = -1 // stat.h:393:1: + UTIME_OMIT = -2 // stat.h:394:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILESEC_T = 0 // _filesec_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_FTS_H_ = 0 // fts.h:59:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_STAT_H_ = 0 // stat.h:71:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go b/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go index c157a05955..f465acfc2b 100644 --- a/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go @@ -1889,6 +1889,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/fts/fts_netbsd_arm.go b/vendor/modernc.org/libc/fts/fts_netbsd_arm.go index 5a802e013d..dba3077d96 100644 --- a/vendor/modernc.org/libc/fts/fts_netbsd_arm.go +++ b/vendor/modernc.org/libc/fts/fts_netbsd_arm.go @@ -1864,6 +1864,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/fts/fts_openbsd_386.go b/vendor/modernc.org/libc/fts/fts_openbsd_386.go index 8f20ed4e39..7b60f48e73 100644 --- a/vendor/modernc.org/libc/fts/fts_openbsd_386.go +++ b/vendor/modernc.org/libc/fts/fts_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fts/fts_freebsd_386.go -pkgname fts', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fts/fts_openbsd_386.go -pkgname fts', DO NOT EDIT. package fts @@ -15,220 +15,154 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSPERMS = 511 // stat.h:298:1: - ALLPERMS = 4095 // stat.h:300:1: - BIG_ENDIAN = 4321 // _endian.h:70:1: - BYTE_ORDER = 1234 // _endian.h:72:1: - CLK_TCK = 128 // time.h:56:1: - CLOCKS_PER_SEC = 128 // time.h:60:1: - CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: - CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: - CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: - CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: - CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: - CLOCK_PROF = 2 // _clock_id.h:64:1: - CLOCK_REALTIME = 0 // _clock_id.h:60:1: - CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: - CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: - CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: - CLOCK_SECOND = 13 // _clock_id.h:80:1: - CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: - CLOCK_UPTIME = 5 // _clock_id.h:74:1: - CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: - CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: - CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: - CPUCLOCK_WHICH_PID = 0 // time.h:476:1: - CPUCLOCK_WHICH_TID = 1 // time.h:477:1: - DEFFILEMODE = 438 // stat.h:302:1: - DST_AUST = 2 // time.h:49:1: - DST_CAN = 6 // time.h:53:1: - DST_EET = 5 // time.h:52:1: - DST_MET = 4 // time.h:51:1: - DST_NONE = 0 // time.h:47:1: - DST_USA = 1 // time.h:48:1: - DST_WET = 3 // time.h:50:1: - FD_SETSIZE = 1024 // select.h:61:1: - FTS_AGAIN = 1 // fts.h:111:1: - FTS_COMFOLLOW = 0x001 // fts.h:52:1: - FTS_D = 1 // fts.h:90:1: - FTS_DC = 2 // fts.h:91:1: - FTS_DEFAULT = 3 // fts.h:92:1: - FTS_DNR = 4 // fts.h:93:1: - FTS_DONTCHDIR = 0x01 // fts.h:106:1: - FTS_DOT = 5 // fts.h:94:1: - FTS_DP = 6 // fts.h:95:1: - FTS_ERR = 7 // fts.h:96:1: - FTS_F = 8 // fts.h:97:1: - FTS_FOLLOW = 2 // fts.h:112:1: - FTS_INIT = 9 // fts.h:98:1: - FTS_ISW = 0x04 // fts.h:108:1: - FTS_LOGICAL = 0x002 // fts.h:53:1: - FTS_NAMEONLY = 0x100 // fts.h:62:1: - FTS_NOCHDIR = 0x004 // fts.h:54:1: - FTS_NOINSTR = 3 // fts.h:113:1: - FTS_NOSTAT = 0x008 // fts.h:55:1: - FTS_NS = 10 // fts.h:99:1: - FTS_NSOK = 11 // fts.h:100:1: - FTS_OPTIONMASK = 0x0ff // fts.h:60:1: - FTS_PHYSICAL = 0x010 // fts.h:56:1: - FTS_ROOTLEVEL = 0 // fts.h:87:1: - FTS_ROOTPARENTLEVEL = -1 // fts.h:86:1: - FTS_SEEDOT = 0x020 // fts.h:57:1: - FTS_SKIP = 4 // fts.h:114:1: - FTS_SL = 12 // fts.h:101:1: - FTS_SLNONE = 13 // fts.h:102:1: - FTS_STOP = 0x200 // fts.h:63:1: - FTS_SYMFOLLOW = 0x02 // fts.h:107:1: - FTS_W = 14 // fts.h:103:1: - FTS_WHITEOUT = 0x080 // fts.h:59:1: - FTS_XDEV = 0x040 // fts.h:58:1: - ITIMER_PROF = 2 // time.h:457:1: - ITIMER_REAL = 0 // time.h:455:1: - ITIMER_VIRTUAL = 1 // time.h:456:1: - LITTLE_ENDIAN = 1234 // _endian.h:69:1: - PDP_ENDIAN = 3412 // _endian.h:71:1: - SBT_MAX = 0x7fffffffffffffff // time.h:135:1: - SF_APPEND = 0x00040000 // stat.h:341:1: - SF_ARCHIVED = 0x00010000 // stat.h:339:1: - SF_IMMUTABLE = 0x00020000 // stat.h:340:1: - SF_NOUNLINK = 0x00100000 // stat.h:342:1: - SF_SETTABLE = 0xffff0000 // stat.h:338:1: - SF_SNAPSHOT = 0x00200000 // stat.h:343:1: - S_BLKSIZE = 512 // stat.h:304:1: - S_IEXEC = 64 // stat.h:256:1: - S_IFBLK = 0060000 // stat.h:274:1: - S_IFCHR = 0020000 // stat.h:272:1: - S_IFDIR = 0040000 // stat.h:273:1: - S_IFIFO = 0010000 // stat.h:271:1: - S_IFLNK = 0120000 // stat.h:276:1: - S_IFMT = 0170000 // stat.h:270:1: - S_IFREG = 0100000 // stat.h:275:1: - S_IFSOCK = 0140000 // stat.h:277:1: - S_IFWHT = 0160000 // stat.h:281:1: - S_IREAD = 256 // stat.h:254:1: - S_IRGRP = 0000040 // stat.h:260:1: - S_IROTH = 0000004 // stat.h:265:1: - S_IRUSR = 0000400 // stat.h:249:1: - S_IRWXG = 0000070 // stat.h:259:1: - S_IRWXO = 0000007 // stat.h:264:1: - S_IRWXU = 0000700 // stat.h:248:1: - S_ISGID = 0002000 // stat.h:243:1: - S_ISTXT = 0001000 // stat.h:245:1: - S_ISUID = 0004000 // stat.h:242:1: - S_ISVTX = 0001000 // stat.h:278:1: - S_IWGRP = 0000020 // stat.h:261:1: - S_IWOTH = 0000002 // stat.h:266:1: - S_IWRITE = 128 // stat.h:255:1: - S_IWUSR = 0000200 // stat.h:250:1: - S_IXGRP = 0000010 // stat.h:262:1: - S_IXOTH = 0000001 // stat.h:267:1: - S_IXUSR = 0000100 // stat.h:251:1: - TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: - TIMER_RELTIME = 0x0 // _clock_id.h:98:1: - TIME_UTC = 1 // time.h:188:1: - UF_APPEND = 0x00000004 // stat.h:314:1: - UF_ARCHIVE = 0x00000800 // stat.h:330:1: - UF_HIDDEN = 0x00008000 // stat.h:333:1: - UF_IMMUTABLE = 0x00000002 // stat.h:313:1: - UF_NODUMP = 0x00000001 // stat.h:312:1: - UF_NOUNLINK = 0x00000010 // stat.h:316:1: - UF_OFFLINE = 0x00000200 // stat.h:328:1: - UF_OPAQUE = 0x00000008 // stat.h:315:1: - UF_READONLY = 0x00001000 // stat.h:331:1: - UF_REPARSE = 0x00000400 // stat.h:329:1: - UF_SETTABLE = 0x0000ffff // stat.h:311:1: - UF_SPARSE = 0x00000100 // stat.h:327:1: - UF_SYSTEM = 0x00000080 // stat.h:326:1: - UTIME_NOW = -1 // stat.h:358:1: - UTIME_OMIT = -2 // stat.h:359:1: - X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // _endian.h:47:1: - X_BLKCNT_T_DECLARED = 0 // types.h:90:1: - X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // _endian.h:40:1: - X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: - X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: - X_CLOCKID_T_DECLARED = 0 // types.h:100:1: - X_CLOCK_T_DECLARED = 0 // types.h:95:1: - X_DEV_T_DECLARED = 0 // types.h:108:1: - X_FFLAGS_T_DECLARED = 0 // types.h:113:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: - X_FTRUNCATE_DECLARED = 0 // types.h:417:1: - X_FTS_H_ = 0 // fts.h:36:1: - X_GID_T_DECLARED = 0 // types.h:126:1: - X_ID_T_DECLARED = 0 // types.h:141:1: - X_ILP32 = 1 // :1:1: - X_INO_T_DECLARED = 0 // types.h:146:1: - X_INT16_T_DECLARED = 0 // _stdint.h:42:1: - X_INT32_T_DECLARED = 0 // _stdint.h:47:1: - X_INT64_T_DECLARED = 0 // _stdint.h:52:1: - X_INT8_T_DECLARED = 0 // _stdint.h:37:1: - X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: - X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: - X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: - X_IN_PORT_T_DECLARED = 0 // types.h:136:1: - X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: - X_LSEEK_DECLARED = 0 // types.h:421:1: - X_LWPID_T_DECLARED = 0 // types.h:156:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MKNOD_DECLARED = 0 // stat.h:393:1: - X_MMAP_DECLARED = 0 // types.h:425:1: - X_MODE_T_DECLARED = 0 // types.h:161:1: - X_MQD_T_DECLARED = 0 // types.h:227:1: - X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF64_T_DECLARED = 0 // types.h:181:1: - X_OFF_T_DECLARED = 0 // types.h:176:1: - X_PDP_ENDIAN = 3412 // _endian.h:48:1: - X_PID_T_DECLARED = 0 // types.h:186:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // _endian.h:55:1: - X_QUAD_LOWWORD = 0 // _endian.h:56:1: - X_RLIM_T_DECLARED = 0 // types.h:193:1: - X_SELECT_DECLARED = 0 // select.h:103:1: - X_SIGSET_T_DECLARED = 0 // select.h:50:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // types.h:202:1: - X_SSIZE_T_DECLARED = 0 // types.h:207:1: - X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SELECT_H_ = 0 // select.h:35:1: - X_SYS_STAT_H_ = 0 // stat.h:41:1: - X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS_TIME_H_ = 0 // time.h:36:1: - X_SYS_TYPES_H_ = 0 // types.h:41:1: - X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // types.h:222:1: - X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // types.h:217:1: - X_TRUNCATE_DECLARED = 0 // types.h:429:1: - X_UID_T_DECLARED = 0 // types.h:234:1: - X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: - X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: - X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: - X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: - X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: - X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: - X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + ACCESSPERMS = 511 // stat.h:151:1: + ALLPERMS = 4095 // stat.h:153:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DEFFILEMODE = 438 // stat.h:155:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + FD_SETSIZE = 1024 // select.h:62:1: + FTS_AGAIN = 1 // fts.h:104:1: + FTS_COMFOLLOW = 0x0001 // fts.h:49:1: + FTS_D = 1 // fts.h:85:1: + FTS_DC = 2 // fts.h:86:1: + FTS_DEFAULT = 3 // fts.h:87:1: + FTS_DNR = 4 // fts.h:88:1: + FTS_DONTCHDIR = 0x01 // fts.h:100:1: + FTS_DOT = 5 // fts.h:89:1: + FTS_DP = 6 // fts.h:90:1: + FTS_ERR = 7 // fts.h:91:1: + FTS_F = 8 // fts.h:92:1: + FTS_FOLLOW = 2 // fts.h:105:1: + FTS_INIT = 9 // fts.h:93:1: + FTS_LOGICAL = 0x0002 // fts.h:50:1: + FTS_MAXLEVEL = 0x7fffffff // fts.h:82:1: + FTS_NAMEONLY = 0x1000 // fts.h:58:1: + FTS_NOCHDIR = 0x0004 // fts.h:51:1: + FTS_NOINSTR = 3 // fts.h:106:1: + FTS_NOSTAT = 0x0008 // fts.h:52:1: + FTS_NS = 10 // fts.h:94:1: + FTS_NSOK = 11 // fts.h:95:1: + FTS_OPTIONMASK = 0x00ff // fts.h:56:1: + FTS_PHYSICAL = 0x0010 // fts.h:53:1: + FTS_ROOTLEVEL = 0 // fts.h:81:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:80:1: + FTS_SEEDOT = 0x0020 // fts.h:54:1: + FTS_SKIP = 4 // fts.h:107:1: + FTS_SL = 12 // fts.h:96:1: + FTS_SLNONE = 13 // fts.h:97:1: + FTS_STOP = 0x2000 // fts.h:59:1: + FTS_SYMFOLLOW = 0x02 // fts.h:101:1: + FTS_XDEV = 0x0040 // fts.h:55:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NBBY = 8 // select.h:111:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SF_APPEND = 0x00040000 // stat.h:175:1: + SF_ARCHIVED = 0x00010000 // stat.h:173:1: + SF_IMMUTABLE = 0x00020000 // stat.h:174:1: + SF_SETTABLE = 0xffff0000 // stat.h:172:1: + S_BLKSIZE = 512 // stat.h:157:1: + S_IEXEC = 64 // stat.h:108:1: + S_IFBLK = 0060000 // stat.h:126:1: + S_IFCHR = 0020000 // stat.h:124:1: + S_IFDIR = 0040000 // stat.h:125:1: + S_IFIFO = 0010000 // stat.h:123:1: + S_IFLNK = 0120000 // stat.h:128:1: + S_IFMT = 0170000 // stat.h:122:1: + S_IFREG = 0100000 // stat.h:127:1: + S_IFSOCK = 0140000 // stat.h:129:1: + S_IREAD = 256 // stat.h:106:1: + S_IRGRP = 0000040 // stat.h:112:1: + S_IROTH = 0000004 // stat.h:117:1: + S_IRUSR = 0000400 // stat.h:101:1: + S_IRWXG = 0000070 // stat.h:111:1: + S_IRWXO = 0000007 // stat.h:116:1: + S_IRWXU = 0000700 // stat.h:100:1: + S_ISGID = 0002000 // stat.h:95:1: + S_ISTXT = 0001000 // stat.h:97:1: + S_ISUID = 0004000 // stat.h:94:1: + S_ISVTX = 0001000 // stat.h:130:1: + S_IWGRP = 0000020 // stat.h:113:1: + S_IWOTH = 0000002 // stat.h:118:1: + S_IWRITE = 128 // stat.h:107:1: + S_IWUSR = 0000200 // stat.h:102:1: + S_IXGRP = 0000010 // stat.h:114:1: + S_IXOTH = 0000001 // stat.h:119:1: + S_IXUSR = 0000100 // stat.h:103:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + UF_APPEND = 0x00000004 // stat.h:167:1: + UF_IMMUTABLE = 0x00000002 // stat.h:166:1: + UF_NODUMP = 0x00000001 // stat.h:165:1: + UF_OPAQUE = 0x00000008 // stat.h:168:1: + UF_SETTABLE = 0x0000ffff // stat.h:164:1: + UTIME_NOW = -2 // stat.h:188:1: + UTIME_OMIT = -1 // stat.h:189:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FTS_H_ = 0 // fts.h:36:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -240,10 +174,11 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// Copyright (c) 1982, 1986, 1991, 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 @@ -275,12 +210,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)types.h 8.6 (Berkeley) 2/19/95 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -311,63 +245,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -396,123 +306,78 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// Machine type dependent parameters. -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1987, 1991 Regents of the University of California. -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -522,57 +387,29 @@ type X__float128 = float64 /* :47:21 */ // 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. 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. // -// @(#)endian.h 7.8 (Berkeley) 4/3/91 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // -// $FreeBSD$ +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -603,19 +440,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -625,38 +455,26 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// This file is in the public domain. -// $FreeBSD$ +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -683,195 +501,13 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - -type X__uint64_t = uint64 /* _types.h:68:28 */ - -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ - -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ - -// Additional type definitions: -// -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ - -type U_char = uint8 /* types.h:52:23 */ -type U_short = uint16 /* types.h:53:24 */ -type U_int = uint32 /* types.h:54:22 */ -type U_long = uint32 /* types.h:55:23 */ -type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility -type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility - -// XXX POSIX sized integrals that should appear only in . // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011 David E. O'Brien -// Copyright (c) 2001 Mike Barcroft -// All rights reserved. +// Copyright (c) 1990, 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 @@ -881,11 +517,14 @@ type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -894,139 +533,230 @@ type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ - -type Int8_t = X__int8_t /* _stdint.h:36:19 */ - -type Int16_t = X__int16_t /* _stdint.h:41:20 */ - -type Int32_t = X__int32_t /* _stdint.h:46:20 */ - -type Int64_t = X__int64_t /* _stdint.h:51:20 */ - -type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ - -type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ - -type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ - -type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ - -type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ -type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ -type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ -type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ - -type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) -type U_int16_t = X__uint16_t /* types.h:68:20 */ -type U_int32_t = X__uint32_t /* types.h:69:20 */ -type U_int64_t = X__uint64_t /* types.h:70:20 */ - -type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) -type Quad_t = X__int64_t /* types.h:73:19 */ -type Qaddr_t = uintptr /* types.h:74:16 */ - -type Caddr_t = uintptr /* types.h:76:14 */ // core address -type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const - -type Blksize_t = X__blksize_t /* types.h:80:21 */ - -type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ -type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ -type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ - -type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ - -type Clock_t = X__clock_t /* types.h:94:19 */ - -type Clockid_t = X__clockid_t /* types.h:99:21 */ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value -type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev +// Tell sys/endian.h we have MD variants of the swap macros. -type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags +// Note that these macros evaluate their arguments several times. -type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number +// Public names -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ +// These are specified to be function-like macros to match the spec -type Gid_t = X__gid_t /* types.h:125:18 */ // group id +// POSIX names -type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address +// original BSD names -type In_port_t = X__uint16_t /* types.h:135:20 */ +// these were exposed here before -type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t +// ancient stuff -type Ino_t = X__ino_t /* types.h:145:18 */ // inode number +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -type Mode_t = X__mode_t /* types.h:160:18 */ // permissions +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions +type Int8_t = X__int8_t /* types.h:75:19 */ -type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count +type Uint8_t = X__uint8_t /* types.h:80:20 */ -type Off_t = X__off_t /* types.h:175:18 */ // file offset +type Int16_t = X__int16_t /* types.h:85:20 */ -type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) +type Uint16_t = X__uint16_t /* types.h:90:21 */ -type Pid_t = X__pid_t /* types.h:185:18 */ // process id +type Int32_t = X__int32_t /* types.h:95:20 */ -type Register_t = X__register_t /* types.h:189:22 */ +type Uint32_t = X__uint32_t /* types.h:100:21 */ -type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit +type Int64_t = X__int64_t /* types.h:105:20 */ -type Sbintime_t = X__int64_t /* types.h:196:19 */ +type Uint64_t = X__uint64_t /* types.h:110:21 */ -type Segsz_t = X__segsz_t /* types.h:198:19 */ +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ -type Ssize_t = X__ssize_t /* types.h:206:19 */ +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ -type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -type Time_t = X__time_t /* types.h:216:18 */ +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -type Timer_t = X__timer_t /* types.h:221:19 */ +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ -type Mqd_t = X__mqd_t /* types.h:226:17 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type U_register_t = X__u_register_t /* types.h:230:24 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Uid_t = X__uid_t /* types.h:233:18 */ // user id +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) +type Time_t = X__time_t /* types.h:183:18 */ -type Cap_ioctl_t = uint32 /* types.h:244:23 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -// Types suitable for exporting physical addresses, virtual addresses -// (pointers), and memory object sizes from the kernel independent of native -// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and -// size_t in structs which contain such types that are shared with userspace. -type Kpaddr_t = X__uint64_t /* types.h:260:20 */ -type Kvaddr_t = X__uint64_t /* types.h:261:20 */ -type Ksize_t = X__uint64_t /* types.h:262:20 */ -type Kssize_t = X__int64_t /* types.h:263:19 */ +type Off_t = X__off_t /* types.h:193:18 */ -type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ -type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ -type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ -type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ -type Vm_size_t = X__vm_size_t /* types.h:269:21 */ +// Major, minor numbers, dev_t's. -type Rman_res_t = X__rman_res_t /* types.h:271:25 */ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ +// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 1993 +// Copyright (c) 1982, 1986, 1989, 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 @@ -1052,17 +782,14 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)stat.h 8.9 (Berkeley) 8/17/94 -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ + +// Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -1087,14 +814,13 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)time.h 8.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1992, 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 @@ -1104,11 +830,14 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -1117,12 +846,13 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)select.h 8.2 (Berkeley) 1/4/94 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// Copyright (c) 1982, 1986, 1991, 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 @@ -1154,18 +884,75 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ -// sigset_t macros. +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ -// - -// SPDX-License-Identifier: BSD-3-Clause +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ + +// Copyright (c) 1989 The Regents of the University of California. +// All rights reserved. // -// Copyright (c) 1992, 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 @@ -1191,11 +978,11 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -1226,14 +1013,18 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1990, 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 @@ -1243,11 +1034,14 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -1256,18 +1050,15 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $ + +// 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 @@ -1292,819 +1083,24 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// Structure returned by gettimeofday(2) system call, and used in other calls. -type Timeval = struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t -} /* _timeval.h:49:1 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ - -type X__fd_mask = uint32 /* select.h:44:23 */ -type Fd_mask = X__fd_mask /* select.h:46:19 */ - -type Sigset_t = X__sigset_t /* select.h:51:20 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set = Fd_set1 /* select.h:75:3 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 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. -// 3. 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. -// -// @(#)stat.h 8.12 (Berkeley) 6/16/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// XXX We get miscellaneous namespace pollution with this. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1991, 1993, 1994 -// 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. -// 3. 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. -// -// @(#)types.h 8.6 (Berkeley) 2/19/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 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. -// 3. 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. -// -// @(#)time.h 8.3 (Berkeley) 1/21/94 - -// These macros are shared between time.h and sys/time.h. - -// Note: The values shown below as a comment for the __POSIX_VISIBLE values are -// the ones FreeBSD traditionally used based on our reading of the POSIX -// standards. However, glibc uses 199309 for all of them, even those many were -// not defined there. To remain bug compatible with glibc means more software -// that relied on the glibc behavior will compile easily on FreeBSD. -// -// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl -// port until it can be updated properly. It incorrectly assumes that this was a -// standard value. It will be moved back to the __BSD_VISIBLE section once the -// issue is corrected. - -// FreeBSD-specific clocks. - -// Linux compatible names. - -type Timezone = struct { - Ftz_minuteswest int32 - Ftz_dsttime int32 -} /* time.h:43:1 */ - -type Bintime = struct { - Fsec Time_t - Ffrac Uint64_t -} /* time.h:56:1 */ - -// Operations on timespecs - -// Names of the interval timers, and structure -// defining a timer setting. - -type Itimerval = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t - } - Fit_value struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t - } -} /* time.h:459:1 */ - -// Getkerninfo clock information structure -type Clockinfo = struct { - Fhz int32 - Ftick int32 - Fspare int32 - Fstathz int32 - Fprofhz int32 -} /* time.h:467:1 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 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. -// 3. 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. -// -// @(#)time.h 8.3 (Berkeley) 1/21/94 - -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2003 Marcel Moolenaar -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 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. -// 3. 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. -// -// @(#)time.h 8.3 (Berkeley) 1/21/94 - -// Frequency of the clock ticks reported by times(). Deprecated - use -// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) -// Frequency of the clock ticks reported by clock(). +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits -// New in POSIX 1003.1b-1993. +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +type Locale_t = uintptr /* time.h:107:14 */ type Tm = struct { Ftm_sec int32 @@ -2118,83 +1114,42 @@ type Tm = struct { Ftm_isdst int32 Ftm_gmtoff int32 Ftm_zone uintptr -} /* time.h:101:1 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. -// -// This software was developed by David Chisnall under sponsorship from -// the FreeBSD Foundation. -// -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Locale_t = uintptr /* _time.h:36:25 */ +} /* time.h:111:1 */ type Stat = struct { - Fst_dev Dev_t - Fst_ino Ino_t - Fst_nlink Nlink_t - Fst_mode Mode_t - Fst_padding0 X__int16_t - Fst_uid Uid_t - Fst_gid Gid_t - Fst_padding1 X__int32_t - Fst_rdev Dev_t - Fst_atim_ext X__int32_t - Fst_atim struct { + Fst_mode Mode_t + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_rdev Dev_t + Fst_atim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_mtim_ext X__int32_t - Fst_mtim struct { + Fst_mtim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_ctim_ext X__int32_t - Fst_ctim struct { + Fst_ctim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_btim_ext X__int32_t - Fst_birthtim struct { + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags U_int32_t + Fst_gen U_int32_t + F__st_birthtim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_size Off_t - Fst_blocks Blkcnt_t - Fst_blksize Blksize_t - Fst_flags Fflags_t - Fst_gen X__uint64_t - Fst_spare [10]X__uint64_t -} /* stat.h:160:1 */ +} /* stat.h:45:1 */ + +// $OpenBSD: fts.h,v 1.14 2012/12/05 23:19:57 deraadt Exp $ +// $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1989, 1993 // The Regents of the University of California. All rights reserved. // @@ -2223,64 +1178,35 @@ type Stat = struct { // SUCH DAMAGE. // // @(#)fts.h 8.3 (Berkeley) 8/14/94 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ type X_ftsent = struct { Ffts_cycle uintptr Ffts_parent uintptr Ffts_link uintptr - Ffts_number int64 + Ffts_number int32 Ffts_pointer uintptr Ffts_accpath uintptr Ffts_path uintptr Ffts_errno int32 Ffts_symfd int32 - Ffts_pathlen X__size_t - Ffts_namelen X__size_t - Ffts_ino X__ino_t - Ffts_dev X__dev_t - Ffts_nlink X__nlink_t + Ffts_pathlen Size_t + Ffts_namelen Size_t + Ffts_ino Ino_t + Ffts_dev Dev_t + Ffts_nlink Nlink_t Ffts_level int32 - Ffts_info int32 - Ffts_flags uint32 - Ffts_instr int32 + Ffts_info uint16 + Ffts_flags uint16 + Ffts_instr uint16 + Ffts_spare uint16 Ffts_statp uintptr - Ffts_name uintptr - Ffts_fts uintptr -} /* fts.h:41:2 */ + Ffts_name [1]int8 + F__ccgo_pad1 [3]byte +} /* fts.h:39:2 */ + +// $OpenBSD: fts.h,v 1.14 2012/12/05 23:19:57 deraadt Exp $ +// $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1989, 1993 // The Regents of the University of California. All rights reserved. // @@ -2309,51 +1235,20 @@ type X_ftsent = struct { // SUCH DAMAGE. // // @(#)fts.h 8.3 (Berkeley) 8/14/94 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ type FTS = struct { - Ffts_cur uintptr - Ffts_child uintptr - Ffts_array uintptr - Ffts_dev X__dev_t - Ffts_path uintptr - Ffts_rfd int32 - Ffts_pathlen X__size_t - Ffts_nitems X__size_t - Ffts_compar uintptr - Ffts_options int32 - Ffts_clientptr uintptr -} /* fts.h:66:3 */ - -type FTSENT = X_ftsent /* fts.h:120:3 */ + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + Ffts_dev Dev_t + Ffts_path uintptr + Ffts_rfd int32 + Ffts_pathlen Size_t + Ffts_nitems int32 + Ffts_compar uintptr + Ffts_options int32 +} /* fts.h:61:3 */ + +type FTSENT = X_ftsent /* fts.h:114:3 */ var _ int8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go b/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go index c4f859c2aa..8b48edf140 100644 --- a/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go @@ -118,8 +118,8 @@ const ( UTIME_OMIT = -1 // stat.h:189:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_FTS_H_ = 0 // fts.h:36:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -133,16 +133,16 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -153,16 +153,16 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -183,7 +183,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -480,7 +480,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -640,18 +640,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -733,31 +732,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. -// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - @@ -795,7 +793,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)stat.h 8.9 (Berkeley) 8/17/94 -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -859,7 +857,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -1031,7 +1029,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go b/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go index c4f859c2aa..bbdea05133 100644 --- a/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go +++ b/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o fts/fts_openbsd_amd64.go -pkgname fts', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o fts/fts_openbsd_arm64.go -pkgname fts', DO NOT EDIT. package fts @@ -117,9 +117,9 @@ const ( UTIME_NOW = -2 // stat.h:188:1: UTIME_OMIT = -1 // stat.h:189:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_FTS_H_ = 0 // fts.h:36:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -129,21 +129,21 @@ const ( X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_SELECT_H_ = 0 // select.h:35:1: @@ -153,16 +153,16 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -183,7 +183,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -256,10 +256,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -480,7 +477,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -512,8 +509,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -555,66 +551,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -640,18 +638,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -733,31 +730,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. -// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - @@ -795,7 +791,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)stat.h 8.9 (Berkeley) 8/17/94 -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -859,7 +855,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -1031,7 +1027,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/grp/capi_darwin_amd64.go b/vendor/modernc.org/libc/grp/capi_darwin_amd64.go index 3d10f9a0c0..f527382142 100644 --- a/vendor/modernc.org/libc/grp/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/grp/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname grp', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT. package grp diff --git a/vendor/modernc.org/libc/grp/capi_openbsd_386.go b/vendor/modernc.org/libc/grp/capi_openbsd_386.go index 55d304f440..a047d104e2 100644 --- a/vendor/modernc.org/libc/grp/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/grp/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o grp/grp_freebsd_386.go -pkgname grp', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o grp/grp_openbsd_386.go -pkgname grp', DO NOT EDIT. package grp diff --git a/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go b/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go index 579c0b1288..bd8e8ef7e7 100644 --- a/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o grp/grp_openbsd_amd64.go -pkgname grp', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o grp/grp_openbsd_arm64.go -pkgname grp', DO NOT EDIT. package grp diff --git a/vendor/modernc.org/libc/grp/grp_darwin_amd64.go b/vendor/modernc.org/libc/grp/grp_darwin_amd64.go index 30f2793550..805ed9983e 100644 --- a/vendor/modernc.org/libc/grp/grp_darwin_amd64.go +++ b/vendor/modernc.org/libc/grp/grp_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname grp', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT. package grp @@ -15,27 +15,27 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_GID_T = 0 - X_GRP_H_ = 0 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PATH_GROUP = "/etc/group" - X_SIZE_T = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UUID_STRING_T = 0 - X_UUID_T = 0 - X_UUID_UUID_H = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_GRP_H_ = 0 // grp.h:43:1: + X_LP64 = 1 // :1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PATH_GROUP = "/etc/group" // grp.h:50:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UUID_STRING_T = 0 // uuid.h:42:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/grp/grp_openbsd_386.go b/vendor/modernc.org/libc/grp/grp_openbsd_386.go index 230499d334..554607ddc6 100644 --- a/vendor/modernc.org/libc/grp/grp_openbsd_386.go +++ b/vendor/modernc.org/libc/grp/grp_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o grp/grp_freebsd_386.go -pkgname grp', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o grp/grp_openbsd_386.go -pkgname grp', DO NOT EDIT. package grp @@ -15,21 +15,48 @@ var _ atomic.Value var _ unsafe.Pointer const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: - X_GID_T_DECLARED = 0 // grp.h:50:1: X_GRP_H_ = 0 // grp.h:41:1: X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_GROUP = "/etc/group" // grp.h:46:1: - X_SIZE_T_DECLARED = 0 // grp.h:55:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -41,9 +68,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: grp.h,v 1.13 2018/09/13 12:31:15 millert Exp $ +// $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1989, 1993 // The Regents of the University of California. All rights reserved. // (c) UNIX System Laboratories, Inc. @@ -77,11 +105,48 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // @(#)grp.h 8.2 (Berkeley) 1/21/94 -// $FreeBSD$ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1982, 1986, 1991, 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. +// 3. 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -112,63 +177,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -197,118 +238,78 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function acquires an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function attempts to acquire an exclusive or shared lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function releases a lock. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function asserts that an exclusive or shared lock is held. +// Default values. -// Function requires that an exclusive or shared lock is or is not held. - -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -319,23 +320,28 @@ type X__float128 = float64 /* :47:21 */ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-3-Clause +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -366,17 +372,40 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. // -// Copyright (c) 2002 Mike Barcroft +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ + +// - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -388,11 +417,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -408,18 +433,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -446,162 +465,224 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// max value for an unsigned long long +// Tell sys/endian.h we have MD variants of the swap macros. -// Minimum signal stack size. +// Note that these macros evaluate their arguments several times. -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// Public names -type X__int64_t = int64 /* _types.h:66:20 */ +// These are specified to be function-like macros to match the spec -type X__uint64_t = uint64 /* _types.h:68:28 */ +// POSIX names -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type Time_t = X__time_t /* types.h:183:18 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +type Timer_t = X__timer_t /* types.h:188:19 */ -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +type Off_t = X__off_t /* types.h:193:18 */ -type Gid_t = X__gid_t /* grp.h:49:18 */ +// Major, minor numbers, dev_t's. type Group = struct { Fgr_name uintptr Fgr_passwd uintptr Fgr_gid Gid_t Fgr_mem uintptr -} /* grp.h:58:1 */ +} /* grp.h:50:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go b/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go index 30028ea6f2..6a52e72d89 100644 --- a/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go +++ b/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go @@ -21,8 +21,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_GRP_H_ = 0 // grp.h:41:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -35,28 +35,28 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_GROUP = "/etc/group" // grp.h:46:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -115,7 +115,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)grp.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -412,7 +412,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -572,18 +572,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -665,27 +664,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go b/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go index 30028ea6f2..89520208fb 100644 --- a/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go +++ b/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o grp/grp_openbsd_amd64.go -pkgname grp', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o grp/grp_openbsd_arm64.go -pkgname grp', DO NOT EDIT. package grp @@ -20,9 +20,9 @@ const ( LITTLE_ENDIAN = 1234 // endian.h:44:1: PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_GRP_H_ = 0 // grp.h:41:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -31,32 +31,32 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_GROUP = "/etc/group" // grp.h:46:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -115,7 +115,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)grp.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -188,10 +188,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -412,7 +409,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -444,8 +441,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -487,66 +483,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -572,18 +570,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -665,27 +662,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go b/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go index 8189cc44e8..f9459e901e 100644 --- a/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. package langinfo diff --git a/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go b/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go index be1afd2284..a11db272b4 100644 --- a/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o langinfo/langinfo_freebsd_386.go -pkgname langinfo', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_386.go -pkgname langinfo', DO NOT EDIT. package langinfo diff --git a/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go b/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go index dd9be1ffb8..40674a20d0 100644 --- a/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_amd64.go -pkgname langinfo', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_arm64.go -pkgname langinfo', DO NOT EDIT. package langinfo diff --git a/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go index a2f803f776..337246d7ec 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. package langinfo @@ -15,80 +15,80 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ABDAY_1 = 14 - ABDAY_2 = 15 - ABDAY_3 = 16 - ABDAY_4 = 17 - ABDAY_5 = 18 - ABDAY_6 = 19 - ABDAY_7 = 20 - ABMON_1 = 33 - ABMON_10 = 42 - ABMON_11 = 43 - ABMON_12 = 44 - ABMON_2 = 34 - ABMON_3 = 35 - ABMON_4 = 36 - ABMON_5 = 37 - ABMON_6 = 38 - ABMON_7 = 39 - ABMON_8 = 40 - ABMON_9 = 41 - ALT_DIGITS = 49 - AM_STR = 5 - CODESET = 0 - CRNCYSTR = 56 - DAY_1 = 7 - DAY_2 = 8 - DAY_3 = 9 - DAY_4 = 10 - DAY_5 = 11 - DAY_6 = 12 - DAY_7 = 13 - D_FMT = 2 - D_MD_ORDER = 57 - D_T_FMT = 1 - ERA = 45 - ERA_D_FMT = 46 - ERA_D_T_FMT = 47 - ERA_T_FMT = 48 - MON_1 = 21 - MON_10 = 30 - MON_11 = 31 - MON_12 = 32 - MON_2 = 22 - MON_3 = 23 - MON_4 = 24 - MON_5 = 25 - MON_6 = 26 - MON_7 = 27 - MON_8 = 28 - MON_9 = 29 - NOEXPR = 53 - NOSTR = 55 - PM_STR = 6 - RADIXCHAR = 50 - THOUSEP = 51 - T_FMT = 3 - T_FMT_AMPM = 4 - YESEXPR = 52 - YESSTR = 54 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_LANGINFO_H_ = 0 - X_LP64 = 1 - X_NL_ITEM = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 + ABDAY_1 = 14 // langinfo.h:53:1: + ABDAY_2 = 15 // langinfo.h:54:1: + ABDAY_3 = 16 // langinfo.h:55:1: + ABDAY_4 = 17 // langinfo.h:56:1: + ABDAY_5 = 18 // langinfo.h:57:1: + ABDAY_6 = 19 // langinfo.h:58:1: + ABDAY_7 = 20 // langinfo.h:59:1: + ABMON_1 = 33 // langinfo.h:76:1: + ABMON_10 = 42 // langinfo.h:85:1: + ABMON_11 = 43 // langinfo.h:86:1: + ABMON_12 = 44 // langinfo.h:87:1: + ABMON_2 = 34 // langinfo.h:77:1: + ABMON_3 = 35 // langinfo.h:78:1: + ABMON_4 = 36 // langinfo.h:79:1: + ABMON_5 = 37 // langinfo.h:80:1: + ABMON_6 = 38 // langinfo.h:81:1: + ABMON_7 = 39 // langinfo.h:82:1: + ABMON_8 = 40 // langinfo.h:83:1: + ABMON_9 = 41 // langinfo.h:84:1: + ALT_DIGITS = 49 // langinfo.h:93:1: + AM_STR = 5 // langinfo.h:40:1: + CODESET = 0 // langinfo.h:35:1: + CRNCYSTR = 56 // langinfo.h:106:1: + DAY_1 = 7 // langinfo.h:44:1: + DAY_2 = 8 // langinfo.h:45:1: + DAY_3 = 9 // langinfo.h:46:1: + DAY_4 = 10 // langinfo.h:47:1: + DAY_5 = 11 // langinfo.h:48:1: + DAY_6 = 12 // langinfo.h:49:1: + DAY_7 = 13 // langinfo.h:50:1: + D_FMT = 2 // langinfo.h:37:1: + D_MD_ORDER = 57 // langinfo.h:109:1: + D_T_FMT = 1 // langinfo.h:36:1: + ERA = 45 // langinfo.h:89:1: + ERA_D_FMT = 46 // langinfo.h:90:1: + ERA_D_T_FMT = 47 // langinfo.h:91:1: + ERA_T_FMT = 48 // langinfo.h:92:1: + MON_1 = 21 // langinfo.h:62:1: + MON_10 = 30 // langinfo.h:71:1: + MON_11 = 31 // langinfo.h:72:1: + MON_12 = 32 // langinfo.h:73:1: + MON_2 = 22 // langinfo.h:63:1: + MON_3 = 23 // langinfo.h:64:1: + MON_4 = 24 // langinfo.h:65:1: + MON_5 = 25 // langinfo.h:66:1: + MON_6 = 26 // langinfo.h:67:1: + MON_7 = 27 // langinfo.h:68:1: + MON_8 = 28 // langinfo.h:69:1: + MON_9 = 29 // langinfo.h:70:1: + NOEXPR = 53 // langinfo.h:99:1: + NOSTR = 55 // langinfo.h:103:1: + PM_STR = 6 // langinfo.h:41:1: + RADIXCHAR = 50 // langinfo.h:95:1: + THOUSEP = 51 // langinfo.h:96:1: + T_FMT = 3 // langinfo.h:38:1: + T_FMT_AMPM = 4 // langinfo.h:39:1: + YESEXPR = 52 // langinfo.h:98:1: + YESSTR = 54 // langinfo.h:102:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_LANGINFO_H_ = 0 // langinfo.h:30:1: + X_LP64 = 1 // :1:1: + X_NL_ITEM = 0 // _nl_item.h:30:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go index 9c8bea3647..399b0ad34a 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o langinfo/langinfo_freebsd_386.go -pkgname langinfo', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_386.go -pkgname langinfo', DO NOT EDIT. package langinfo @@ -15,91 +15,69 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ABDAY_1 = 14 // langinfo.h:60:1: - ABDAY_2 = 15 // langinfo.h:61:1: - ABDAY_3 = 16 // langinfo.h:62:1: - ABDAY_4 = 17 // langinfo.h:63:1: - ABDAY_5 = 18 // langinfo.h:64:1: - ABDAY_6 = 19 // langinfo.h:65:1: - ABDAY_7 = 20 // langinfo.h:66:1: - ABMON_1 = 33 // langinfo.h:83:1: - ABMON_10 = 42 // langinfo.h:92:1: - ABMON_11 = 43 // langinfo.h:93:1: - ABMON_12 = 44 // langinfo.h:94:1: - ABMON_2 = 34 // langinfo.h:84:1: - ABMON_3 = 35 // langinfo.h:85:1: - ABMON_4 = 36 // langinfo.h:86:1: - ABMON_5 = 37 // langinfo.h:87:1: - ABMON_6 = 38 // langinfo.h:88:1: - ABMON_7 = 39 // langinfo.h:89:1: - ABMON_8 = 40 // langinfo.h:90:1: - ABMON_9 = 41 // langinfo.h:91:1: - ALTMON_1 = 58 // langinfo.h:120:1: - ALTMON_10 = 67 // langinfo.h:129:1: - ALTMON_11 = 68 // langinfo.h:130:1: - ALTMON_12 = 69 // langinfo.h:131:1: - ALTMON_2 = 59 // langinfo.h:121:1: - ALTMON_3 = 60 // langinfo.h:122:1: - ALTMON_4 = 61 // langinfo.h:123:1: - ALTMON_5 = 62 // langinfo.h:124:1: - ALTMON_6 = 63 // langinfo.h:125:1: - ALTMON_7 = 64 // langinfo.h:126:1: - ALTMON_8 = 65 // langinfo.h:127:1: - ALTMON_9 = 66 // langinfo.h:128:1: - ALT_DIGITS = 49 // langinfo.h:100:1: - AM_STR = 5 // langinfo.h:47:1: - CODESET = 0 // langinfo.h:42:1: - CRNCYSTR = 56 // langinfo.h:113:1: - DAY_1 = 7 // langinfo.h:51:1: - DAY_2 = 8 // langinfo.h:52:1: - DAY_3 = 9 // langinfo.h:53:1: - DAY_4 = 10 // langinfo.h:54:1: - DAY_5 = 11 // langinfo.h:55:1: - DAY_6 = 12 // langinfo.h:56:1: - DAY_7 = 13 // langinfo.h:57:1: - D_FMT = 2 // langinfo.h:44:1: - D_MD_ORDER = 57 // langinfo.h:116:1: - D_T_FMT = 1 // langinfo.h:43:1: - ERA = 45 // langinfo.h:96:1: - ERA_D_FMT = 46 // langinfo.h:97:1: - ERA_D_T_FMT = 47 // langinfo.h:98:1: - ERA_T_FMT = 48 // langinfo.h:99:1: - MON_1 = 21 // langinfo.h:69:1: - MON_10 = 30 // langinfo.h:78:1: - MON_11 = 31 // langinfo.h:79:1: - MON_12 = 32 // langinfo.h:80:1: - MON_2 = 22 // langinfo.h:70:1: - MON_3 = 23 // langinfo.h:71:1: - MON_4 = 24 // langinfo.h:72:1: - MON_5 = 25 // langinfo.h:73:1: - MON_6 = 26 // langinfo.h:74:1: - MON_7 = 27 // langinfo.h:75:1: - MON_8 = 28 // langinfo.h:76:1: - MON_9 = 29 // langinfo.h:77:1: - NOEXPR = 53 // langinfo.h:106:1: - NOSTR = 55 // langinfo.h:110:1: - PM_STR = 6 // langinfo.h:48:1: - RADIXCHAR = 50 // langinfo.h:102:1: - THOUSEP = 51 // langinfo.h:103:1: - T_FMT = 3 // langinfo.h:45:1: - T_FMT_AMPM = 4 // langinfo.h:46:1: - YESEXPR = 52 // langinfo.h:105:1: - YESSTR = 54 // langinfo.h:109:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_LANGINFO_H_ = 0 // langinfo.h:32:1: - X_LOCALE_T_DEFINED = 0 // _langinfo.h:38:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_NL_ITEM_DECLARED = 0 // langinfo.h:39:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:35:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + ABDAY_1 = 13 // langinfo.h:29:1: + ABDAY_2 = 14 // langinfo.h:30:1: + ABDAY_3 = 15 // langinfo.h:31:1: + ABDAY_4 = 16 // langinfo.h:32:1: + ABDAY_5 = 17 // langinfo.h:33:1: + ABDAY_6 = 18 // langinfo.h:34:1: + ABDAY_7 = 19 // langinfo.h:35:1: + ABMON_1 = 32 // langinfo.h:50:1: + ABMON_10 = 41 // langinfo.h:59:1: + ABMON_11 = 42 // langinfo.h:60:1: + ABMON_12 = 43 // langinfo.h:61:1: + ABMON_2 = 33 // langinfo.h:51:1: + ABMON_3 = 34 // langinfo.h:52:1: + ABMON_4 = 35 // langinfo.h:53:1: + ABMON_5 = 36 // langinfo.h:54:1: + ABMON_6 = 37 // langinfo.h:55:1: + ABMON_7 = 38 // langinfo.h:56:1: + ABMON_8 = 39 // langinfo.h:57:1: + ABMON_9 = 40 // langinfo.h:58:1: + AM_STR = 4 // langinfo.h:18:1: + CODESET = 51 // langinfo.h:71:1: + CRNCYSTR = 50 // langinfo.h:69:1: + DAY_1 = 6 // langinfo.h:21:1: + DAY_2 = 7 // langinfo.h:22:1: + DAY_3 = 8 // langinfo.h:23:1: + DAY_4 = 9 // langinfo.h:24:1: + DAY_5 = 10 // langinfo.h:25:1: + DAY_6 = 11 // langinfo.h:26:1: + DAY_7 = 12 // langinfo.h:27:1: + D_FMT = 1 // langinfo.h:15:1: + D_T_FMT = 0 // langinfo.h:14:1: + MON_1 = 20 // langinfo.h:37:1: + MON_10 = 29 // langinfo.h:46:1: + MON_11 = 30 // langinfo.h:47:1: + MON_12 = 31 // langinfo.h:48:1: + MON_2 = 21 // langinfo.h:38:1: + MON_3 = 22 // langinfo.h:39:1: + MON_4 = 23 // langinfo.h:40:1: + MON_5 = 24 // langinfo.h:41:1: + MON_6 = 25 // langinfo.h:42:1: + MON_7 = 26 // langinfo.h:43:1: + MON_8 = 27 // langinfo.h:44:1: + MON_9 = 28 // langinfo.h:45:1: + NL_CAT_LOCALE = 1 // nl_types.h:76:1: + NL_SETD = 1 // nl_types.h:75:1: + NOEXPR = 49 // langinfo.h:68:1: + NOSTR = 48 // langinfo.h:67:1: + PM_STR = 5 // langinfo.h:19:1: + RADIXCHAR = 44 // langinfo.h:63:1: + THOUSEP = 45 // langinfo.h:64:1: + T_FMT = 2 // langinfo.h:16:1: + T_FMT_AMPM = 3 // langinfo.h:17:1: + YESEXPR = 47 // langinfo.h:66:1: + YESSTR = 46 // langinfo.h:65:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_LANGINFO_H_ = 0 // langinfo.h:10:1: + X_LOCALE_T_DEFINED_ = 0 // langinfo.h:75:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_NL_TYPES_H_ = 0 // nl_types.h:34:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -111,12 +89,22 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ + +// Written by J.T. Conklin +// Public domain. + +// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $ +// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2001 Alexey Zelkin +// Copyright (c) 1996 The NetBSD Foundation, Inc. // All rights reserved. // +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -126,23 +114,21 @@ type X__float128 = float64 /* :47:21 */ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -173,63 +159,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -258,119 +220,95 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function attempts to acquire an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function releases a lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function asserts that an exclusive or shared lock is held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function requires that an exclusive or shared lock is or is not held. +// Default values. -// Function should not be analyzed. +type X_nl_catd = struct { + F__data uintptr + F__size int32 +} /* nl_types.h:78:9 */ -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. +// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ -// Guard variables and structure members by lock. +// Written by J.T. Conklin +// Public domain. -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $ +// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft +// Copyright (c) 1996 The NetBSD Foundation, Inc. // All rights reserved. // +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -380,23 +318,21 @@ type X__float128 = float64 /* :47:21 */ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -427,269 +363,139 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// - -// SPDX-License-Identifier: BSD-4-Clause +// Written by J.T. Conklin 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. // -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. // -// 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. -// 3. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. +// A few notes about usage: // -// 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. +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. -// - -// This file is in the public domain. -// $FreeBSD$ +// Delete pseudo-keywords wherever they are not available or needed. -// - -// SPDX-License-Identifier: BSD-3-Clause +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Copyright (c) 1988, 1993 -// The Regents of the University of California. All rights reserved. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// 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. -// 3. 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. -// -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - -type X__uint64_t = uint64 /* _types.h:68:28 */ - -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. - -type Nl_item = X__nl_item /* langinfo.h:38:19 */ +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. // -// This software was developed by David Chisnall under sponsorship from -// the FreeBSD Foundation. +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// 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. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// $FreeBSD$ +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type Nl_catd = uintptr /* nl_types.h:81:3 */ + +type Nl_item = int32 /* nl_types.h:83:14 */ -type Locale_t = uintptr /* _langinfo.h:39:25 */ +type Locale_t = uintptr /* langinfo.h:76:14 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go index 55f4505e4d..e97366e32a 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go @@ -77,7 +77,7 @@ const ( X_NL_TYPES_H_ = 0 // nl_types.h:34:1: X_RET_PROTECTOR = 1 // :2:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go index 55f4505e4d..37fd78838e 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_amd64.go -pkgname langinfo', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_arm64.go -pkgname langinfo', DO NOT EDIT. package langinfo @@ -73,11 +73,11 @@ const ( X_LANGINFO_H_ = 0 // langinfo.h:10:1: X_LOCALE_T_DEFINED_ = 0 // langinfo.h:75:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: X_NL_TYPES_H_ = 0 // nl_types.h:34:1: X_RET_PROTECTOR = 1 // :2:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -170,10 +170,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -375,10 +372,7 @@ type X_nl_catd = struct { // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. diff --git a/vendor/modernc.org/libc/libc_darwin.go b/vendor/modernc.org/libc/libc_darwin.go index 65741a4209..1dc5b9260a 100644 --- a/vendor/modernc.org/libc/libc_darwin.go +++ b/vendor/modernc.org/libc/libc_darwin.go @@ -13,6 +13,7 @@ import ( "os/exec" gosignal "os/signal" "path/filepath" + "runtime" "strings" "syscall" gotime "time" @@ -383,6 +384,8 @@ func Xsysconf(t *TLS, name int32) long { switch name { case unistd.X_SC_PAGESIZE: return long(unix.Getpagesize()) + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("")) diff --git a/vendor/modernc.org/libc/libc_freebsd.go b/vendor/modernc.org/libc/libc_freebsd.go index abc5834190..486f8ec458 100644 --- a/vendor/modernc.org/libc/libc_freebsd.go +++ b/vendor/modernc.org/libc/libc_freebsd.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "strings" "syscall" @@ -275,6 +276,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) diff --git a/vendor/modernc.org/libc/libc_linux.go b/vendor/modernc.org/libc/libc_linux.go index 0989c6d5c4..b2910d9e1d 100644 --- a/vendor/modernc.org/libc/libc_linux.go +++ b/vendor/modernc.org/libc/libc_linux.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "syscall" "time" @@ -259,6 +260,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) diff --git a/vendor/modernc.org/libc/libc_netbsd.go b/vendor/modernc.org/libc/libc_netbsd.go index 41fcf8f974..77a28cb5d8 100644 --- a/vendor/modernc.org/libc/libc_netbsd.go +++ b/vendor/modernc.org/libc/libc_netbsd.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "strings" "syscall" @@ -309,6 +310,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) diff --git a/vendor/modernc.org/libc/libc_openbsd.go b/vendor/modernc.org/libc/libc_openbsd.go index aee3ced532..62a820cd14 100644 --- a/vendor/modernc.org/libc/libc_openbsd.go +++ b/vendor/modernc.org/libc/libc_openbsd.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "strings" "syscall" @@ -309,6 +310,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) @@ -1486,7 +1489,7 @@ func X__errno(t *TLS) uintptr { } 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))) + return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & uint32(3))) } func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ @@ -1523,7 +1526,7 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth 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)) + (*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) return 0 } @@ -1591,3 +1594,5 @@ func Xbswap32(t *TLS, x uint32) uint32 { func Xbswap64(t *TLS, x uint64) uint64 { return X__builtin_bswap64(t, x) } + +func X__builtin_isblank(t *TLS, _c int32) int32 { return Xisblank(t, _c) } diff --git a/vendor/modernc.org/libc/libc_openbsd_386.go b/vendor/modernc.org/libc/libc_openbsd_386.go index 763d28bc2a..8c30e7b5ac 100644 --- a/vendor/modernc.org/libc/libc_openbsd_386.go +++ b/vendor/modernc.org/libc/libc_openbsd_386.go @@ -596,7 +596,7 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err } return &fts.FTSENT{ - Ffts_info: int32(info), + Ffts_info: uint16(info), Ffts_path: csp, Ffts_pathlen: uint32(len(path)), Ffts_statp: statp, diff --git a/vendor/modernc.org/libc/libc_windows_386.go b/vendor/modernc.org/libc/libc_windows_386.go index d50f05fa3e..d48e6f65ce 100644 --- a/vendor/modernc.org/libc/libc_windows_386.go +++ b/vendor/modernc.org/libc/libc_windows_386.go @@ -11,6 +11,7 @@ import ( "unsafe" "modernc.org/libc/errno" + "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" ) @@ -546,3 +547,37 @@ func XDefWindowProcW(t *TLS, _ ...interface{}) int32 { func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int32 { panic(todo("")) } + +// int _fstat( +// +// int fd, +// struct __stat *buffer +// +// ); +func X_fstat(t *TLS, fd int32, buffer uintptr) int32 { + f, ok := fdToFile(fd) + if !ok { + t.setErrno(EBADF) + return -1 + } + + var d syscall.ByHandleFileInformation + err := syscall.GetFileInformationByHandle(f.Handle, &d) + if err != nil { + t.setErrno(EBADF) + return -1 + } + + var bStat32 = (*stat.X_stat32)(unsafe.Pointer(buffer)) + var accessTime = int64(d.LastAccessTime.HighDateTime)<<32 + int64(d.LastAccessTime.LowDateTime) + bStat32.Fst_atime = int32(WindowsTickToUnixSeconds(accessTime)) + var modTime = int64(d.LastWriteTime.HighDateTime)<<32 + int64(d.LastWriteTime.LowDateTime) + bStat32.Fst_mtime = int32(WindowsTickToUnixSeconds(modTime)) + var crTime = int64(d.CreationTime.HighDateTime)<<32 + int64(d.CreationTime.LowDateTime) + bStat32.Fst_ctime = int32(WindowsTickToUnixSeconds(crTime)) + var fSz = int64(d.FileSizeHigh)<<32 + int64(d.FileSizeLow) + bStat32.Fst_size = int32(fSz) + bStat32.Fst_mode = WindowsAttrbiutesToStat(d.FileAttributes) + + return 0 +} diff --git a/vendor/modernc.org/libc/limits/capi_darwin_amd64.go b/vendor/modernc.org/libc/limits/capi_darwin_amd64.go index 5f13594d08..92b08b34e8 100644 --- a/vendor/modernc.org/libc/limits/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/limits/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_darwin_amd64.go -pkgname limits', DO NOT EDIT. package limits diff --git a/vendor/modernc.org/libc/limits/capi_openbsd_386.go b/vendor/modernc.org/libc/limits/capi_openbsd_386.go index ac4d06c134..e4858389aa 100644 --- a/vendor/modernc.org/libc/limits/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/limits/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o limits/limits_freebsd_386.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_openbsd_386.go -pkgname limits', DO NOT EDIT. package limits diff --git a/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go b/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go index c956147808..eed11e7c8c 100644 --- a/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o limits/limits_openbsd_amd64.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_openbsd_arm64.go -pkgname limits', DO NOT EDIT. package limits diff --git a/vendor/modernc.org/libc/limits/capi_windows_386.go b/vendor/modernc.org/libc/limits/capi_windows_386.go index 80740cb5d6..190a6fd609 100644 --- a/vendor/modernc.org/libc/limits/capi_windows_386.go +++ b/vendor/modernc.org/libc/limits/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_windows_386.go -pkgname limits', DO NOT EDIT. package limits diff --git a/vendor/modernc.org/libc/limits/limits_openbsd_386.go b/vendor/modernc.org/libc/limits/limits_openbsd_386.go index dd7d27bf1a..91a50738f3 100644 --- a/vendor/modernc.org/libc/limits/limits_openbsd_386.go +++ b/vendor/modernc.org/libc/limits/limits_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o limits/limits_freebsd_386.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_openbsd_386.go -pkgname limits', DO NOT EDIT. package limits @@ -15,126 +15,112 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ARG_MAX = 262144 // syslimits.h:54:1: - BC_BASE_MAX = 99 // limits.h:65:1: - BC_DIM_MAX = 2048 // limits.h:66:1: - BC_SCALE_MAX = 99 // limits.h:67:1: - BC_STRING_MAX = 1000 // limits.h:68:1: - CHARCLASS_NAME_MAX = 14 // limits.h:69:1: - CHAR_BIT = 8 // limits.h:40:1: - CHAR_MAX = 127 // limits.h:51:1: - CHAR_MIN = -128 // limits.h:52:1: - CHILD_MAX = 40 // syslimits.h:57:1: - COLL_WEIGHTS_MAX = 10 // limits.h:70:1: - EXPR_NEST_MAX = 32 // limits.h:71:1: - GID_MAX = 4294967295 // limits.h:85:1: - INT_MAX = 2147483647 // limits.h:60:1: - INT_MIN = -2147483648 // limits.h:61:1: - IOV_MAX = 1024 // syslimits.h:70:1: - LINE_MAX = 2048 // limits.h:72:1: - LLONG_MAX = 9223372036854775807 // limits.h:69:1: - LLONG_MIN = -9223372036854775808 // limits.h:70:1: - LONG_BIT = 32 // limits.h:94:1: - LONG_MAX = 2147483647 // limits.h:64:1: - LONG_MIN = -2147483648 // limits.h:65:1: - MAX_CANON = 255 // syslimits.h:59:1: - MAX_INPUT = 255 // syslimits.h:60:1: - MB_LEN_MAX = 6 // limits.h:141:1: - MQ_PRIO_MAX = 64 // limits.h:99:1: - NAME_MAX = 255 // syslimits.h:61:1: - NGROUPS_MAX = 1023 // syslimits.h:63:1: - NL_ARGMAX = 4096 // limits.h:125:1: - NL_LANGMAX = 31 // limits.h:137:1: - NL_MSGMAX = 32767 // limits.h:126:1: - NL_NMAX = 1 // limits.h:138:1: - NL_SETMAX = 255 // limits.h:127:1: - NL_TEXTMAX = 2048 // limits.h:128:1: - OFF_MAX = 9223372036854775807 // limits.h:80:1: - OFF_MIN = -9223372036854775808 // limits.h:81:1: - OPEN_MAX = 64 // syslimits.h:66:1: - PASS_MAX = 128 // limits.h:135:1: - PATH_MAX = 1024 // syslimits.h:68:1: - PIPE_BUF = 512 // syslimits.h:69:1: - QUAD_MAX = 9223372036854775807 // limits.h:89:1: - QUAD_MIN = -9223372036854775808 // limits.h:90:1: - RE_DUP_MAX = 255 // limits.h:73:1: - SCHAR_MAX = 127 // limits.h:42:1: - SCHAR_MIN = -128 // limits.h:43:1: - SHRT_MAX = 32767 // limits.h:56:1: - SHRT_MIN = -32768 // limits.h:57:1: - SIZE_T_MAX = 4294967295 // limits.h:78:1: - SSIZE_MAX = 2147483647 // limits.h:74:1: - UCHAR_MAX = 255 // limits.h:45:1: - UID_MAX = 4294967295 // limits.h:86:1: - UINT_MAX = 4294967295 // limits.h:59:1: - ULLONG_MAX = 18446744073709551615 // limits.h:68:1: - ULONG_MAX = 4294967295 // limits.h:63:1: - UQUAD_MAX = 18446744073709551615 // limits.h:88:1: - USHRT_MAX = 65535 // limits.h:55:1: - WORD_BIT = 32 // limits.h:95:1: + ARG_MAX = 524288 // syslimits.h:38:1: + BC_BASE_MAX = 2147483647 // syslimits.h:51:1: + BC_DIM_MAX = 65535 // syslimits.h:52:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: + BC_STRING_MAX = 2147483647 // syslimits.h:54:1: + CHAR_BIT = 8 // limits.h:36:1: + CHAR_MAX = 0x7f // limits.h:46:1: + CHAR_MIN = -128 // limits.h:47:1: + CHILD_MAX = 80 // syslimits.h:39:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: + EXPR_NEST_MAX = 32 // syslimits.h:56:1: + GID_MAX = 4294967295 // limits.h:84:1: + HOST_NAME_MAX = 255 // syslimits.h:76:1: + INT_MAX = 0x7fffffff // limits.h:57:1: + INT_MIN = -2147483648 // limits.h:58:1: + IOV_MAX = 1024 // syslimits.h:64:1: + LINE_MAX = 2048 // syslimits.h:57:1: + LINK_MAX = 32767 // syslimits.h:40:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: + LLONG_MIN = -9223372036854775808 // limits.h:78:1: + LOGIN_NAME_MAX = 32 // syslimits.h:72:1: + LONG_BIT = 32 // limits.h:91:1: + LONG_MAX = 0x7fffffff // limits.h:69:1: + LONG_MIN = -2147483648 // limits.h:70:1: + MAX_CANON = 255 // syslimits.h:41:1: + MAX_INPUT = 255 // syslimits.h:42:1: + MB_LEN_MAX = 4 // limits.h:50:1: + NAME_MAX = 255 // syslimits.h:43:1: + NGROUPS_MAX = 16 // syslimits.h:44:1: + NL_ARGMAX = 9 // limits.h:89:1: + NL_LANGMAX = 14 // limits.h:90:1: + NL_MSGMAX = 32767 // limits.h:91:1: + NL_SETMAX = 255 // limits.h:92:1: + NL_TEXTMAX = 255 // limits.h:93:1: + NZERO = 20 // syslimits.h:65:1: + OPEN_MAX = 64 // syslimits.h:45:1: + PATH_MAX = 1024 // syslimits.h:46:1: + PIPE_BUF = 512 // syslimits.h:47:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:48:1: + QUAD_MIN = -9223372036854775808 // limits.h:49:1: + RE_DUP_MAX = 255 // syslimits.h:59:1: + SCHAR_MAX = 0x7f // limits.h:38:1: + SCHAR_MIN = -128 // limits.h:39:1: + SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: + SHRT_MAX = 0x7fff // limits.h:53:1: + SHRT_MIN = -32768 // limits.h:54:1: + SIZE_T_MAX = 4294967295 // limits.h:45:1: + SSIZE_MAX = 2147483647 // limits.h:41:1: + SYMLINK_MAX = 1024 // syslimits.h:48:1: + SYMLOOP_MAX = 32 // syslimits.h:49:1: + TTY_NAME_MAX = 260 // syslimits.h:71:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 4294967295 // limits.h:83:1: + UINT_MAX = 0xffffffff // limits.h:56:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: + ULONG_MAX = 0xffffffff // limits.h:68:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:47:1: + USHRT_MAX = 0xffff // limits.h:52:1: + WORD_BIT = 32 // limits.h:93:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_ILP32 = 1 // :1:1: X_LIMITS_H_ = 0 // limits.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_POSIX2_BC_BASE_MAX = 99 // limits.h:75:1: - X_POSIX2_BC_DIM_MAX = 2048 // limits.h:76:1: - X_POSIX2_BC_SCALE_MAX = 99 // limits.h:77:1: - X_POSIX2_BC_STRING_MAX = 1000 // limits.h:78:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: - X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:80:1: - X_POSIX2_EQUIV_CLASS_MAX = 2 // limits.h:81:1: - X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:82:1: - X_POSIX2_LINE_MAX = 2048 // limits.h:83:1: - X_POSIX2_RE_DUP_MAX = 255 // limits.h:84:1: - X_POSIX_AIO_LISTIO_MAX = 2 // limits.h:89:1: - X_POSIX_AIO_MAX = 1 // limits.h:90:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: X_POSIX_ARG_MAX = 4096 // limits.h:41:1: - X_POSIX_CHILD_MAX = 25 // limits.h:51:1: - X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:100:1: - X_POSIX_DELAYTIMER_MAX = 32 // limits.h:91:1: - X_POSIX_HOST_NAME_MAX = 255 // limits.h:110:1: - X_POSIX_LINK_MAX = 8 // limits.h:42:1: - X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:111:1: - X_POSIX_MAX_CANON = 255 // limits.h:43:1: - X_POSIX_MAX_INPUT = 255 // limits.h:44:1: - X_POSIX_MQ_OPEN_MAX = 8 // limits.h:92:1: - X_POSIX_MQ_PRIO_MAX = 32 // limits.h:93:1: - X_POSIX_NAME_MAX = 14 // limits.h:45:1: - X_POSIX_NGROUPS_MAX = 8 // limits.h:52:1: - X_POSIX_OPEN_MAX = 20 // limits.h:53:1: - X_POSIX_PATH_MAX = 256 // limits.h:54:1: - X_POSIX_PIPE_BUF = 512 // limits.h:46:1: - X_POSIX_RE_DUP_MAX = 255 // limits.h:121:1: - X_POSIX_RTSIG_MAX = 8 // limits.h:94:1: - X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:95:1: - X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:96:1: - X_POSIX_SIGQUEUE_MAX = 32 // limits.h:97:1: - X_POSIX_SSIZE_MAX = 32767 // limits.h:47:1: - X_POSIX_SS_REPL_MAX = 4 // limits.h:112:1: - X_POSIX_STREAM_MAX = 8 // limits.h:48:1: - X_POSIX_SYMLINK_MAX = 255 // limits.h:113:1: - X_POSIX_SYMLOOP_MAX = 8 // limits.h:114:1: - X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:104:1: - X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:105:1: - X_POSIX_THREAD_THREADS_MAX = 64 // limits.h:106:1: - X_POSIX_TIMER_MAX = 32 // limits.h:98:1: - X_POSIX_TRACE_EVENT_NAME_MAX = 30 // limits.h:115:1: - X_POSIX_TRACE_NAME_MAX = 8 // limits.h:116:1: - X_POSIX_TRACE_SYS_MAX = 8 // limits.h:117:1: - X_POSIX_TRACE_USER_EVENT_MAX = 32 // limits.h:118:1: - X_POSIX_TTY_NAME_MAX = 9 // limits.h:119:1: - X_POSIX_TZNAME_MAX = 6 // limits.h:55:1: + X_POSIX_CHILD_MAX = 25 // limits.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: + X_POSIX_LINK_MAX = 8 // limits.h:43:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: + X_POSIX_MAX_CANON = 255 // limits.h:44:1: + X_POSIX_MAX_INPUT = 255 // limits.h:45:1: + X_POSIX_NAME_MAX = 14 // limits.h:46:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: + X_POSIX_OPEN_MAX = 20 // limits.h:63:1: + X_POSIX_PATH_MAX = 256 // limits.h:47:1: + X_POSIX_PIPE_BUF = 512 // limits.h:48:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: + X_POSIX_STREAM_MAX = 8 // limits.h:53:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: + X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_LIMITS_H_ = 0 // limits.h:35:1: - X_SYS_SYSLIMITS_H_ = 0 // syslimits.h:36:1: - X_XOPEN_IOV_MAX = 16 // limits.h:132:1: - X_XOPEN_NAME_MAX = 255 // limits.h:133:1: - X_XOPEN_PATH_MAX = 1024 // limits.h:134:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_SYS_LIMITS_H_ = 0 // limits.h:27:1: + X_XOPEN_IOV_MAX = 16 // limits.h:106:1: + X_XOPEN_NAME_MAX = 255 // limits.h:107:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -146,11 +132,11 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 -// The Regents of the University of California. All rights reserved. +// $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ +// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ + +// Copyright (c) 1988 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 @@ -176,12 +162,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.2 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)limits.h 5.9 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -212,63 +197,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Testing against Clang-specific extensions. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. - -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -297,118 +258,141 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. +// Delete pseudo-keywords wherever they are not available or needed. -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function acquires an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function attempts to acquire an exclusive or shared lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function releases a lock. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function asserts that an exclusive or shared lock is held. +// Default values. -// Function requires that an exclusive or shared lock is or is not held. - -// Function should not be analyzed. +// $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ +// Copyright (c) 2002 Marc Espie. +// +// 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. +// +// THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT 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 OPENBSD +// PROJECT 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, 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. +// 3. 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. +// +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Guard variables and structure members by lock. +// Common definitions for limits.h. -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// Legacy +// $OpenBSD: limits.h,v 1.14 2015/04/30 13:42:08 millert Exp $ +// $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1988 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 @@ -434,11 +418,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)limits.h 7.2 (Berkeley) 6/28/90 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -469,16 +453,15 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// max value for unsigned long long +// max value for a signed long long +// min value for a signed long long + +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ +// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1988, 1993 // The Regents of the University of California. All rights reserved. // @@ -506,26 +489,17 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long +// @(#)syslimits.h 8.1 (Berkeley) 6/2/93 -// Minimum signal stack size. +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -550,18 +524,6 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)syslimits.h 8.1 (Berkeley) 6/2/93 -// $FreeBSD$ - -// Do not add any new variables here. (See the comment at the end of -// the file for why.) - -// We leave the following values undefined to force applications to either -// assume conservative values or call sysconf() to get the current value. -// -// HOST_NAME_MAX -// -// (We should do this for most of the values currently defined here, -// but many programs are not prepared to deal with this yet.) +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go b/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go index 082e9f0cd7..897fff0178 100644 --- a/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go +++ b/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go @@ -79,6 +79,7 @@ const ( X_LP64 = 1 // :1:1: X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: X_MACHINE_LIMITS_H_ = 0 // limits.h:35:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: @@ -119,7 +120,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:106:1: X_XOPEN_NAME_MAX = 255 // limits.h:107:1: X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -470,7 +471,7 @@ type X__float128 = float64 /* :47:21 */ // max value for a signed long long // min value for a signed long long -// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ // Copyright (c) 1988, 1993 diff --git a/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go b/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go index 082e9f0cd7..20efc3584d 100644 --- a/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go +++ b/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o limits/limits_openbsd_amd64.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_openbsd_arm64.go -pkgname limits', DO NOT EDIT. package limits @@ -21,8 +21,8 @@ const ( BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: BC_STRING_MAX = 2147483647 // syslimits.h:54:1: CHAR_BIT = 8 // limits.h:36:1: - CHAR_MAX = 0x7f // limits.h:46:1: - CHAR_MIN = -128 // limits.h:47:1: + CHAR_MAX = 0xff // limits.h:44:1: + CHAR_MIN = 0 // limits.h:43:1: CHILD_MAX = 80 // syslimits.h:39:1: COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: EXPR_NEST_MAX = 32 // syslimits.h:56:1: @@ -53,16 +53,17 @@ const ( OPEN_MAX = 64 // syslimits.h:45:1: PATH_MAX = 1024 // syslimits.h:46:1: PIPE_BUF = 512 // syslimits.h:47:1: - QUAD_MAX = 0x7fffffffffffffff // limits.h:47:1: - QUAD_MIN = -9223372036854775808 // limits.h:48:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:51:1: + QUAD_MIN = -9223372036854775808 // limits.h:52:1: RE_DUP_MAX = 255 // syslimits.h:59:1: SCHAR_MAX = 0x7f // limits.h:38:1: SCHAR_MIN = -128 // limits.h:39:1: SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: SHRT_MAX = 0x7fff // limits.h:53:1: SHRT_MIN = -32768 // limits.h:54:1: - SIZE_T_MAX = 18446744073709551615 // limits.h:44:1: - SSIZE_MAX = 9223372036854775807 // limits.h:40:1: + SIZE_MAX = 18446744073709551615 // limits.h:42:1: + SIZE_T_MAX = 18446744073709551615 // limits.h:48:1: + SSIZE_MAX = 9223372036854775807 // limits.h:44:1: SYMLINK_MAX = 1024 // syslimits.h:48:1: SYMLOOP_MAX = 32 // syslimits.h:49:1: TTY_NAME_MAX = 260 // syslimits.h:71:1: @@ -71,14 +72,15 @@ const ( UINT_MAX = 0xffffffff // limits.h:56:1: ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: ULONG_MAX = 0xffffffffffffffff // limits.h:61:1: - UQUAD_MAX = 0xffffffffffffffff // limits.h:46:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:50:1: USHRT_MAX = 0xffff // limits.h:52:1: WORD_BIT = 32 // limits.h:93:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_LIMITS_H_ = 0 // limits.h:36:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_LIMITS_H_ = 0 // limits.h:35:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: @@ -119,7 +121,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:106:1: X_XOPEN_NAME_MAX = 255 // limits.h:107:1: X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -207,10 +209,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -396,7 +395,8 @@ type X__float128 = float64 /* :47:21 */ // Common definitions for limits.h. // Legacy -// $OpenBSD: limits.h,v 1.6 2015/04/30 13:42:08 millert Exp $ +// $OpenBSD: limits.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ +// $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ // Copyright (c) 1988 The Regents of the University of California. // All rights reserved. @@ -425,7 +425,7 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 7.2 (Berkeley) 6/28/90 +// from: @(#)limits.h 7.2 (Berkeley) 6/28/90 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ @@ -470,7 +470,7 @@ type X__float128 = float64 /* :47:21 */ // max value for a signed long long // min value for a signed long long -// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ // Copyright (c) 1988, 1993 diff --git a/vendor/modernc.org/libc/limits/limits_windows_386.go b/vendor/modernc.org/libc/limits/limits_windows_386.go index 1be004f886..938112357d 100644 --- a/vendor/modernc.org/libc/limits/limits_windows_386.go +++ b/vendor/modernc.org/libc/limits/limits_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname limits', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o limits/limits_windows_386.go -pkgname limits', DO NOT EDIT. package limits @@ -15,124 +15,124 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CHAR_BIT = 8 - CHAR_MAX = 127 - CHAR_MIN = -128 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - INT_MAX = 2147483647 - INT_MIN = -2147483648 - LLONG_MAX = 9223372036854775807 - LLONG_MIN = -9223372036854775808 - LONG_LONG_MAX = 9223372036854775807 - LONG_LONG_MIN = -9223372036854775808 - LONG_MAX = 2147483647 - LONG_MIN = -2147483648 - MB_LEN_MAX = 5 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - PATH_MAX = 260 - SCHAR_MAX = 127 - SCHAR_MIN = -128 - SHRT_MAX = 32767 - SHRT_MIN = -32768 - SIZE_MAX = 4294967295 - SSIZE_MAX = 2147483647 - UCHAR_MAX = 255 - UINT_MAX = 4294967295 - ULLONG_MAX = 18446744073709551615 - ULONG_LONG_MAX = 18446744073709551615 - ULONG_MAX = 4294967295 - UNALIGNED = 0 - USE___UUIDOF = 0 - USHRT_MAX = 65535 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_GCC_LIMITS_H_ = 0 - X_I16_MAX = 32767 - X_I16_MIN = -32768 - X_I32_MAX = 2147483647 - X_I32_MIN = -2147483648 - X_I64_MAX = 9223372036854775807 - X_I64_MIN = -9223372036854775808 - X_I8_MAX = 127 - X_I8_MIN = -128 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_LIMITS = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LIMITS_H___ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UI16_MAX = 0xffff - X_UI32_MAX = 0xffffffff - X_UI64_MAX = 0xffffffffffffffff - X_UI8_MAX = 0xff - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1: + LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1: + LONG_MAX = 2147483647 // limits.h:131:1: + LONG_MIN = -2147483648 // limits.h:129:1: + MB_LEN_MAX = 5 // limits.h:35:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + PATH_MAX = 260 // limits.h:20:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SIZE_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:86:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_LONG_MAX = 18446744073709551615 // limits.h:158:1: + ULONG_MAX = 4294967295 // limits.h:135:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + USHRT_MAX = 65535 // limits.h:113:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_I16_MAX = 32767 // limits.h:54:1: + X_I16_MIN = -32768 // limits.h:53:1: + X_I32_MAX = 2147483647 // limits.h:58:1: + X_I32_MIN = -2147483648 // limits.h:57:1: + X_I64_MAX = 9223372036854775807 // limits.h:71:1: + X_I64_MIN = -9223372036854775808 // limits.h:70:1: + X_I8_MAX = 127 // limits.h:50:1: + X_I8_MIN = -128 // limits.h:49:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_LIMITS = 0 // limits.h:9:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UI16_MAX = 0xffff // limits.h:55:1: + X_UI32_MAX = 0xffffffff // limits.h:59:1: + X_UI64_MAX = 0xffffffffffffffff // limits.h:72:1: + X_UI8_MAX = 0xff // limits.h:51:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -146,7 +146,7 @@ type X__float128 = float64 /* :47:21 */ type Va_list = X__builtin_va_list /* :50:27 */ -// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -200,6 +200,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -220,6 +225,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -260,26 +271,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -305,29 +318,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // File system limits // @@ -337,7 +350,7 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. -// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. // // This file is part of GCC. // diff --git a/vendor/modernc.org/libc/musl_darwin_amd64.go b/vendor/modernc.org/libc/musl_darwin_amd64.go index c967a27dcd..350e8defd2 100644 --- a/vendor/modernc.org/libc/musl_darwin_amd64.go +++ b/vendor/modernc.org/libc/musl_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.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/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/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/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.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', DO NOT EDIT. +// Code generated by 'ccgo -D__environ=environ -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.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/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/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/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.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', DO NOT EDIT. package libc @@ -362,55 +362,55 @@ var X__darwin_check_fd_set_overflow uintptr /* :146:5: */ // pthread opaque structures type __darwin_pthread_handler_rec = struct { - __routine uintptr - __arg uintptr - __next uintptr + F__routine uintptr + F__arg uintptr + F__next uintptr } /* table.c:1396:1 */ type _opaque_pthread_attr_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1402:1 */ type _opaque_pthread_cond_t = struct { - __sig int64 - __opaque [40]int8 + F__sig int64 + F__opaque [40]int8 } /* table.c:1407:1 */ type _opaque_pthread_condattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1412:1 */ type _opaque_pthread_mutex_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1417:1 */ type _opaque_pthread_mutexattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1422:1 */ type _opaque_pthread_once_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1427:1 */ type _opaque_pthread_rwlock_t = struct { - __sig int64 - __opaque [192]int8 + F__sig int64 + F__opaque [192]int8 } /* table.c:1432:1 */ type _opaque_pthread_rwlockattr_t = struct { - __sig int64 - __opaque [16]int8 + F__sig int64 + F__opaque [16]int8 } /* table.c:1437:1 */ type _opaque_pthread_t = struct { - __sig int64 - __cleanup_stack uintptr - __opaque [8176]int8 + F__sig int64 + F__cleanup_stack uintptr + F__opaque [8176]int8 } /* table.c:1442:1 */ type ct_rune_t = int32 /* table.c:1527:28 */ @@ -420,42 +420,42 @@ type rune_t = int32 /* table.c:1536:25 */ type wint_t = int32 /* table.c:1558:25 */ type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr + F__min int32 + F__max int32 + F__map int32 + F__ccgo_pad1 [4]byte + F__types uintptr } /* table.c:1575:3 */ type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr } /* table.c:1580:3 */ type _RuneCharClass = struct { - __name [14]int8 - _ [2]byte - __mask uint32 + F__name [14]int8 + F__ccgo_pad1 [2]byte + F__mask uint32 } /* table.c:1585:3 */ type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - __runetype [256]uint32 - __maplower [256]int32 - __mapupper [256]int32 - _ [4]byte - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - __ncharclasses int32 - __charclasses uintptr + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__runetype [256]uint32 + F__maplower [256]int32 + F__mapupper [256]int32 + F__ccgo_pad1 [4]byte + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 + F__ncharclasses int32 + F__charclasses uintptr } /* table.c:1616:3 */ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */ @@ -584,7 +584,7 @@ func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */ return Xtolower(tls, c) } -var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, __encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, __invalid_rune: 0xfffd, __runetype: [256]uint32{ +var X_DefaultRuneLocale = _RuneLocale{F__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, F__encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, F__invalid_rune: 0xfffd, F__runetype: [256]uint32{ uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), @@ -601,7 +601,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), -}, __maplower: [256]int32{ +}, F__maplower: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -618,7 +618,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, -}, __mapupper: [256]int32{ +}, F__mapupper: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -641,16 +641,16 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */ type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type locale_t = uintptr /* alltypes.h:343:32 */ @@ -877,39 +877,39 @@ 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 + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:320:9 */ type FILE = _IO_FILE /* alltypes.h:320:25 */ @@ -917,8 +917,8 @@ type FILE = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -931,7 +931,7 @@ 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 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -941,7 +941,7 @@ 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 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -960,58 +960,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -1050,8 +1050,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1060,13 +1060,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1077,8 +1077,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1119,8 +1119,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1131,8 +1131,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1374,16 +1374,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1393,8 +1393,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1408,8 +1408,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1420,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1450,18 +1450,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1481,8 +1481,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1492,8 +1492,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1573,8 +1573,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -1583,8 +1583,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1593,8 +1593,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1602,14 +1602,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1621,8 +1621,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1631,21 +1631,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1655,8 +1655,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -1665,8 +1665,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1676,8 +1676,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -1687,16 +1687,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -1743,8 +1743,8 @@ __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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -1758,8 +1758,8 @@ __3: } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1769,8 +1769,8 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1778,23 +1778,23 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -1827,8 +1827,8 @@ __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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -1850,8 +1850,8 @@ __17: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1868,8 +1868,8 @@ __20: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1898,8 +1898,8 @@ __26: goto __27 __27: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1916,8 +1916,8 @@ __29: goto __30 __30: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1936,8 +1936,8 @@ __32: goto __33 __33: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1954,8 +1954,8 @@ __35: goto __36 __36: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1977,8 +1977,8 @@ __39: goto __40 __40: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1997,8 +1997,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -2031,64 +2031,64 @@ __43: // 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 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 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) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } 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) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = 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) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*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) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + 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 int8 - frac_digits int8 - p_cs_precedes int8 - p_sep_by_space int8 - n_cs_precedes int8 - n_sep_by_space int8 - p_sign_posn int8 - n_sign_posn int8 - int_p_cs_precedes int8 - int_p_sep_by_space int8 - int_n_cs_precedes int8 - int_n_sep_by_space int8 - int_p_sign_posn int8 - int_n_sign_posn int8 - _ [2]byte + Fdecimal_point uintptr + Fthousands_sep uintptr + Fgrouping uintptr + Fint_curr_symbol uintptr + Fcurrency_symbol uintptr + Fmon_decimal_point uintptr + Fmon_thousands_sep uintptr + Fmon_grouping uintptr + Fpositive_sign uintptr + Fnegative_sign uintptr + Fint_frac_digits int8 + Ffrac_digits int8 + Fp_cs_precedes int8 + Fp_sep_by_space int8 + Fn_cs_precedes int8 + Fn_sep_by_space int8 + Fp_sign_posn int8 + Fn_sign_posn int8 + Fint_p_cs_precedes int8 + Fint_p_sep_by_space int8 + Fint_n_cs_precedes int8 + Fint_n_sep_by_space int8 + Fint_p_sign_posn int8 + Fint_n_sign_posn int8 + F__ccgo_pad1 [2]byte } /* locale.h:24:1 */ // Support signed or unsigned plain-char @@ -2100,7 +2100,7 @@ type lconv = struct { // 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: Int8FromInt32(255), frac_digits: Int8FromInt32(255), p_cs_precedes: Int8FromInt32(255), p_sep_by_space: Int8FromInt32(255), n_cs_precedes: Int8FromInt32(255), n_sep_by_space: Int8FromInt32(255), p_sign_posn: Int8FromInt32(255), n_sign_posn: Int8FromInt32(255), int_p_cs_precedes: Int8FromInt32(255), int_p_sep_by_space: Int8FromInt32(255), int_n_cs_precedes: Int8FromInt32(255), int_n_sep_by_space: Int8FromInt32(255), int_p_sign_posn: Int8FromInt32(255), int_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ +var posix_lconv = lconv{Fdecimal_point: ts + 23, Fthousands_sep: ts + 13, Fgrouping: ts + 13, Fint_curr_symbol: ts + 13, Fcurrency_symbol: ts + 13, Fmon_decimal_point: ts + 13, Fmon_thousands_sep: ts + 13, Fmon_grouping: ts + 13, Fpositive_sign: ts + 13, Fnegative_sign: ts + 13, Fint_frac_digits: Int8FromInt32(255), Ffrac_digits: Int8FromInt32(255), Fp_cs_precedes: Int8FromInt32(255), Fp_sep_by_space: Int8FromInt32(255), Fn_cs_precedes: Int8FromInt32(255), Fn_sep_by_space: Int8FromInt32(255), Fp_sign_posn: Int8FromInt32(255), Fn_sign_posn: Int8FromInt32(255), Fint_p_cs_precedes: Int8FromInt32(255), Fint_p_sep_by_space: Int8FromInt32(255), Fint_n_cs_precedes: Int8FromInt32(255), Fint_n_sep_by_space: Int8FromInt32(255), Fint_p_sign_posn: Int8FromInt32(255), Fint_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */ return uintptr(unsafe.Pointer(&posix_lconv)) @@ -2110,7 +2110,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2134,7 +2134,7 @@ 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 }) { + *(*struct{ Ff float32 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float32 }) { *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2184,7 +2184,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2213,7 +2213,7 @@ 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 u struct {Ff float64;} at bp, 8 var y double_t = x @@ -2250,18 +2250,18 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:41:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:355:1 */ type socklen_t = uint32 /* alltypes.h:361:18 */ @@ -2269,311 +2269,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */ type sa_family_t = uint16 /* alltypes.h:366: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 + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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 in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_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 + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__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 + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_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 + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_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 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_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 } + 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: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 } + 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:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + 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]int8 + F__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 } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_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 + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_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 + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_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 + 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: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 + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_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 + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [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 + Fai 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 + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [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 + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype 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 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout 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) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -2586,8 +2586,8 @@ type time_t = int64 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:229:1 */ type pthread_t = uintptr /* alltypes.h:273:26 */ @@ -2598,62 +2598,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:402:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ @@ -2661,35 +2661,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int64 /* alltypes.h:219: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 + 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 } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ @@ -2721,10 +2721,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } 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 + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -2820,7 +2820,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -2830,30 +2830,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //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 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 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 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { 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) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) 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 + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -2867,33 +2867,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid 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 + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -2931,13 +2931,13 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf //TODO struct sockaddr_in6 sin6; //TODO } sa = { .sin.sin_family = af }; *(*struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte })(unsafe.Pointer(bp)) = struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte }{} //TODO- - (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO- + (*sockaddr_in)(unsafe.Pointer(bp)).Fsin_family = sa_family_t(af) //TODO- var sl socklen_t if af == 10 { sl = uint32(unsafe.Sizeof(sockaddr_in6{})) @@ -2969,17 +2969,17 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf 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 + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_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)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list)) = buf + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) = buf + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { case -3: @@ -3000,9 +3000,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf 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)) + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*hostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } @@ -3076,8 +3076,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -3088,7 +3088,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, 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 + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -3098,117 +3098,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_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)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_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 + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_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 + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -3222,24 +3222,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [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 + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -3253,45 +3253,45 @@ 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 */ + F__ccgo_pad1 [0]uint32 + Fid 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 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount 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]int8 - 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]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -3299,10 +3299,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -3373,13 +3373,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 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) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -3433,7 +3433,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc // var num [13]int8 at bp+334, 13 - var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).Fsa_family) var a uintptr var scopeid uint32 @@ -3456,7 +3456,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc } else { mkptr4(tls, bp, a+uintptr(12)) } - scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).Fsin6_scope_id break default: return -6 @@ -3504,7 +3504,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc if serv != 0 && servlen != 0 { var p uintptr = bp + 78 /* buf */ - var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).Fsin_port)) *(*int8)(unsafe.Pointer(bp + 78)) = int8(0) if !(flags&0x02 != 0) { reverse_services(tls, bp+78, port, flags&0x10) @@ -3762,8 +3762,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 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) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -3786,7 +3786,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -3810,20 +3810,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:152:18 */ 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 + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -3849,14 +3849,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 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 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -3949,10 +3949,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [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: */ @@ -4002,31 +4002,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel 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)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), Fprec: uint8(40), Flabel: 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 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 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)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -4035,7 +4035,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -4068,7 +4068,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 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 + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -4148,7 +4148,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -4165,12 +4165,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -4197,8 +4197,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -4226,7 +4226,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -4278,9 +4278,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -4295,14 +4295,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -4375,19 +4375,19 @@ func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */ } 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 { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*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)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).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 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&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 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -4409,7 +4409,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ 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) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -4441,11 +4441,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -4475,12 +4475,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_darwin_arm64.go b/vendor/modernc.org/libc/musl_darwin_arm64.go index b5f7268506..e6fc642a81 100644 --- a/vendor/modernc.org/libc/musl_darwin_arm64.go +++ b/vendor/modernc.org/libc/musl_darwin_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.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/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/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/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.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', DO NOT EDIT. +// Code generated by 'ccgo -D__environ=environ -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.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/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/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/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.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', DO NOT EDIT. package libc @@ -362,55 +362,55 @@ var X__darwin_check_fd_set_overflow uintptr /* :146:5: */ // pthread opaque structures type __darwin_pthread_handler_rec = struct { - __routine uintptr - __arg uintptr - __next uintptr + F__routine uintptr + F__arg uintptr + F__next uintptr } /* table.c:1396:1 */ type _opaque_pthread_attr_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1402:1 */ type _opaque_pthread_cond_t = struct { - __sig int64 - __opaque [40]int8 + F__sig int64 + F__opaque [40]int8 } /* table.c:1407:1 */ type _opaque_pthread_condattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1412:1 */ type _opaque_pthread_mutex_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1417:1 */ type _opaque_pthread_mutexattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1422:1 */ type _opaque_pthread_once_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1427:1 */ type _opaque_pthread_rwlock_t = struct { - __sig int64 - __opaque [192]int8 + F__sig int64 + F__opaque [192]int8 } /* table.c:1432:1 */ type _opaque_pthread_rwlockattr_t = struct { - __sig int64 - __opaque [16]int8 + F__sig int64 + F__opaque [16]int8 } /* table.c:1437:1 */ type _opaque_pthread_t = struct { - __sig int64 - __cleanup_stack uintptr - __opaque [8176]int8 + F__sig int64 + F__cleanup_stack uintptr + F__opaque [8176]int8 } /* table.c:1442:1 */ type ct_rune_t = int32 /* table.c:1527:28 */ @@ -420,42 +420,42 @@ type rune_t = int32 /* table.c:1536:25 */ type wint_t = int32 /* table.c:1558:25 */ type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr + F__min int32 + F__max int32 + F__map int32 + F__ccgo_pad1 [4]byte + F__types uintptr } /* table.c:1575:3 */ type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr } /* table.c:1580:3 */ type _RuneCharClass = struct { - __name [14]int8 - _ [2]byte - __mask uint32 + F__name [14]int8 + F__ccgo_pad1 [2]byte + F__mask uint32 } /* table.c:1585:3 */ type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - __runetype [256]uint32 - __maplower [256]int32 - __mapupper [256]int32 - _ [4]byte - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - __ncharclasses int32 - __charclasses uintptr + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__runetype [256]uint32 + F__maplower [256]int32 + F__mapupper [256]int32 + F__ccgo_pad1 [4]byte + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 + F__ncharclasses int32 + F__charclasses uintptr } /* table.c:1616:3 */ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */ @@ -584,7 +584,7 @@ func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */ return Xtolower(tls, c) } -var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, __encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, __invalid_rune: 0xfffd, __runetype: [256]uint32{ +var X_DefaultRuneLocale = _RuneLocale{F__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, F__encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, F__invalid_rune: 0xfffd, F__runetype: [256]uint32{ uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), @@ -601,7 +601,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), -}, __maplower: [256]int32{ +}, F__maplower: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -618,7 +618,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, -}, __mapupper: [256]int32{ +}, F__mapupper: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -641,16 +641,16 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */ type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type locale_t = uintptr /* alltypes.h:351:32 */ @@ -877,39 +877,39 @@ 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 + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:328:9 */ type FILE = _IO_FILE /* alltypes.h:328:25 */ @@ -917,8 +917,8 @@ type FILE = _IO_FILE /* alltypes.h:328:25 */ type va_list = uintptr /* alltypes.h:334:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -931,7 +931,7 @@ 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 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -941,7 +941,7 @@ 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 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -960,58 +960,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -1050,8 +1050,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1060,13 +1060,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1077,8 +1077,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1119,8 +1119,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1131,8 +1131,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1374,16 +1374,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1393,8 +1393,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1408,8 +1408,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1420,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1450,18 +1450,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1481,8 +1481,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1492,8 +1492,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1573,8 +1573,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -1583,8 +1583,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1593,8 +1593,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1602,14 +1602,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1621,8 +1621,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1631,21 +1631,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1655,8 +1655,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -1665,8 +1665,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1676,8 +1676,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -1687,16 +1687,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -1743,8 +1743,8 @@ __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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -1758,8 +1758,8 @@ __3: } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1769,8 +1769,8 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1778,23 +1778,23 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -1827,8 +1827,8 @@ __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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -1850,8 +1850,8 @@ __17: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1868,8 +1868,8 @@ __20: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1898,8 +1898,8 @@ __26: goto __27 __27: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1916,8 +1916,8 @@ __29: goto __30 __30: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1936,8 +1936,8 @@ __32: goto __33 __33: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1954,8 +1954,8 @@ __35: goto __36 __36: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1977,8 +1977,8 @@ __39: goto __40 __40: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1997,8 +1997,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -2031,64 +2031,64 @@ __43: // 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 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 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) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } 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) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = 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) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*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) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + 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 int8 - frac_digits int8 - p_cs_precedes int8 - p_sep_by_space int8 - n_cs_precedes int8 - n_sep_by_space int8 - p_sign_posn int8 - n_sign_posn int8 - int_p_cs_precedes int8 - int_p_sep_by_space int8 - int_n_cs_precedes int8 - int_n_sep_by_space int8 - int_p_sign_posn int8 - int_n_sign_posn int8 - _ [2]byte + Fdecimal_point uintptr + Fthousands_sep uintptr + Fgrouping uintptr + Fint_curr_symbol uintptr + Fcurrency_symbol uintptr + Fmon_decimal_point uintptr + Fmon_thousands_sep uintptr + Fmon_grouping uintptr + Fpositive_sign uintptr + Fnegative_sign uintptr + Fint_frac_digits int8 + Ffrac_digits int8 + Fp_cs_precedes int8 + Fp_sep_by_space int8 + Fn_cs_precedes int8 + Fn_sep_by_space int8 + Fp_sign_posn int8 + Fn_sign_posn int8 + Fint_p_cs_precedes int8 + Fint_p_sep_by_space int8 + Fint_n_cs_precedes int8 + Fint_n_sep_by_space int8 + Fint_p_sign_posn int8 + Fint_n_sign_posn int8 + F__ccgo_pad1 [2]byte } /* locale.h:24:1 */ // Support signed or unsigned plain-char @@ -2100,7 +2100,7 @@ type lconv = struct { // 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: Int8FromInt32(255), frac_digits: Int8FromInt32(255), p_cs_precedes: Int8FromInt32(255), p_sep_by_space: Int8FromInt32(255), n_cs_precedes: Int8FromInt32(255), n_sep_by_space: Int8FromInt32(255), p_sign_posn: Int8FromInt32(255), n_sign_posn: Int8FromInt32(255), int_p_cs_precedes: Int8FromInt32(255), int_p_sep_by_space: Int8FromInt32(255), int_n_cs_precedes: Int8FromInt32(255), int_n_sep_by_space: Int8FromInt32(255), int_p_sign_posn: Int8FromInt32(255), int_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ +var posix_lconv = lconv{Fdecimal_point: ts + 23, Fthousands_sep: ts + 13, Fgrouping: ts + 13, Fint_curr_symbol: ts + 13, Fcurrency_symbol: ts + 13, Fmon_decimal_point: ts + 13, Fmon_thousands_sep: ts + 13, Fmon_grouping: ts + 13, Fpositive_sign: ts + 13, Fnegative_sign: ts + 13, Fint_frac_digits: Int8FromInt32(255), Ffrac_digits: Int8FromInt32(255), Fp_cs_precedes: Int8FromInt32(255), Fp_sep_by_space: Int8FromInt32(255), Fn_cs_precedes: Int8FromInt32(255), Fn_sep_by_space: Int8FromInt32(255), Fp_sign_posn: Int8FromInt32(255), Fn_sign_posn: Int8FromInt32(255), Fint_p_cs_precedes: Int8FromInt32(255), Fint_p_sep_by_space: Int8FromInt32(255), Fint_n_cs_precedes: Int8FromInt32(255), Fint_n_sep_by_space: Int8FromInt32(255), Fint_p_sign_posn: Int8FromInt32(255), Fint_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */ return uintptr(unsafe.Pointer(&posix_lconv)) @@ -2110,7 +2110,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2134,7 +2134,7 @@ 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 }) { + *(*struct{ Ff float32 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float32 }) { *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2184,7 +2184,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2213,7 +2213,7 @@ 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 u struct {Ff float64;} at bp, 8 var y double_t = x @@ -2250,18 +2250,18 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:49:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:363:1 */ type socklen_t = uint32 /* alltypes.h:369:18 */ @@ -2269,311 +2269,311 @@ type socklen_t = uint32 /* alltypes.h:369:18 */ type sa_family_t = uint16 /* alltypes.h:374: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 + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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 in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_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 + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__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 + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_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 + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_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 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_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 } + 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: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 } + 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:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + 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]int8 + F__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 } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_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 + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_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 + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_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 + 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: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 + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_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 + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [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 + Fai 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 + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [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 + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype 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 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout 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) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -2586,8 +2586,8 @@ type time_t = int64 /* alltypes.h:93:16 */ type clockid_t = int32 /* alltypes.h:222:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:237:1 */ type pthread_t = uintptr /* alltypes.h:281:26 */ @@ -2598,62 +2598,62 @@ type pthread_key_t = uint32 /* alltypes.h:292:18 */ type pthread_spinlock_t = int32 /* alltypes.h:297:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:302:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:302:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:307:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:307:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:312:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:312:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:317:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:317:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:357:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:357:9 */ type sigset_t = __sigset_t /* alltypes.h:357:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:380:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:385:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:395:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:405:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:410:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:217:14 */ @@ -2661,35 +2661,35 @@ type timer_t = uintptr /* alltypes.h:217:14 */ type clock_t = int64 /* alltypes.h:227: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 + 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 } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ @@ -2721,10 +2721,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } 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 + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -2820,7 +2820,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -2830,30 +2830,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //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 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 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 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { 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) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) 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 + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -2867,33 +2867,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid 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 + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -2931,13 +2931,13 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf //TODO struct sockaddr_in6 sin6; //TODO } sa = { .sin.sin_family = af }; *(*struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte })(unsafe.Pointer(bp)) = struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte }{} //TODO- - (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO- + (*sockaddr_in)(unsafe.Pointer(bp)).Fsin_family = sa_family_t(af) //TODO- var sl socklen_t if af == 10 { sl = uint32(unsafe.Sizeof(sockaddr_in6{})) @@ -2969,17 +2969,17 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf 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 + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_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)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list)) = buf + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) = buf + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { case -3: @@ -3000,9 +3000,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf 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)) + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*hostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } @@ -3076,8 +3076,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -3088,7 +3088,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, 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 + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -3098,117 +3098,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_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)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_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 + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_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 + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -3222,24 +3222,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [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 + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -3253,45 +3253,45 @@ 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 */ + F__ccgo_pad1 [0]uint32 + Fid 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 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount 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]int8 - 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]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -3299,10 +3299,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -3373,13 +3373,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 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) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -3433,7 +3433,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc // var num [13]int8 at bp+334, 13 - var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).Fsa_family) var a uintptr var scopeid uint32 @@ -3456,7 +3456,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc } else { mkptr4(tls, bp, a+uintptr(12)) } - scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).Fsin6_scope_id break default: return -6 @@ -3504,7 +3504,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc if serv != 0 && servlen != 0 { var p uintptr = bp + 78 /* buf */ - var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).Fsin_port)) *(*int8)(unsafe.Pointer(bp + 78)) = int8(0) if !(flags&0x02 != 0) { reverse_services(tls, bp+78, port, flags&0x10) @@ -3762,8 +3762,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 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) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -3786,7 +3786,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -3810,20 +3810,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:160:18 */ 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 + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -3849,14 +3849,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 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 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -3949,10 +3949,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [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: */ @@ -4002,31 +4002,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel 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)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), Fprec: uint8(40), Flabel: 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 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 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)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -4035,7 +4035,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -4068,7 +4068,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 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 + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -4148,7 +4148,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -4165,12 +4165,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -4197,8 +4197,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -4226,7 +4226,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -4278,9 +4278,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -4295,14 +4295,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -4375,19 +4375,19 @@ func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */ } 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 { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*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)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).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 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&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 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -4409,7 +4409,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ 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) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -4441,11 +4441,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -4475,12 +4475,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_openbsd_386.go b/vendor/modernc.org/libc/musl_openbsd_386.go index afe262c368..3bc617399d 100644 --- a/vendor/modernc.org/libc/musl_openbsd_386.go +++ b/vendor/modernc.org/libc/musl_openbsd_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.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/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/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.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/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/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -357,2960 +357,322 @@ type size_t = uint32 /* :9:23 */ type wchar_t = int32 /* :15:24 */ -/// typedef __ct_rune_t __wint_t; -/// -/// -/// -/// typedef __uint_least16_t __char16_t; -/// typedef __uint_least32_t __char32_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef struct { -/// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); -/// -/// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); -/// -/// } __max_align_t; -/// -/// typedef __uint64_t __dev_t; -/// -/// typedef __uint32_t __fixpt_t; -/// -/// -/// -/// -/// -/// typedef union { -/// char __mbstate8[128]; -/// __int64_t _mbstateL; -/// } __mbstate_t; -/// -/// typedef __uintmax_t __rman_res_t; -/// -/// -/// -/// -/// -/// -/// typedef __builtin_va_list __va_list; -/// -/// -/// -/// -/// -/// -/// typedef __va_list __gnuc_va_list; -/// -/// -/// -/// -/// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); -/// -/// -/// extern int __mb_sb_limit; - -type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - __types uintptr -} /* table.cpp.c:290:3 */ - -type _RuneRange = struct { - __nranges int32 - __ranges uintptr -} /* table.cpp.c:295:3 */ - -type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - __runetype [256]uint32 - __maplower [256]int32 - __mapupper [256]int32 - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 -} /* table.cpp.c:320:3 */ -/// -/// extern const _RuneLocale _DefaultRuneLocale; -/// extern const _RuneLocale *_CurrentRuneLocale; -/// -/// -/// -/// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; -/// static __inline const _RuneLocale *__getCurrentRuneLocale(void) -/// { -/// -/// if (_ThreadRuneLocale) -/// return _ThreadRuneLocale; -/// return _CurrentRuneLocale; -/// } -/// -/// -/// -/// -/// -/// static __inline int -/// __maskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : -/// (__getCurrentRuneLocale())->__runetype[_c]) & _f; -/// } -/// -/// static __inline int -/// __sbmaskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : -/// (__getCurrentRuneLocale())->__runetype[_c] & _f; -/// } -/// -/// static __inline int -/// __istype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__maskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __sbistype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__sbmaskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __isctype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= 128) ? 0 : -/// !!(_DefaultRuneLocale.__runetype[_c] & _f); -/// } -/// -/// static __inline __ct_rune_t -/// __toupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtoupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __tolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline int -/// __wcwidth(__ct_rune_t _c) -/// { -/// unsigned int _x; -/// -/// if (_c == 0) -/// return (0); -/// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); -/// if ((_x & 0xe0000000L) != 0) -/// return ((_x & 0xe0000000L) >> 30); -/// return ((_x & 0x00040000L) != 0 ? 1 : -1); -/// } -/// -/// -/// -/// int isalnum(int); -/// int isalpha(int); -/// int iscntrl(int); -/// int isdigit(int); -/// int isgraph(int); -/// int islower(int); -/// int isprint(int); -/// int ispunct(int); -/// int isspace(int); -/// int isupper(int); -/// int isxdigit(int); -/// int tolower(int); -/// int toupper(int); -/// -/// -/// int isascii(int); -/// int toascii(int); -/// -/// -/// -/// int isblank(int); -/// -/// -/// -/// int digittoint(int); -/// int ishexnumber(int); -/// int isideogram(int); -/// int isnumber(int); -/// int isphonogram(int); -/// int isrune(int); -/// int isspecial(int); -/// -/// -/// -/// -/// -/// typedef struct _xlocale *locale_t; -/// -/// -/// -/// -/// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// _RuneLocale *__runes_for_locale(locale_t, int*); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// int __limit; -/// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); -/// return (__c < 0 || __c >= __limit) ? 0 : -/// runes->__runetype[__c] & __f; -/// } -/// -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// return (!!__sbmaskrune_l(__c, __f, __loc)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } -/// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } -/// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } -/// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } -/// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } -/// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } -/// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } -/// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } -/// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } -/// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } -/// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } -/// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } -/// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } -/// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } -/// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } -/// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } -/// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// -/// inline int digittoint_l(int, locale_t); -/// inline int tolower_l(int, locale_t); -/// inline int toupper_l(int, locale_t); -/// -/// inline int digittoint_l(int __c, locale_t __l) -/// { return __sbmaskrune_l((__c), 0xFF, __l); } -/// -/// inline int tolower_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__maplower[__c]; -/// } -/// inline int toupper_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__mapupper[__c]; -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __mbstate_t mbstate_t; -/// -/// -/// -/// -/// typedef __size_t size_t; -/// -/// -/// -/// -/// -/// typedef __va_list va_list; -/// -/// -/// -/// -/// -/// -/// typedef ___wchar_t wchar_t; -/// -/// -/// -/// -/// -/// typedef __wint_t wint_t; -/// -/// typedef struct __sFILE FILE; -/// -/// struct tm; -/// -/// -/// wint_t btowc(int); -/// wint_t fgetwc(FILE *); -/// wchar_t * -/// fgetws(wchar_t * restrict, int, FILE * restrict); -/// wint_t fputwc(wchar_t, FILE *); -/// int fputws(const wchar_t * restrict, FILE * restrict); -/// int fwide(FILE *, int); -/// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); -/// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); -/// wint_t getwc(FILE *); -/// wint_t getwchar(void); -/// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); -/// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, -/// mbstate_t * restrict); -/// int mbsinit(const mbstate_t *); -/// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// mbstate_t * restrict); -/// wint_t putwc(wchar_t, FILE *); -/// wint_t putwchar(wchar_t); -/// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// ...); -/// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); -/// wint_t ungetwc(wint_t, FILE *); -/// int vfwprintf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// __va_list); -/// int vwprintf(const wchar_t * restrict, __va_list); -/// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); -/// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// int wcscoll(const wchar_t *, const wchar_t *); -/// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); -/// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, -/// const struct tm * restrict); -/// size_t wcslen(const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, -/// size_t); -/// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); -/// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// mbstate_t * restrict); -/// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) -/// __attribute__((__pure__)); -/// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); -/// int wctob(wint_t); -/// double wcstod(const wchar_t * restrict, wchar_t ** restrict); -/// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, -/// wchar_t ** restrict); -/// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); -/// unsigned long -/// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); -/// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); -/// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); -/// wchar_t *wmemset(wchar_t *, wchar_t, size_t); -/// int wprintf(const wchar_t * restrict, ...); -/// int wscanf(const wchar_t * restrict, ...); -/// -/// -/// extern FILE *__stdinp; -/// extern FILE *__stdoutp; -/// extern FILE *__stderrp; -/// -/// int vfwscanf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, -/// __va_list); -/// int vwscanf(const wchar_t * restrict, __va_list); -/// float wcstof(const wchar_t * restrict, wchar_t ** restrict); -/// long double -/// wcstold(const wchar_t * restrict, wchar_t ** restrict); -/// -/// -/// long long -/// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// unsigned long long -/// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// -/// -/// -/// int wcswidth(const wchar_t *, size_t); -/// int wcwidth(wchar_t); -/// -/// -/// -/// -/// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// FILE *open_wmemstream(wchar_t **, size_t *); -/// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); -/// int wcscasecmp(const wchar_t *, const wchar_t *); -/// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); -/// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); -/// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// -/// -/// -/// wchar_t *fgetwln(FILE * restrict, size_t * restrict); -/// size_t wcslcat(wchar_t *, const wchar_t *, size_t); -/// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -/// -/// -/// -/// -/// -/// int wcscasecmp_l(const wchar_t *, const wchar_t *, -/// locale_t); -/// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, -/// locale_t); -/// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -/// size_t wcsxfrm_l(wchar_t * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct lconv { -/// char *decimal_point; -/// char *thousands_sep; -/// char *grouping; -/// char *int_curr_symbol; -/// char *currency_symbol; -/// char *mon_decimal_point; -/// char *mon_thousands_sep; -/// char *mon_grouping; -/// char *positive_sign; -/// char *negative_sign; -/// char int_frac_digits; -/// char frac_digits; -/// char p_cs_precedes; -/// char p_sep_by_space; -/// char n_cs_precedes; -/// char n_sep_by_space; -/// char p_sign_posn; -/// char n_sign_posn; -/// char int_p_cs_precedes; -/// char int_n_cs_precedes; -/// char int_p_sep_by_space; -/// char int_n_sep_by_space; -/// char int_p_sign_posn; -/// char int_n_sign_posn; -/// }; -/// -/// -/// struct lconv *localeconv(void); -/// char *setlocale(int, const char *); -/// -/// -/// -/// -/// locale_t duplocale(locale_t base); -/// void freelocale(locale_t loc); -/// locale_t newlocale(int mask, const char *locale, locale_t base); -/// const char *querylocale(int mask, locale_t loc); -/// locale_t uselocale(locale_t loc); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// wint_t btowc_l(int, locale_t); -/// wint_t fgetwc_l(FILE *, locale_t); -/// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, -/// locale_t); -/// wint_t fputwc_l(wchar_t, FILE *, locale_t); -/// int fputws_l(const wchar_t * restrict, FILE * restrict, -/// locale_t); -/// int fwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// int fwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t getwc_l(FILE *, locale_t); -/// wint_t getwchar_l(locale_t); -/// size_t mbrlen_l(const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t mbrtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// int mbsinit_l(const mbstate_t *, locale_t); -/// size_t mbsrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// wint_t putwc_l(wchar_t, FILE *, locale_t); -/// wint_t putwchar_l(wchar_t, locale_t); -/// int swprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, ...); -/// int swscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t ungetwc_l(wint_t, FILE *, locale_t); -/// int vfwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vwprintf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// size_t wcrtomb_l(char * restrict, wchar_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsftime_l(wchar_t * restrict, size_t, -/// const wchar_t * restrict, -/// const struct tm * restrict, locale_t); -/// size_t wcsrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// double wcstod_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long wcstol_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long wcstoul_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// int wcswidth_l(const wchar_t *, size_t, locale_t); -/// int wctob_l(wint_t, locale_t); -/// int wcwidth_l(wchar_t, locale_t); -/// int wprintf_l(locale_t, const wchar_t * restrict, ...); -/// int wscanf_l(locale_t, const wchar_t * restrict, ...); -/// int vfwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t *restrict, __va_list); -/// int vwscanf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// float wcstof_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long double wcstold_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long long wcstoll_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long long wcstoull_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// size_t mbsnrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsnrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// -/// -/// -/// -/// -/// struct lconv *localeconv_l(locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __rune_t rune_t; -/// -/// typedef struct { -/// int quot; -/// int rem; -/// } div_t; -/// -/// typedef struct { -/// long quot; -/// long rem; -/// } ldiv_t; -/// -/// -/// -/// -/// -/// double atof_l(const char *, locale_t); -/// int atoi_l(const char *, locale_t); -/// long atol_l(const char *, locale_t); -/// long long atoll_l(const char *, locale_t); -/// int mblen_l(const char *, size_t, locale_t); -/// size_t mbstowcs_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// int mbtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// double strtod_l(const char *, char **, locale_t); -/// float strtof_l(const char *, char **, locale_t); -/// long strtol_l(const char *, char **, int, locale_t); -/// long double strtold_l(const char *, char **, locale_t); -/// long long strtoll_l(const char *, char **, int, locale_t); -/// unsigned long strtoul_l(const char *, char **, int, locale_t); -/// unsigned long long strtoull_l(const char *, char **, int, locale_t); -/// size_t wcstombs_l(char * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// int wctomb_l(char *, wchar_t, locale_t); -/// -/// int ___mb_cur_max_l(locale_t); -/// -/// -/// extern int __mb_cur_max; -/// extern int ___mb_cur_max(void); -/// -/// -/// _Noreturn void abort(void); -/// int abs(int) __attribute__((__const__)); -/// int atexit(void (* )(void)); -/// double atof(const char *); -/// int atoi(const char *); -/// long atol(const char *); -/// void *bsearch(const void *, const void *, size_t, -/// size_t, int (*)(const void * , const void *)); -/// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(1, 2))); -/// div_t div(int, int) __attribute__((__const__)); -/// _Noreturn void exit(int); -/// void free(void *); -/// char *getenv(const char *); -/// long labs(long) __attribute__((__const__)); -/// ldiv_t ldiv(long, long) __attribute__((__const__)); -/// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); -/// int mblen(const char *, size_t); -/// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); -/// int mbtowc(wchar_t * restrict, const char * restrict, size_t); -/// void qsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// int rand(void); -/// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// void srand(unsigned); -/// double strtod(const char * restrict, char ** restrict); -/// float strtof(const char * restrict, char ** restrict); -/// long strtol(const char * restrict, char ** restrict, int); -/// long double -/// strtold(const char * restrict, char ** restrict); -/// unsigned long -/// strtoul(const char * restrict, char ** restrict, int); -/// int system(const char *); -/// int wctomb(char *, wchar_t); -/// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); -/// -/// typedef struct { -/// long long quot; -/// long long rem; -/// } lldiv_t; -/// -/// -/// long long -/// atoll(const char *); -/// -/// long long -/// llabs(long long) __attribute__((__const__)); -/// -/// lldiv_t lldiv(long long, long long) __attribute__((__const__)); -/// -/// long long -/// strtoll(const char * restrict, char ** restrict, int); -/// -/// unsigned long long -/// strtoull(const char * restrict, char ** restrict, int); -/// -/// -/// _Noreturn void _Exit(int); -/// -/// -/// -/// -/// -/// -/// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) -/// __attribute__((__alloc_size__(2))); -/// int at_quick_exit(void (*)(void)); -/// _Noreturn void -/// quick_exit(int); -/// -/// -/// -/// -/// -/// char *realpath(const char * restrict, char * restrict); -/// -/// -/// int rand_r(unsigned *); -/// -/// -/// int posix_memalign(void **, size_t, size_t); -/// int setenv(const char *, const char *, int); -/// int unsetenv(const char *); -/// -/// -/// -/// int getsubopt(char **, char *const *, char **); -/// -/// char *mkdtemp(char *); -/// -/// -/// -/// int mkstemp(char *); -/// -/// long a64l(const char *); -/// double drand48(void); -/// -/// double erand48(unsigned short[3]); -/// -/// -/// char *initstate(unsigned int, char *, size_t); -/// long jrand48(unsigned short[3]); -/// char *l64a(long); -/// void lcong48(unsigned short[7]); -/// long lrand48(void); -/// -/// char *mktemp(char *); -/// -/// -/// long mrand48(void); -/// long nrand48(unsigned short[3]); -/// int putenv(char *); -/// long random(void); -/// unsigned short -/// *seed48(unsigned short[3]); -/// char *setstate( char *); -/// void srand48(long); -/// void srandom(unsigned int); -/// -/// -/// -/// int grantpt(int); -/// int posix_openpt(int); -/// char *ptsname(int); -/// int unlockpt(int); -/// -/// -/// -/// int ptsname_r(int, char *, size_t); -/// -/// -/// -/// extern const char *malloc_conf; -/// extern void (*malloc_message)(void *, const char *); -/// -/// void abort2(const char *, int, void **) __attribute__((__noreturn__)); -/// __uint32_t -/// arc4random(void); -/// void arc4random_buf(void *, size_t); -/// __uint32_t -/// arc4random_uniform(__uint32_t); -/// -/// -/// -/// -/// -/// -/// char *getbsize(int *, long *); -/// -/// char *cgetcap(char *, const char *, int); -/// int cgetclose(void); -/// int cgetent(char **, char **, const char *); -/// int cgetfirst(char **, char **); -/// int cgetmatch(const char *, const char *); -/// int cgetnext(char **, char **); -/// int cgetnum(char *, const char *, long *); -/// int cgetset(const char *); -/// int cgetstr(char *, const char *, char **); -/// int cgetustr(char *, const char *, char **); -/// -/// int daemon(int, int); -/// int daemonfd(int, int); -/// char *devname(__dev_t, __mode_t); -/// char *devname_r(__dev_t, __mode_t, char *, int); -/// char *fdevname(int); -/// char *fdevname_r(int, char *, int); -/// int getloadavg(double [], int); -/// const char * -/// getprogname(void); -/// -/// int heapsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// -/// -/// -/// -/// -/// -/// int l64a_r(long, char *, int); -/// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); -/// -/// -/// -/// int mkostemp(char *, int); -/// int mkostemps(char *, int, int); -/// int mkostempsat(int, char *, int, int); -/// void qsort_r(void *, size_t, size_t, void *, -/// int (*)(void *, const void *, const void *)); -/// int radixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(2, 3))); -/// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// int rpmatch(const char *); -/// void setprogname(const char *); -/// int sradixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void srandomdev(void); -/// long long -/// strtonum(const char *, long long, long long, const char **); -/// -/// -/// __int64_t -/// strtoq(const char *, char **, int); -/// __uint64_t -/// strtouq(const char *, char **, int); -/// -/// extern char *suboptarg; -/// -/// -/// -/// -/// -/// -/// typedef size_t rsize_t; -/// -/// -/// -/// -/// typedef int errno_t; -/// -/// -/// -/// typedef void (*constraint_handler_t)(const char * restrict, -/// void * restrict, errno_t); -/// -/// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); -/// -/// _Noreturn void abort_handler_s(const char * restrict, void * restrict, -/// errno_t); -/// -/// void ignore_handler_s(const char * restrict, void * restrict, errno_t); -/// -/// errno_t qsort_s(void *, rsize_t, rsize_t, -/// int (*)(const void *, const void *, void *), void *); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __int8_t int8_t; -/// -/// -/// -/// -/// typedef __int16_t int16_t; -/// -/// -/// -/// -/// typedef __int32_t int32_t; -/// -/// -/// -/// -/// typedef __int64_t int64_t; -/// -/// -/// -/// -/// typedef __uint8_t uint8_t; -/// -/// -/// -/// -/// typedef __uint16_t uint16_t; -/// -/// -/// -/// -/// typedef __uint32_t uint32_t; -/// -/// -/// -/// -/// typedef __uint64_t uint64_t; -/// -/// -/// -/// -/// typedef __intptr_t intptr_t; -/// -/// -/// -/// typedef __uintptr_t uintptr_t; -/// -/// -/// -/// typedef __intmax_t intmax_t; -/// -/// -/// -/// typedef __uintmax_t uintmax_t; -/// -/// -/// typedef __int_least8_t int_least8_t; -/// typedef __int_least16_t int_least16_t; -/// typedef __int_least32_t int_least32_t; -/// typedef __int_least64_t int_least64_t; -/// -/// typedef __uint_least8_t uint_least8_t; -/// typedef __uint_least16_t uint_least16_t; -/// typedef __uint_least32_t uint_least32_t; -/// typedef __uint_least64_t uint_least64_t; -/// -/// typedef __int_fast8_t int_fast8_t; -/// typedef __int_fast16_t int_fast16_t; -/// typedef __int_fast32_t int_fast32_t; -/// typedef __int_fast64_t int_fast64_t; -/// -/// typedef __uint_fast8_t uint_fast8_t; -/// typedef __uint_fast16_t uint_fast16_t; -/// typedef __uint_fast32_t uint_fast32_t; -/// typedef __uint_fast64_t uint_fast64_t; -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct pthread; -/// struct pthread_attr; -/// struct pthread_cond; -/// struct pthread_cond_attr; -/// struct pthread_mutex; -/// struct pthread_mutex_attr; -/// struct pthread_once; -/// struct pthread_rwlock; -/// struct pthread_rwlockattr; -/// struct pthread_barrier; -/// struct pthread_barrier_attr; -/// struct pthread_spinlock; -/// -/// typedef struct pthread *pthread_t; -/// -/// -/// typedef struct pthread_attr *pthread_attr_t; -/// typedef struct pthread_mutex *pthread_mutex_t; -/// typedef struct pthread_mutex_attr *pthread_mutexattr_t; -/// typedef struct pthread_cond *pthread_cond_t; -/// typedef struct pthread_cond_attr *pthread_condattr_t; -/// typedef int pthread_key_t; -/// typedef struct pthread_once pthread_once_t; -/// typedef struct pthread_rwlock *pthread_rwlock_t; -/// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; -/// typedef struct pthread_barrier *pthread_barrier_t; -/// typedef struct pthread_barrierattr *pthread_barrierattr_t; -/// typedef struct pthread_spinlock *pthread_spinlock_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef void *pthread_addr_t; -/// typedef void *(*pthread_startroutine_t)(void *); -/// -/// -/// -/// -/// struct pthread_once { -/// int state; -/// pthread_mutex_t mutex; -/// }; -/// -/// -/// -/// typedef unsigned char u_char; -/// typedef unsigned short u_short; -/// typedef unsigned int u_int; -/// typedef unsigned long u_long; -/// -/// typedef unsigned short ushort; -/// typedef unsigned int uint; -/// -/// typedef __uint8_t u_int8_t; -/// typedef __uint16_t u_int16_t; -/// typedef __uint32_t u_int32_t; -/// typedef __uint64_t u_int64_t; -/// -/// typedef __uint64_t u_quad_t; -/// typedef __int64_t quad_t; -/// typedef quad_t * qaddr_t; -/// -/// typedef char * caddr_t; -/// typedef const char * c_caddr_t; -/// -/// -/// typedef __blksize_t blksize_t; -/// -/// -/// -/// typedef __cpuwhich_t cpuwhich_t; -/// typedef __cpulevel_t cpulevel_t; -/// typedef __cpusetid_t cpusetid_t; -/// -/// -/// typedef __blkcnt_t blkcnt_t; -/// -/// -/// -/// -/// typedef __clock_t clock_t; -/// -/// -/// -/// -/// typedef __clockid_t clockid_t; -/// -/// -/// -/// typedef __critical_t critical_t; -/// typedef __daddr_t daddr_t; -/// -/// -/// typedef __dev_t dev_t; -/// -/// -/// -/// -/// typedef __fflags_t fflags_t; -/// -/// -/// -/// typedef __fixpt_t fixpt_t; -/// -/// -/// typedef __fsblkcnt_t fsblkcnt_t; -/// typedef __fsfilcnt_t fsfilcnt_t; -/// -/// -/// -/// -/// typedef __gid_t gid_t; -/// -/// -/// -/// -/// typedef __uint32_t in_addr_t; -/// -/// -/// -/// -/// typedef __uint16_t in_port_t; -/// -/// -/// -/// -/// typedef __id_t id_t; -/// -/// -/// -/// -/// typedef __ino_t ino_t; -/// -/// -/// -/// -/// typedef __key_t key_t; -/// -/// -/// -/// -/// typedef __lwpid_t lwpid_t; -/// -/// -/// -/// -/// typedef __mode_t mode_t; -/// -/// -/// -/// -/// typedef __accmode_t accmode_t; -/// -/// -/// -/// -/// typedef __nlink_t nlink_t; -/// -/// -/// -/// -/// typedef __off_t off_t; -/// -/// -/// -/// -/// typedef __off64_t off64_t; -/// -/// -/// -/// -/// typedef __pid_t pid_t; -/// -/// -/// -/// typedef __register_t register_t; -/// -/// -/// typedef __rlim_t rlim_t; -/// -/// -/// -/// typedef __int64_t sbintime_t; -/// -/// typedef __segsz_t segsz_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef __ssize_t ssize_t; -/// -/// -/// -/// -/// typedef __suseconds_t suseconds_t; -/// -/// -/// -/// -/// typedef __time_t time_t; -/// -/// -/// -/// -/// typedef __timer_t timer_t; -/// -/// -/// -/// -/// typedef __mqd_t mqd_t; -/// -/// -/// -/// typedef __u_register_t u_register_t; -/// -/// -/// typedef __uid_t uid_t; -/// -/// -/// -/// -/// typedef __useconds_t useconds_t; -/// -/// -/// -/// -/// -/// typedef unsigned long cap_ioctl_t; -/// -/// -/// -/// -/// struct cap_rights; -/// -/// typedef struct cap_rights cap_rights_t; -/// -/// typedef __uint64_t kpaddr_t; -/// typedef __uint64_t kvaddr_t; -/// typedef __uint64_t ksize_t; -/// typedef __int64_t kssize_t; -/// -/// typedef __vm_offset_t vm_offset_t; -/// typedef __uint64_t vm_ooffset_t; -/// typedef __vm_paddr_t vm_paddr_t; -/// typedef __uint64_t vm_pindex_t; -/// typedef __vm_size_t vm_size_t; -/// -/// typedef __rman_res_t rman_res_t; -/// -/// static __inline __uint16_t -/// __bitcount16(__uint16_t _x) -/// { -/// -/// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); -/// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f; -/// _x = (_x + (_x >> 8)) & 0x00ff; -/// return (_x); -/// } -/// -/// static __inline __uint32_t -/// __bitcount32(__uint32_t _x) -/// { -/// -/// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); -/// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// static __inline __uint64_t -/// __bitcount64(__uint64_t _x) -/// { -/// -/// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); -/// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)); -/// _x = (_x + (_x >> 32)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// -/// -/// -/// typedef struct __sigset { -/// __uint32_t __bits[4]; -/// } __sigset_t; -/// -/// -/// -/// struct timeval { -/// time_t tv_sec; -/// suseconds_t tv_usec; -/// }; -/// -/// -/// -/// -/// -/// struct timespec { -/// time_t tv_sec; -/// long tv_nsec; -/// }; -/// -/// -/// struct itimerspec { -/// struct timespec it_interval; -/// struct timespec it_value; -/// }; -/// -/// -/// typedef unsigned long __fd_mask; -/// -/// typedef __fd_mask fd_mask; -/// -/// -/// -/// -/// typedef __sigset_t sigset_t; -/// -/// typedef struct fd_set { -/// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; -/// } fd_set; -/// -/// -/// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -/// const struct timespec *restrict, const sigset_t *restrict); -/// -/// -/// -/// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -/// -/// -/// -/// -/// static __inline int -/// __major(dev_t _d) -/// { -/// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); -/// } -/// -/// static __inline int -/// __minor(dev_t _d) -/// { -/// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); -/// } -/// -/// static __inline dev_t -/// __makedev(int _Major, int _Minor) -/// { -/// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | -/// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// int ftruncate(int, off_t); -/// -/// -/// -/// off_t lseek(int, off_t, int); -/// -/// -/// -/// void * mmap(void *, size_t, int, int, int, off_t); -/// -/// -/// -/// int truncate(const char *, off_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// -/// -/// -/// -/// -/// static __inline u_int -/// atomic_fetchadd_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddl %0,%1 ; " -/// "# atomic_fetchadd_int" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// static __inline u_long -/// atomic_fetchadd_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddq %0,%1 ; " -/// "# atomic_fetchadd_long" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// static __inline int -/// atomic_testandset_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsl %2,%1 ; " -/// "# atomic_testandset_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandset_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsq %2,%1 ; " -/// "# atomic_testandset_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrl %2,%1 ; " -/// "# atomic_testandclear_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrq %2,%1 ; " -/// "# atomic_testandclear_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline void -/// __storeload_barrier(void) -/// { -/// -/// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_seq_cst(void) -/// { -/// -/// __storeload_barrier(); -/// } -/// -/// -/// -/// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// -/// -/// -/// -/// -/// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// -/// static __inline u_int -/// atomic_swap_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " xchgl %1,%0 ; " -/// "# atomic_swap_int" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// static __inline u_long -/// atomic_swap_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " xchgq %1,%0 ; " -/// "# atomic_swap_long" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// extern char *_PathLocale; -/// -/// int __detect_path_locale(void); -/// int __wrap_setrunelocale(const char *); -/// -/// -/// enum { -/// XLC_COLLATE = 0, -/// XLC_CTYPE, -/// XLC_MONETARY, -/// XLC_NUMERIC, -/// XLC_TIME, -/// XLC_MESSAGES, -/// XLC_LAST -/// }; -/// -/// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); -/// _Static_assert(XLC_COLLATE == -/// -/// 1 -/// -/// - 1, -/// "XLC_COLLATE doesn't match the LC_COLLATE value."); -/// _Static_assert(XLC_CTYPE == -/// -/// 2 -/// -/// - 1, -/// "XLC_CTYPE doesn't match the LC_CTYPE value."); -/// _Static_assert(XLC_MONETARY == -/// -/// 3 -/// -/// - 1, -/// "XLC_MONETARY doesn't match the LC_MONETARY value."); -/// _Static_assert(XLC_NUMERIC == -/// -/// 4 -/// -/// - 1, -/// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); -/// _Static_assert(XLC_TIME == -/// -/// 5 -/// -/// - 1, -/// "XLC_TIME doesn't match the LC_TIME value."); -/// _Static_assert(XLC_MESSAGES == -/// -/// 6 -/// -/// - 1, -/// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); -/// -/// struct xlocale_refcounted { -/// -/// long retain_count; -/// -/// void(*destructor)(void*); -/// }; -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_component { -/// struct xlocale_refcounted header; -/// -/// char locale[31 +1]; -/// -/// char version[12]; -/// }; -/// -/// -/// -/// -/// struct _xlocale { -/// struct xlocale_refcounted header; -/// -/// struct xlocale_component *components[XLC_LAST]; -/// -/// -/// int monetary_locale_changed; -/// -/// -/// int using_monetary_locale; -/// -/// -/// int numeric_locale_changed; -/// -/// -/// int using_numeric_locale; -/// -/// -/// int using_time_locale; -/// -/// -/// int using_messages_locale; -/// -/// struct lconv lconv; -/// -/// char *csym; -/// }; -/// -/// -/// -/// -/// __attribute__((unused)) static void* -/// xlocale_retain(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// atomic_add_long(&(obj->retain_count), 1); -/// return (val); -/// } -/// -/// -/// -/// -/// __attribute__((unused)) static void -/// xlocale_release(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// long count; -/// -/// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; -/// if (count < 0 && obj->destructor != -/// -/// ((void *)0) -/// -/// ) -/// obj->destructor(obj); -/// } -/// -/// -/// -/// -/// -/// extern void* __collate_load(const char*, locale_t); -/// extern void* __ctype_load(const char*, locale_t); -/// extern void* __messages_load(const char*, locale_t); -/// extern void* __monetary_load(const char*, locale_t); -/// extern void* __numeric_load(const char*, locale_t); -/// extern void* __time_load(const char*, locale_t); -/// -/// extern struct _xlocale __xlocale_global_locale; -/// extern struct _xlocale __xlocale_C_locale; -/// -/// -/// -/// -/// void __set_thread_rune_locale(locale_t loc); -/// -/// -/// -/// -/// extern int __has_thread_locale; -/// -/// -/// -/// -/// -/// extern _Thread_local locale_t __thread_locale; -/// -/// -/// -/// -/// -/// -/// -/// static inline locale_t __get_locale(void) -/// { -/// -/// if (!__has_thread_locale) { -/// return (&__xlocale_global_locale); -/// } -/// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); -/// } -/// -/// -/// -/// -/// -/// static inline locale_t get_real_locale(locale_t locale) -/// { -/// switch ((intptr_t)locale) { -/// case 0: return (&__xlocale_C_locale); -/// case -1: return (&__xlocale_global_locale); -/// default: return (locale); -/// } -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_ctype { -/// struct xlocale_component header; -/// _RuneLocale *runes; -/// size_t (*__mbrtowc)(wchar_t * -/// -/// restrict -/// -/// , const char * -/// -/// restrict -/// -/// , -/// size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int (*__mbsinit)(const mbstate_t *); -/// size_t (*__mbsnrtowcs)(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcrtomb)(char * -/// -/// restrict -/// -/// , wchar_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcsnrtombs)(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int __mb_cur_max; -/// int __mb_sb_limit; -/// -/// __mbstate_t mblen; -/// -/// __mbstate_t mbrlen; -/// -/// __mbstate_t mbrtoc16; -/// -/// __mbstate_t mbrtoc32; -/// -/// __mbstate_t mbrtowc; -/// -/// __mbstate_t mbsnrtowcs; -/// -/// __mbstate_t mbsrtowcs; -/// -/// __mbstate_t mbtowc; -/// -/// __mbstate_t c16rtomb; -/// -/// __mbstate_t c32rtomb; -/// -/// __mbstate_t wcrtomb; -/// -/// __mbstate_t wcsnrtombs; -/// -/// __mbstate_t wcsrtombs; -/// -/// __mbstate_t wctomb; -/// }; -/// -/// extern struct xlocale_ctype __xlocale_global_ctype; -/// -/// -/// -/// -/// int _none_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// -/// typedef size_t (*mbrtowc_pfn_t)(wchar_t * -/// -/// restrict -/// -/// , -/// const char * -/// -/// restrict -/// -/// , size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// typedef size_t (*wcrtomb_pfn_t)(char * -/// -/// restrict -/// -/// , wchar_t, -/// mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t __mbsnrtowcs_std(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , mbrtowc_pfn_t); -/// size_t __wcsnrtombs_std(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , wcrtomb_pfn_t); -/// - -var X_DefaultRuneLocale = _RuneLocale{ - - __magic: *(*[8]int8)(unsafe.Pointer(ts)), - __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), - __invalid_rune: 0xFFFD, - - __runetype: [256]uint32{ - - 0: uint32(0x00000200), - - 1: uint32(0x00000200), - - 2: uint32(0x00000200), - - 3: uint32(0x00000200), - - 4: uint32(0x00000200), - - 5: uint32(0x00000200), - - 6: uint32(0x00000200), - - 7: uint32(0x00000200), - - 8: uint32(0x00000200), - - 9: uint32(0x00000200 | - - 0x00004000 | - - 0x00020000), - - 10: uint32(0x00000200 | - - 0x00004000), - - 11: uint32(0x00000200 | - - 0x00004000), - - 12: uint32(0x00000200 | - - 0x00004000), - - 13: uint32(0x00000200 | - - 0x00004000), - - 14: uint32(0x00000200), - - 15: uint32(0x00000200), - - 16: uint32(0x00000200), - - 17: uint32(0x00000200), - - 18: uint32(0x00000200), - - 19: uint32(0x00000200), - - 20: uint32(0x00000200), - - 21: uint32(0x00000200), - - 22: uint32(0x00000200), - - 23: uint32(0x00000200), - - 24: uint32(0x00000200), - - 25: uint32(0x00000200), - - 26: uint32(0x00000200), - - 27: uint32(0x00000200), - - 28: uint32(0x00000200), - - 29: uint32(0x00000200), - - 30: uint32(0x00000200), - - 31: uint32(0x00000200), - - 32: uint32(0x00004000 | - - 0x00020000 | - - 0x00040000), - - 33: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 34: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 35: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 36: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 37: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 38: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 39: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 40: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 41: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 42: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 43: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 44: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 45: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 46: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 47: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 48: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 0), - - 49: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 1), - - 50: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 2), - - 51: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 3), - - 52: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 4), - - 53: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 5), - - 54: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 6), - - 55: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 7), - - 56: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 8), - - 57: uint32(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - 9), - - 58: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 59: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 60: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 61: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 62: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 63: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 64: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 65: uint32(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 10), - - 66: uint32(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 11), - - 67: uint32(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 12), - - 68: uint32(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 13), - - 69: uint32(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 14), - - 70: uint32(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 15), - - 71: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 72: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 73: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 74: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 75: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 76: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 77: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 78: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 79: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 80: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 81: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 82: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 83: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 84: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 85: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 86: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 87: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 88: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 89: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 90: uint32(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 91: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 92: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 93: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 94: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 95: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 96: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 97: uint32(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 10), - - 98: uint32(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 11), - - 99: uint32(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 12), - - 100: uint32(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 13), - - 101: uint32(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 14), - - 102: uint32(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - 15), - - 103: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 104: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 105: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 106: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 107: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 108: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 109: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 110: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 111: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 112: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 113: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 114: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 115: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 116: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 117: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 118: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 119: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 120: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 121: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 122: uint32(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 123: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 124: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 125: uint32(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 126: uint32(0x00002000 | - - 0x00040000 | +// # 1 "lib/libc/gen/ctype_.c" +// # 1 "" +// # 1 "" +// # 1 "lib/libc/gen/ctype_.c" +// # 36 "lib/libc/gen/ctype_.c" +// # 1 "./include/ctype.h" 1 +// # 43 "./include/ctype.h" +// # 1 "./sys/sys/cdefs.h" 1 +// # 41 "./sys/sys/cdefs.h" +// # 1 "./machine/cdefs.h" 1 +// # 42 "./sys/sys/cdefs.h" 2 +// # 44 "./include/ctype.h" 2 +// # 57 "./include/ctype.h" +// typedef void *locale_t; +// +// +// +// +// +// extern const char *_ctype_; +// extern const short *_tolower_tab_; +// extern const short *_toupper_tab_; +// +// +// int isalnum(int); +// int isalpha(int); +// int iscntrl(int); +// int isdigit(int); +// int isgraph(int); +// int islower(int); +// int isprint(int); +// int ispunct(int); +// int isspace(int); +// int isupper(int); +// int isxdigit(int); +// int tolower(int); +// int toupper(int); +// +// +// +// int isblank(int); +// +// +// +// int isascii(int); +// int toascii(int); +// int _tolower(int); +// int _toupper(int); +// +// +// +// int isalnum_l(int, locale_t); +// int isalpha_l(int, locale_t); +// int isblank_l(int, locale_t); +// int iscntrl_l(int, locale_t); +// int isdigit_l(int, locale_t); +// int isgraph_l(int, locale_t); +// int islower_l(int, locale_t); +// int isprint_l(int, locale_t); +// int ispunct_l(int, locale_t); +// int isspace_l(int, locale_t); +// int isupper_l(int, locale_t); +// int isxdigit_l(int, locale_t); +// int tolower_l(int, locale_t); +// int toupper_l(int, locale_t); +// +// +// +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int islower(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_tolower_tab_ + 1)[_c]); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_toupper_tab_ + 1)[_c]); +// } +// +// - 0x00000800), +// extern __inline __attribute__((__gnu_inline__)) +func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ + return Bool32(_c == ' ' || _c == '\t') +} - 127: uint32(0x00000200), - }, - __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, -} /* table.cpp.c:2243:19 */ - -var X_CurrentRuneLocale uintptr = 0 /* table.cpp.c:4092:19 */ - -/// _RuneLocale * -/// __runes_for_locale(locale_t locale, int *mb_sb_limit) -/// { -/// (locale = get_real_locale(locale)); -/// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); -/// *mb_sb_limit = c->__mb_sb_limit; -/// return c->runes; -/// } +// extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) +// { +// return ((unsigned int)_c <= 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) +// { +// return (_c & 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) +// { +// return (_c - 'A' + 'a'); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) +// { +// return (_c - 'a' + 'A'); +// } +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalnum_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalnum(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalpha_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalpha(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isblank_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isblank(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return iscntrl(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isgraph_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isgraph(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// islower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return islower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isprint_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isprint(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// ispunct_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return ispunct(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isspace_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isspace(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isupper(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isxdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// tolower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return tolower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// toupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return toupper(_c); +// } +// +// +// +// +// +// # 37 "lib/libc/gen/ctype_.c" 2 +// # 1 "./lib/libc/include/ctype_private.h" 1 +// +// +// +// +// +// # 5 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility push(hidden) +// # 5 "./lib/libc/include/ctype_private.h" +// +// extern const char _C_ctype_[]; +// extern const short _C_toupper_[]; +// extern const short _C_tolower_[]; +// +// # 9 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility pop +// # 9 "./lib/libc/include/ctype_private.h" +// +// # 38 "lib/libc/gen/ctype_.c" 2 + +var X_C_ctype_ = [257]int8{ + int8(0), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), + int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), + + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), +} /* ctype_.c:282:12 */ + +var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) @@ -3447,37 +809,37 @@ type ssize_t = int32 /* alltypes.h:88:15 */ type off_t = int64 /* alltypes.h:185:16 */ type _IO_FILE = struct { - flags uint32 - 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 int32 - mode int32 - lock int32 - lbf int32 - 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 + Fflags uint32 + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int32 + Fmode int32 + Flock int32 + Flbf int32 + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:343:9 */ type FILE = _IO_FILE /* alltypes.h:343:25 */ @@ -3485,8 +847,8 @@ type FILE = _IO_FILE /* alltypes.h:343:25 */ type va_list = uintptr /* alltypes.h:349:27 */ type _G_fpos64_t = struct { - _ [0]uint32 - __opaque [16]int8 + F__ccgo_pad1 [0]uint32 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -3499,7 +861,7 @@ 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 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -3509,7 +871,7 @@ 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 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -3524,58 +886,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -3614,8 +976,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3624,13 +986,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3641,8 +1003,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3683,8 +1045,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -3695,8 +1057,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -3938,16 +1300,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3957,8 +1319,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3972,8 +1334,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3984,8 +1346,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -4014,18 +1376,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4045,8 +1407,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -4056,8 +1418,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4137,8 +1499,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -4147,18 +1509,18 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() } - for i = size_t(0); i < size_t(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { + for i = size_t(0); i < size_t(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { if i < size_t(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4166,14 +1528,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == size_t(3) || i == size_t(8) || i > size_t(3) && pok != 0 { if i != size_t(8) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > size_t(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4182,11 +1544,11 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(float32(sign) * X__builtin_inff(tls)) } if !(i != 0) { - for i = size_t(0); i < size_t(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { + for i = size_t(0); i < size_t(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { if i < size_t(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4195,21 +1557,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == size_t(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } for i = size_t(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4217,10 +1579,10 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float continue } if c == ')' { - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -4229,19 +1591,19 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint32(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -4251,16 +1613,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -4307,8 +1669,8 @@ __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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -4322,8 +1684,8 @@ __3: } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4333,8 +1695,8 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4342,23 +1704,23 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -4391,8 +1753,8 @@ __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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -4414,8 +1776,8 @@ __17: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4432,8 +1794,8 @@ __20: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4452,7 +1814,7 @@ __15: if !!(base&(base-uint32(1)) != 0) { goto __24 } - bs = int32(*(*int8)(unsafe.Pointer(ts + 55 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + bs = int32(*(*int8)(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)) { @@ -4462,8 +1824,8 @@ __26: goto __27 __27: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4480,8 +1842,8 @@ __29: goto __30 __30: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4500,8 +1862,8 @@ __32: goto __33 __33: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4518,8 +1880,8 @@ __35: goto __36 __36: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4541,8 +1903,8 @@ __39: goto __40 __40: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4561,8 +1923,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -4595,34 +1957,34 @@ __43: // 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 = off_t((int32((*FILE)(unsafe.Pointer(f)).buf) - int32((*FILE)(unsafe.Pointer(f)).rpos)) / 1) + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf) - int32((*FILE)(unsafe.Pointer(f)).Frpos)) / 1) // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).rend)-int32((*FILE)(unsafe.Pointer(f)).rpos))/1) > lim { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + off_t((int32((*FILE)(unsafe.Pointer(f)).rpos)-int32((*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 = off_t((int32((*FILE)(unsafe.Pointer(f)).buf)-int32((*FILE)(unsafe.Pointer(f)).rpos))/1) + cnt - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos - (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(f)).Frpos)-int32((*FILE)(unsafe.Pointer(f)).Fbuf))/1) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).rend)-int32((*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) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*FILE)(unsafe.Pointer(f)).shcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).buf)-int32((*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) + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -4649,7 +2011,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -4678,7 +2040,7 @@ 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 u struct {Ff float64;} at bp, 8 var y double_t = x @@ -4715,26 +2077,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:51:66 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type pid_t = int32 /* alltypes.h:258:13 */ @@ -4744,8 +2106,8 @@ type uid_t = uint32 /* alltypes.h:268:18 */ type gid_t = uint32 /* alltypes.h:273:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:378:1 */ type socklen_t = uint32 /* alltypes.h:384:18 */ @@ -4753,298 +2115,298 @@ type socklen_t = uint32 /* alltypes.h:384:18 */ type sa_family_t = uint16 /* alltypes.h:389:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - msg_iov uintptr - msg_iovlen int32 - msg_control uintptr - msg_controllen socklen_t - msg_flags int32 + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } /* 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 in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_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 + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__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 + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_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 + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_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 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_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 } + 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: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 } + 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:264:1 */ type group_req = struct { - gr_interface uint32_t - gr_group struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgr_interface uint32_t + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - gsr_group struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgsr_interface uint32_t + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } - gsr_source struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - gf_group struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgf_interface uint32_t + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } } /* 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 } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_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 + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_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 + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_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 - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_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 + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_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 + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 } /* 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 - 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 + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 } /* 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 + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype 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 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = size_t(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint32(uintptr(0))) - b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+66, int16(cnt))) != 0) { Xfree(tls, b) @@ -5057,9 +2419,9 @@ type time_t = int64 /* alltypes.h:108:16 */ type clockid_t = int32 /* alltypes.h:237:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int32 - __12 uint32 /* int : 32 */ + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ } /* alltypes.h:252:1 */ type pthread_t = uintptr /* alltypes.h:296:26 */ @@ -5070,33 +2432,33 @@ type pthread_key_t = uint32 /* alltypes.h:307:18 */ type pthread_spinlock_t = int32 /* alltypes.h:312:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:317:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:317:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:322:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:322:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:327:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:327:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:332:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:332:40 */ -type __sigset_t = struct{ __bits [32]uint32 } /* alltypes.h:372:9 */ +type __sigset_t = struct{ F__bits [32]uint32 } /* alltypes.h:372:9 */ type sigset_t = __sigset_t /* alltypes.h:372:71 */ -type pthread_attr_t = struct{ __u struct{ __i [9]int32 } } /* alltypes.h:395:147 */ +type pthread_attr_t = struct{ F__u struct{ F__i [9]int32 } } /* alltypes.h:395:147 */ -type pthread_mutex_t = struct{ __u struct{ __i [6]int32 } } /* alltypes.h:400:157 */ +type pthread_mutex_t = struct{ F__u struct{ F__i [6]int32 } } /* alltypes.h:400:157 */ -type pthread_cond_t = struct{ __u struct{ __i [12]int32 } } /* alltypes.h:410:112 */ +type pthread_cond_t = struct{ F__u struct{ F__i [12]int32 } } /* alltypes.h:410:112 */ -type pthread_rwlock_t = struct{ __u struct{ __i [8]int32 } } /* alltypes.h:420:139 */ +type pthread_rwlock_t = struct{ F__u struct{ F__i [8]int32 } } /* alltypes.h:420:139 */ -type pthread_barrier_t = struct{ __u struct{ __i [5]int32 } } /* alltypes.h:425:137 */ +type pthread_barrier_t = struct{ F__u struct{ F__i [5]int32 } } /* alltypes.h:425:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [4]int32 - __reserved3 int32 + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [4]int32 + F__reserved3 int32 } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:232:14 */ @@ -5104,36 +2466,36 @@ type timer_t = uintptr /* alltypes.h:232:14 */ type clock_t = int32 /* alltypes.h:242: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 - tm_gmtoff int32 - tm_zone uintptr + 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 + Ftm_gmtoff int32 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int32 - __12 uint32 /* int : 32 */ + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ } - it_value struct { - tv_sec time_t - tv_nsec int32 - __12 uint32 /* int : 32 */ + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ type useconds_t = uint32 /* alltypes.h:283:18 */ @@ -5167,10 +2529,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } 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 + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -5266,7 +2628,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -5276,30 +2638,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_addr = out + uintptr(k)*68 + 32 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addr = out + uintptr(k)*68 + 32 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).ai.ai_next = out + uintptr(k)*68 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).Fai.Fai_next = out + uintptr(k)*68 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*68+32+4, bp+8+uintptr(i)*28+8, uint32(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*68+32+8, bp+8+uintptr(i)*28+8, uint32(16)) break } @@ -5313,28 +2675,28 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - msg_iov uintptr - msg_iovlen int32 - msg_control uintptr - msg_controllen socklen_t - msg_flags int32 - } - msg_len uint32 + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -5432,8 +2794,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -5441,10 +2803,10 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, }() // Align buffer - align = -uintptr_t(buf) & (uint32(unsafe.Sizeof(uintptr(0))) - uint32(1)) + align = uint32(-uintptr_t(buf)) & (uint32(unsafe.Sizeof(uintptr(0))) - uint32(1)) need = uint32(4) * uint32(unsafe.Sizeof(uintptr(0))) - need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + size_t(1)) need = need + (Xstrlen(tls, bp+1344) + size_t(1)) need = need + align @@ -5454,113 +2816,113 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint32(3) * uint32(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint32(cnt+1) * uint32(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*4)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = 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) + size_t(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + size_t(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4))) + size_t(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4))) + size_t(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*4)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - if_name uintptr + Fif_index uint32 + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint32 - mem_end uint32 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint32 + Fmem_end uint32 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint32 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint32 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + Fifc_ifcu struct{ Fifcu_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 - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -5574,21 +2936,21 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [2]byte - data uintptr - len int32 + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [2]byte + Fdata uintptr + Flen int32 } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 + Fcounter int32 + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -5602,43 +2964,43 @@ 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 */ + F__ccgo_pad1 [0]uint32 + Fid 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 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount 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 uint32 - 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]int8 - pfcode uint32 - 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 - _u struct { - _ [0]uint32 - pad [52]int8 + Fretrans int32 + Fretry int32 + Foptions uint32 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint32 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F_u struct { + F__ccgo_pad1 [0]uint32 + Fpad [52]int8 } } /* resolv.h:26:9 */ @@ -5646,9 +3008,9 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - name uintptr - humanname uintptr + Fnumber int32 + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -5665,7 +3027,7 @@ func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ bp := tls.Alloc(32) defer tls.Free(32) - Xsprintf(tls, s, ts+64, + Xsprintf(tls, s, ts+23, 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))))) } @@ -5677,10 +3039,10 @@ func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') } - Xstrcpy(tls, s, ts+89) + Xstrcpy(tls, s, ts+48) } -var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 98)) /* getnameinfo.c:36:20 */ +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* 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) @@ -5697,13 +3059,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 // 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+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { return } if family == 2 { Xmemcpy(tls, bp+uintptr(12), a, uint32(4)) - Xmemcpy(tls, bp, ts+129, uint32(12)) + Xmemcpy(tls, bp, ts+88, uint32(12)) a = bp /* &atmp[0] */ } for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { @@ -5719,13 +3081,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint32(4)) - Xmemcpy(tls, bp+528+8, ts+129, uint32(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + Xmemcpy(tls, bp+528+8, ts+88, uint32(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -5839,21 +3201,21 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr switch af { case 2: - if socklen_t(Xsnprintf(tls, s, l, ts+142, 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 { + if socklen_t(Xsnprintf(tls, s, uint32(l), ts+101, 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+129, uint32(12)) != 0 { + if Xmemcmp(tls, a, ts+88, uint32(12)) != 0 { Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]int8{})), - ts+154, + ts+113, 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, uint32(unsafe.Sizeof([100]int8{})), - ts+178, + ts+137, 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))), @@ -5866,7 +3228,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { continue } - j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+208)) + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) if j > max { best = i max = j @@ -5876,7 +3238,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr *(*int8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrInt8(bp+176+uintptr(best+1), int8(':')) Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint32(i-best-max+1)) } - if Xstrlen(tls, bp+176) < l { + if Xstrlen(tls, bp+176) < size_t(l) { Xstrcpy(tls, s, bp+176) return s } @@ -6010,8 +3372,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint32(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -6034,7 +3396,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint32(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -6058,18 +3420,18 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:175:18 */ type flock = struct { - l_type int16 - l_whence int16 - l_start off_t - l_len off_t - l_pid pid_t + Fl_type int16 + Fl_whence int16 + Fl_start off_t + Fl_len off_t + Fl_pid pid_t } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -6095,14 +3457,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 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 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -6133,7 +3495,7 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); var _f FILE _ = _f - var f uintptr = Xfopen(tls, ts+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { case 2: @@ -6195,9 +3557,9 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 + Faddrs uintptr + Fcanon uintptr + Fcnt int32 } /* 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: */ @@ -6247,31 +3609,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: 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, uint32(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint32(defpolicy[i].Flen)) != 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)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -6280,7 +3642,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -6313,7 +3675,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 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 + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -6393,7 +3755,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -6410,12 +3772,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -6429,10 +3791,10 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) } else { Xmemcpy(tls, bp+28+8, - ts+129, uint32(12)) + ts+88, uint32(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) Xmemcpy(tls, bp+8, - ts+129, uint32(12)) + ts+88, uint32(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint32(4)) da = bp + 56 /* &da4 */ @@ -6442,8 +3804,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -6471,7 +3833,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint32(cnt), uint32(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -6491,7 +3853,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i var cnt int32 = 0 var p uintptr _ = p - *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 54 /* "" */ + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ var port uint32 = uint32(0) switch socktype { @@ -6523,9 +3885,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -6540,14 +3902,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -6608,19 +3970,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 - if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint32(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint32(0)) } - (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+8, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+8, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -6642,7 +4004,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ 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, uint32(1)) == size_t(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint32(1)) == size_t(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -6674,11 +4036,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 136 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+4, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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 + off_t((int32((*FILE)(unsafe.Pointer(bp)).rpos)-int32((*FILE)(unsafe.Pointer(bp)).buf))/1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -6708,12 +4070,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 136 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+4, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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 + off_t((int32((*FILE)(unsafe.Pointer(bp)).rpos)-int32((*FILE)(unsafe.Pointer(bp)).buf))/1)) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1)) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -6784,8 +4146,8 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ } func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.cpp.c:4092:41: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_)) // ctype_.c:319:23: } -var ts1 = "RuneMagi\x00NONE\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\x00infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\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 ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\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/musl_openbsd_amd64.go b/vendor/modernc.org/libc/musl_openbsd_amd64.go index 6a2a07bade..c049334956 100644 --- a/vendor/modernc.org/libc/musl_openbsd_amd64.go +++ b/vendor/modernc.org/libc/musl_openbsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.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/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/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.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/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/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -357,2964 +357,322 @@ type size_t = uint64 /* :9:23 */ type wchar_t = int32 /* :15:24 */ -/// typedef __ct_rune_t __wint_t; -/// -/// -/// -/// typedef __uint_least16_t __char16_t; -/// typedef __uint_least32_t __char32_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef struct { -/// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); -/// -/// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); -/// -/// } __max_align_t; -/// -/// typedef __uint64_t __dev_t; -/// -/// typedef __uint32_t __fixpt_t; -/// -/// -/// -/// -/// -/// typedef union { -/// char __mbstate8[128]; -/// __int64_t _mbstateL; -/// } __mbstate_t; -/// -/// typedef __uintmax_t __rman_res_t; -/// -/// -/// -/// -/// -/// -/// typedef __builtin_va_list __va_list; -/// -/// -/// -/// -/// -/// -/// typedef __va_list __gnuc_va_list; -/// -/// -/// -/// -/// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); -/// -/// -/// extern int __mb_sb_limit; - -type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr -} /* table.cpp.c:290:3 */ - -type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr -} /* table.cpp.c:295:3 */ - -type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - _ [4]byte - __runetype [256]uint64 - __maplower [256]int32 - __mapupper [256]int32 - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - _ [4]byte -} /* table.cpp.c:320:3 */ -/// -/// extern const _RuneLocale _DefaultRuneLocale; -/// extern const _RuneLocale *_CurrentRuneLocale; -/// -/// -/// -/// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; -/// static __inline const _RuneLocale *__getCurrentRuneLocale(void) -/// { -/// -/// if (_ThreadRuneLocale) -/// return _ThreadRuneLocale; -/// return _CurrentRuneLocale; -/// } -/// -/// -/// -/// -/// -/// static __inline int -/// __maskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : -/// (__getCurrentRuneLocale())->__runetype[_c]) & _f; -/// } -/// -/// static __inline int -/// __sbmaskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : -/// (__getCurrentRuneLocale())->__runetype[_c] & _f; -/// } -/// -/// static __inline int -/// __istype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__maskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __sbistype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__sbmaskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __isctype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= 128) ? 0 : -/// !!(_DefaultRuneLocale.__runetype[_c] & _f); -/// } -/// -/// static __inline __ct_rune_t -/// __toupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtoupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __tolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline int -/// __wcwidth(__ct_rune_t _c) -/// { -/// unsigned int _x; -/// -/// if (_c == 0) -/// return (0); -/// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); -/// if ((_x & 0xe0000000L) != 0) -/// return ((_x & 0xe0000000L) >> 30); -/// return ((_x & 0x00040000L) != 0 ? 1 : -1); -/// } -/// -/// -/// -/// int isalnum(int); -/// int isalpha(int); -/// int iscntrl(int); -/// int isdigit(int); -/// int isgraph(int); -/// int islower(int); -/// int isprint(int); -/// int ispunct(int); -/// int isspace(int); -/// int isupper(int); -/// int isxdigit(int); -/// int tolower(int); -/// int toupper(int); -/// -/// -/// int isascii(int); -/// int toascii(int); -/// -/// -/// -/// int isblank(int); -/// -/// -/// -/// int digittoint(int); -/// int ishexnumber(int); -/// int isideogram(int); -/// int isnumber(int); -/// int isphonogram(int); -/// int isrune(int); -/// int isspecial(int); -/// -/// -/// -/// -/// -/// typedef struct _xlocale *locale_t; -/// -/// -/// -/// -/// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// _RuneLocale *__runes_for_locale(locale_t, int*); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// int __limit; -/// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); -/// return (__c < 0 || __c >= __limit) ? 0 : -/// runes->__runetype[__c] & __f; -/// } -/// -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// return (!!__sbmaskrune_l(__c, __f, __loc)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } -/// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } -/// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } -/// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } -/// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } -/// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } -/// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } -/// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } -/// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } -/// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } -/// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } -/// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } -/// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } -/// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } -/// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } -/// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } -/// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// -/// inline int digittoint_l(int, locale_t); -/// inline int tolower_l(int, locale_t); -/// inline int toupper_l(int, locale_t); -/// -/// inline int digittoint_l(int __c, locale_t __l) -/// { return __sbmaskrune_l((__c), 0xFF, __l); } -/// -/// inline int tolower_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__maplower[__c]; -/// } -/// inline int toupper_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__mapupper[__c]; -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __mbstate_t mbstate_t; -/// -/// -/// -/// -/// typedef __size_t size_t; -/// -/// -/// -/// -/// -/// typedef __va_list va_list; -/// -/// -/// -/// -/// -/// -/// typedef ___wchar_t wchar_t; -/// -/// -/// -/// -/// -/// typedef __wint_t wint_t; -/// -/// typedef struct __sFILE FILE; -/// -/// struct tm; -/// -/// -/// wint_t btowc(int); -/// wint_t fgetwc(FILE *); -/// wchar_t * -/// fgetws(wchar_t * restrict, int, FILE * restrict); -/// wint_t fputwc(wchar_t, FILE *); -/// int fputws(const wchar_t * restrict, FILE * restrict); -/// int fwide(FILE *, int); -/// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); -/// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); -/// wint_t getwc(FILE *); -/// wint_t getwchar(void); -/// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); -/// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, -/// mbstate_t * restrict); -/// int mbsinit(const mbstate_t *); -/// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// mbstate_t * restrict); -/// wint_t putwc(wchar_t, FILE *); -/// wint_t putwchar(wchar_t); -/// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// ...); -/// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); -/// wint_t ungetwc(wint_t, FILE *); -/// int vfwprintf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// __va_list); -/// int vwprintf(const wchar_t * restrict, __va_list); -/// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); -/// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// int wcscoll(const wchar_t *, const wchar_t *); -/// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); -/// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, -/// const struct tm * restrict); -/// size_t wcslen(const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, -/// size_t); -/// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); -/// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// mbstate_t * restrict); -/// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) -/// __attribute__((__pure__)); -/// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); -/// int wctob(wint_t); -/// double wcstod(const wchar_t * restrict, wchar_t ** restrict); -/// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, -/// wchar_t ** restrict); -/// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); -/// unsigned long -/// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); -/// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); -/// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); -/// wchar_t *wmemset(wchar_t *, wchar_t, size_t); -/// int wprintf(const wchar_t * restrict, ...); -/// int wscanf(const wchar_t * restrict, ...); -/// -/// -/// extern FILE *__stdinp; -/// extern FILE *__stdoutp; -/// extern FILE *__stderrp; -/// -/// int vfwscanf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, -/// __va_list); -/// int vwscanf(const wchar_t * restrict, __va_list); -/// float wcstof(const wchar_t * restrict, wchar_t ** restrict); -/// long double -/// wcstold(const wchar_t * restrict, wchar_t ** restrict); -/// -/// -/// long long -/// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// unsigned long long -/// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// -/// -/// -/// int wcswidth(const wchar_t *, size_t); -/// int wcwidth(wchar_t); -/// -/// -/// -/// -/// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// FILE *open_wmemstream(wchar_t **, size_t *); -/// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); -/// int wcscasecmp(const wchar_t *, const wchar_t *); -/// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); -/// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); -/// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// -/// -/// -/// wchar_t *fgetwln(FILE * restrict, size_t * restrict); -/// size_t wcslcat(wchar_t *, const wchar_t *, size_t); -/// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -/// -/// -/// -/// -/// -/// int wcscasecmp_l(const wchar_t *, const wchar_t *, -/// locale_t); -/// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, -/// locale_t); -/// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -/// size_t wcsxfrm_l(wchar_t * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct lconv { -/// char *decimal_point; -/// char *thousands_sep; -/// char *grouping; -/// char *int_curr_symbol; -/// char *currency_symbol; -/// char *mon_decimal_point; -/// char *mon_thousands_sep; -/// char *mon_grouping; -/// char *positive_sign; -/// char *negative_sign; -/// char int_frac_digits; -/// char frac_digits; -/// char p_cs_precedes; -/// char p_sep_by_space; -/// char n_cs_precedes; -/// char n_sep_by_space; -/// char p_sign_posn; -/// char n_sign_posn; -/// char int_p_cs_precedes; -/// char int_n_cs_precedes; -/// char int_p_sep_by_space; -/// char int_n_sep_by_space; -/// char int_p_sign_posn; -/// char int_n_sign_posn; -/// }; -/// -/// -/// struct lconv *localeconv(void); -/// char *setlocale(int, const char *); -/// -/// -/// -/// -/// locale_t duplocale(locale_t base); -/// void freelocale(locale_t loc); -/// locale_t newlocale(int mask, const char *locale, locale_t base); -/// const char *querylocale(int mask, locale_t loc); -/// locale_t uselocale(locale_t loc); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// wint_t btowc_l(int, locale_t); -/// wint_t fgetwc_l(FILE *, locale_t); -/// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, -/// locale_t); -/// wint_t fputwc_l(wchar_t, FILE *, locale_t); -/// int fputws_l(const wchar_t * restrict, FILE * restrict, -/// locale_t); -/// int fwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// int fwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t getwc_l(FILE *, locale_t); -/// wint_t getwchar_l(locale_t); -/// size_t mbrlen_l(const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t mbrtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// int mbsinit_l(const mbstate_t *, locale_t); -/// size_t mbsrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// wint_t putwc_l(wchar_t, FILE *, locale_t); -/// wint_t putwchar_l(wchar_t, locale_t); -/// int swprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, ...); -/// int swscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t ungetwc_l(wint_t, FILE *, locale_t); -/// int vfwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vwprintf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// size_t wcrtomb_l(char * restrict, wchar_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsftime_l(wchar_t * restrict, size_t, -/// const wchar_t * restrict, -/// const struct tm * restrict, locale_t); -/// size_t wcsrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// double wcstod_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long wcstol_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long wcstoul_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// int wcswidth_l(const wchar_t *, size_t, locale_t); -/// int wctob_l(wint_t, locale_t); -/// int wcwidth_l(wchar_t, locale_t); -/// int wprintf_l(locale_t, const wchar_t * restrict, ...); -/// int wscanf_l(locale_t, const wchar_t * restrict, ...); -/// int vfwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t *restrict, __va_list); -/// int vwscanf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// float wcstof_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long double wcstold_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long long wcstoll_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long long wcstoull_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// size_t mbsnrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsnrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// -/// -/// -/// -/// -/// struct lconv *localeconv_l(locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __rune_t rune_t; -/// -/// typedef struct { -/// int quot; -/// int rem; -/// } div_t; -/// -/// typedef struct { -/// long quot; -/// long rem; -/// } ldiv_t; -/// -/// -/// -/// -/// -/// double atof_l(const char *, locale_t); -/// int atoi_l(const char *, locale_t); -/// long atol_l(const char *, locale_t); -/// long long atoll_l(const char *, locale_t); -/// int mblen_l(const char *, size_t, locale_t); -/// size_t mbstowcs_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// int mbtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// double strtod_l(const char *, char **, locale_t); -/// float strtof_l(const char *, char **, locale_t); -/// long strtol_l(const char *, char **, int, locale_t); -/// long double strtold_l(const char *, char **, locale_t); -/// long long strtoll_l(const char *, char **, int, locale_t); -/// unsigned long strtoul_l(const char *, char **, int, locale_t); -/// unsigned long long strtoull_l(const char *, char **, int, locale_t); -/// size_t wcstombs_l(char * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// int wctomb_l(char *, wchar_t, locale_t); -/// -/// int ___mb_cur_max_l(locale_t); -/// -/// -/// extern int __mb_cur_max; -/// extern int ___mb_cur_max(void); -/// -/// -/// _Noreturn void abort(void); -/// int abs(int) __attribute__((__const__)); -/// int atexit(void (* )(void)); -/// double atof(const char *); -/// int atoi(const char *); -/// long atol(const char *); -/// void *bsearch(const void *, const void *, size_t, -/// size_t, int (*)(const void * , const void *)); -/// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(1, 2))); -/// div_t div(int, int) __attribute__((__const__)); -/// _Noreturn void exit(int); -/// void free(void *); -/// char *getenv(const char *); -/// long labs(long) __attribute__((__const__)); -/// ldiv_t ldiv(long, long) __attribute__((__const__)); -/// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); -/// int mblen(const char *, size_t); -/// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); -/// int mbtowc(wchar_t * restrict, const char * restrict, size_t); -/// void qsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// int rand(void); -/// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// void srand(unsigned); -/// double strtod(const char * restrict, char ** restrict); -/// float strtof(const char * restrict, char ** restrict); -/// long strtol(const char * restrict, char ** restrict, int); -/// long double -/// strtold(const char * restrict, char ** restrict); -/// unsigned long -/// strtoul(const char * restrict, char ** restrict, int); -/// int system(const char *); -/// int wctomb(char *, wchar_t); -/// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); -/// -/// typedef struct { -/// long long quot; -/// long long rem; -/// } lldiv_t; -/// -/// -/// long long -/// atoll(const char *); -/// -/// long long -/// llabs(long long) __attribute__((__const__)); -/// -/// lldiv_t lldiv(long long, long long) __attribute__((__const__)); -/// -/// long long -/// strtoll(const char * restrict, char ** restrict, int); -/// -/// unsigned long long -/// strtoull(const char * restrict, char ** restrict, int); -/// -/// -/// _Noreturn void _Exit(int); -/// -/// -/// -/// -/// -/// -/// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) -/// __attribute__((__alloc_size__(2))); -/// int at_quick_exit(void (*)(void)); -/// _Noreturn void -/// quick_exit(int); -/// -/// -/// -/// -/// -/// char *realpath(const char * restrict, char * restrict); -/// -/// -/// int rand_r(unsigned *); -/// -/// -/// int posix_memalign(void **, size_t, size_t); -/// int setenv(const char *, const char *, int); -/// int unsetenv(const char *); -/// -/// -/// -/// int getsubopt(char **, char *const *, char **); -/// -/// char *mkdtemp(char *); -/// -/// -/// -/// int mkstemp(char *); -/// -/// long a64l(const char *); -/// double drand48(void); -/// -/// double erand48(unsigned short[3]); -/// -/// -/// char *initstate(unsigned int, char *, size_t); -/// long jrand48(unsigned short[3]); -/// char *l64a(long); -/// void lcong48(unsigned short[7]); -/// long lrand48(void); -/// -/// char *mktemp(char *); -/// -/// -/// long mrand48(void); -/// long nrand48(unsigned short[3]); -/// int putenv(char *); -/// long random(void); -/// unsigned short -/// *seed48(unsigned short[3]); -/// char *setstate( char *); -/// void srand48(long); -/// void srandom(unsigned int); -/// -/// -/// -/// int grantpt(int); -/// int posix_openpt(int); -/// char *ptsname(int); -/// int unlockpt(int); -/// -/// -/// -/// int ptsname_r(int, char *, size_t); -/// -/// -/// -/// extern const char *malloc_conf; -/// extern void (*malloc_message)(void *, const char *); -/// -/// void abort2(const char *, int, void **) __attribute__((__noreturn__)); -/// __uint32_t -/// arc4random(void); -/// void arc4random_buf(void *, size_t); -/// __uint32_t -/// arc4random_uniform(__uint32_t); -/// -/// -/// -/// -/// -/// -/// char *getbsize(int *, long *); -/// -/// char *cgetcap(char *, const char *, int); -/// int cgetclose(void); -/// int cgetent(char **, char **, const char *); -/// int cgetfirst(char **, char **); -/// int cgetmatch(const char *, const char *); -/// int cgetnext(char **, char **); -/// int cgetnum(char *, const char *, long *); -/// int cgetset(const char *); -/// int cgetstr(char *, const char *, char **); -/// int cgetustr(char *, const char *, char **); -/// -/// int daemon(int, int); -/// int daemonfd(int, int); -/// char *devname(__dev_t, __mode_t); -/// char *devname_r(__dev_t, __mode_t, char *, int); -/// char *fdevname(int); -/// char *fdevname_r(int, char *, int); -/// int getloadavg(double [], int); -/// const char * -/// getprogname(void); -/// -/// int heapsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// -/// -/// -/// -/// -/// -/// int l64a_r(long, char *, int); -/// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); -/// -/// -/// -/// int mkostemp(char *, int); -/// int mkostemps(char *, int, int); -/// int mkostempsat(int, char *, int, int); -/// void qsort_r(void *, size_t, size_t, void *, -/// int (*)(void *, const void *, const void *)); -/// int radixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(2, 3))); -/// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// int rpmatch(const char *); -/// void setprogname(const char *); -/// int sradixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void srandomdev(void); -/// long long -/// strtonum(const char *, long long, long long, const char **); -/// -/// -/// __int64_t -/// strtoq(const char *, char **, int); -/// __uint64_t -/// strtouq(const char *, char **, int); -/// -/// extern char *suboptarg; -/// -/// -/// -/// -/// -/// -/// typedef size_t rsize_t; -/// -/// -/// -/// -/// typedef int errno_t; -/// -/// -/// -/// typedef void (*constraint_handler_t)(const char * restrict, -/// void * restrict, errno_t); -/// -/// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); -/// -/// _Noreturn void abort_handler_s(const char * restrict, void * restrict, -/// errno_t); -/// -/// void ignore_handler_s(const char * restrict, void * restrict, errno_t); -/// -/// errno_t qsort_s(void *, rsize_t, rsize_t, -/// int (*)(const void *, const void *, void *), void *); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __int8_t int8_t; -/// -/// -/// -/// -/// typedef __int16_t int16_t; -/// -/// -/// -/// -/// typedef __int32_t int32_t; -/// -/// -/// -/// -/// typedef __int64_t int64_t; -/// -/// -/// -/// -/// typedef __uint8_t uint8_t; -/// -/// -/// -/// -/// typedef __uint16_t uint16_t; -/// -/// -/// -/// -/// typedef __uint32_t uint32_t; -/// -/// -/// -/// -/// typedef __uint64_t uint64_t; -/// -/// -/// -/// -/// typedef __intptr_t intptr_t; -/// -/// -/// -/// typedef __uintptr_t uintptr_t; -/// -/// -/// -/// typedef __intmax_t intmax_t; -/// -/// -/// -/// typedef __uintmax_t uintmax_t; -/// -/// -/// typedef __int_least8_t int_least8_t; -/// typedef __int_least16_t int_least16_t; -/// typedef __int_least32_t int_least32_t; -/// typedef __int_least64_t int_least64_t; -/// -/// typedef __uint_least8_t uint_least8_t; -/// typedef __uint_least16_t uint_least16_t; -/// typedef __uint_least32_t uint_least32_t; -/// typedef __uint_least64_t uint_least64_t; -/// -/// typedef __int_fast8_t int_fast8_t; -/// typedef __int_fast16_t int_fast16_t; -/// typedef __int_fast32_t int_fast32_t; -/// typedef __int_fast64_t int_fast64_t; -/// -/// typedef __uint_fast8_t uint_fast8_t; -/// typedef __uint_fast16_t uint_fast16_t; -/// typedef __uint_fast32_t uint_fast32_t; -/// typedef __uint_fast64_t uint_fast64_t; -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct pthread; -/// struct pthread_attr; -/// struct pthread_cond; -/// struct pthread_cond_attr; -/// struct pthread_mutex; -/// struct pthread_mutex_attr; -/// struct pthread_once; -/// struct pthread_rwlock; -/// struct pthread_rwlockattr; -/// struct pthread_barrier; -/// struct pthread_barrier_attr; -/// struct pthread_spinlock; -/// -/// typedef struct pthread *pthread_t; -/// -/// -/// typedef struct pthread_attr *pthread_attr_t; -/// typedef struct pthread_mutex *pthread_mutex_t; -/// typedef struct pthread_mutex_attr *pthread_mutexattr_t; -/// typedef struct pthread_cond *pthread_cond_t; -/// typedef struct pthread_cond_attr *pthread_condattr_t; -/// typedef int pthread_key_t; -/// typedef struct pthread_once pthread_once_t; -/// typedef struct pthread_rwlock *pthread_rwlock_t; -/// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; -/// typedef struct pthread_barrier *pthread_barrier_t; -/// typedef struct pthread_barrierattr *pthread_barrierattr_t; -/// typedef struct pthread_spinlock *pthread_spinlock_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef void *pthread_addr_t; -/// typedef void *(*pthread_startroutine_t)(void *); -/// -/// -/// -/// -/// struct pthread_once { -/// int state; -/// pthread_mutex_t mutex; -/// }; -/// -/// -/// -/// typedef unsigned char u_char; -/// typedef unsigned short u_short; -/// typedef unsigned int u_int; -/// typedef unsigned long u_long; -/// -/// typedef unsigned short ushort; -/// typedef unsigned int uint; -/// -/// typedef __uint8_t u_int8_t; -/// typedef __uint16_t u_int16_t; -/// typedef __uint32_t u_int32_t; -/// typedef __uint64_t u_int64_t; -/// -/// typedef __uint64_t u_quad_t; -/// typedef __int64_t quad_t; -/// typedef quad_t * qaddr_t; -/// -/// typedef char * caddr_t; -/// typedef const char * c_caddr_t; -/// -/// -/// typedef __blksize_t blksize_t; -/// -/// -/// -/// typedef __cpuwhich_t cpuwhich_t; -/// typedef __cpulevel_t cpulevel_t; -/// typedef __cpusetid_t cpusetid_t; -/// -/// -/// typedef __blkcnt_t blkcnt_t; -/// -/// -/// -/// -/// typedef __clock_t clock_t; -/// -/// -/// -/// -/// typedef __clockid_t clockid_t; -/// -/// -/// -/// typedef __critical_t critical_t; -/// typedef __daddr_t daddr_t; -/// -/// -/// typedef __dev_t dev_t; -/// -/// -/// -/// -/// typedef __fflags_t fflags_t; -/// -/// -/// -/// typedef __fixpt_t fixpt_t; -/// -/// -/// typedef __fsblkcnt_t fsblkcnt_t; -/// typedef __fsfilcnt_t fsfilcnt_t; -/// -/// -/// -/// -/// typedef __gid_t gid_t; -/// -/// -/// -/// -/// typedef __uint32_t in_addr_t; -/// -/// -/// -/// -/// typedef __uint16_t in_port_t; -/// -/// -/// -/// -/// typedef __id_t id_t; -/// -/// -/// -/// -/// typedef __ino_t ino_t; -/// -/// -/// -/// -/// typedef __key_t key_t; -/// -/// -/// -/// -/// typedef __lwpid_t lwpid_t; -/// -/// -/// -/// -/// typedef __mode_t mode_t; -/// -/// -/// -/// -/// typedef __accmode_t accmode_t; -/// -/// -/// -/// -/// typedef __nlink_t nlink_t; -/// -/// -/// -/// -/// typedef __off_t off_t; -/// -/// -/// -/// -/// typedef __off64_t off64_t; -/// -/// -/// -/// -/// typedef __pid_t pid_t; -/// -/// -/// -/// typedef __register_t register_t; -/// -/// -/// typedef __rlim_t rlim_t; -/// -/// -/// -/// typedef __int64_t sbintime_t; -/// -/// typedef __segsz_t segsz_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef __ssize_t ssize_t; -/// -/// -/// -/// -/// typedef __suseconds_t suseconds_t; -/// -/// -/// -/// -/// typedef __time_t time_t; -/// -/// -/// -/// -/// typedef __timer_t timer_t; -/// -/// -/// -/// -/// typedef __mqd_t mqd_t; -/// -/// -/// -/// typedef __u_register_t u_register_t; -/// -/// -/// typedef __uid_t uid_t; -/// -/// -/// -/// -/// typedef __useconds_t useconds_t; -/// -/// -/// -/// -/// -/// typedef unsigned long cap_ioctl_t; -/// -/// -/// -/// -/// struct cap_rights; -/// -/// typedef struct cap_rights cap_rights_t; -/// -/// typedef __uint64_t kpaddr_t; -/// typedef __uint64_t kvaddr_t; -/// typedef __uint64_t ksize_t; -/// typedef __int64_t kssize_t; -/// -/// typedef __vm_offset_t vm_offset_t; -/// typedef __uint64_t vm_ooffset_t; -/// typedef __vm_paddr_t vm_paddr_t; -/// typedef __uint64_t vm_pindex_t; -/// typedef __vm_size_t vm_size_t; -/// -/// typedef __rman_res_t rman_res_t; -/// -/// static __inline __uint16_t -/// __bitcount16(__uint16_t _x) -/// { -/// -/// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); -/// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f; -/// _x = (_x + (_x >> 8)) & 0x00ff; -/// return (_x); -/// } -/// -/// static __inline __uint32_t -/// __bitcount32(__uint32_t _x) -/// { -/// -/// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); -/// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// static __inline __uint64_t -/// __bitcount64(__uint64_t _x) -/// { -/// -/// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); -/// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)); -/// _x = (_x + (_x >> 32)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// -/// -/// -/// typedef struct __sigset { -/// __uint32_t __bits[4]; -/// } __sigset_t; -/// -/// -/// -/// struct timeval { -/// time_t tv_sec; -/// suseconds_t tv_usec; -/// }; -/// -/// -/// -/// -/// -/// struct timespec { -/// time_t tv_sec; -/// long tv_nsec; -/// }; -/// -/// -/// struct itimerspec { -/// struct timespec it_interval; -/// struct timespec it_value; -/// }; -/// -/// -/// typedef unsigned long __fd_mask; -/// -/// typedef __fd_mask fd_mask; -/// -/// -/// -/// -/// typedef __sigset_t sigset_t; -/// -/// typedef struct fd_set { -/// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; -/// } fd_set; -/// -/// -/// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -/// const struct timespec *restrict, const sigset_t *restrict); -/// -/// -/// -/// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -/// -/// -/// -/// -/// static __inline int -/// __major(dev_t _d) -/// { -/// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); -/// } -/// -/// static __inline int -/// __minor(dev_t _d) -/// { -/// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); -/// } -/// -/// static __inline dev_t -/// __makedev(int _Major, int _Minor) -/// { -/// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | -/// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// int ftruncate(int, off_t); -/// -/// -/// -/// off_t lseek(int, off_t, int); -/// -/// -/// -/// void * mmap(void *, size_t, int, int, int, off_t); -/// -/// -/// -/// int truncate(const char *, off_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// -/// -/// -/// -/// -/// static __inline u_int -/// atomic_fetchadd_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddl %0,%1 ; " -/// "# atomic_fetchadd_int" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// static __inline u_long -/// atomic_fetchadd_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddq %0,%1 ; " -/// "# atomic_fetchadd_long" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// static __inline int -/// atomic_testandset_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsl %2,%1 ; " -/// "# atomic_testandset_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandset_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsq %2,%1 ; " -/// "# atomic_testandset_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrl %2,%1 ; " -/// "# atomic_testandclear_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrq %2,%1 ; " -/// "# atomic_testandclear_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline void -/// __storeload_barrier(void) -/// { -/// -/// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_seq_cst(void) -/// { -/// -/// __storeload_barrier(); -/// } -/// -/// -/// -/// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// -/// -/// -/// -/// -/// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// -/// static __inline u_int -/// atomic_swap_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " xchgl %1,%0 ; " -/// "# atomic_swap_int" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// static __inline u_long -/// atomic_swap_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " xchgq %1,%0 ; " -/// "# atomic_swap_long" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// extern char *_PathLocale; -/// -/// int __detect_path_locale(void); -/// int __wrap_setrunelocale(const char *); -/// -/// -/// enum { -/// XLC_COLLATE = 0, -/// XLC_CTYPE, -/// XLC_MONETARY, -/// XLC_NUMERIC, -/// XLC_TIME, -/// XLC_MESSAGES, -/// XLC_LAST -/// }; -/// -/// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); -/// _Static_assert(XLC_COLLATE == -/// -/// 1 -/// -/// - 1, -/// "XLC_COLLATE doesn't match the LC_COLLATE value."); -/// _Static_assert(XLC_CTYPE == -/// -/// 2 -/// -/// - 1, -/// "XLC_CTYPE doesn't match the LC_CTYPE value."); -/// _Static_assert(XLC_MONETARY == -/// -/// 3 -/// -/// - 1, -/// "XLC_MONETARY doesn't match the LC_MONETARY value."); -/// _Static_assert(XLC_NUMERIC == -/// -/// 4 -/// -/// - 1, -/// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); -/// _Static_assert(XLC_TIME == -/// -/// 5 -/// -/// - 1, -/// "XLC_TIME doesn't match the LC_TIME value."); -/// _Static_assert(XLC_MESSAGES == -/// -/// 6 -/// -/// - 1, -/// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); -/// -/// struct xlocale_refcounted { -/// -/// long retain_count; -/// -/// void(*destructor)(void*); -/// }; -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_component { -/// struct xlocale_refcounted header; -/// -/// char locale[31 +1]; -/// -/// char version[12]; -/// }; -/// -/// -/// -/// -/// struct _xlocale { -/// struct xlocale_refcounted header; -/// -/// struct xlocale_component *components[XLC_LAST]; -/// -/// -/// int monetary_locale_changed; -/// -/// -/// int using_monetary_locale; -/// -/// -/// int numeric_locale_changed; -/// -/// -/// int using_numeric_locale; -/// -/// -/// int using_time_locale; -/// -/// -/// int using_messages_locale; -/// -/// struct lconv lconv; -/// -/// char *csym; -/// }; -/// -/// -/// -/// -/// __attribute__((unused)) static void* -/// xlocale_retain(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// atomic_add_long(&(obj->retain_count), 1); -/// return (val); -/// } -/// -/// -/// -/// -/// __attribute__((unused)) static void -/// xlocale_release(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// long count; -/// -/// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; -/// if (count < 0 && obj->destructor != -/// -/// ((void *)0) -/// -/// ) -/// obj->destructor(obj); -/// } -/// -/// -/// -/// -/// -/// extern void* __collate_load(const char*, locale_t); -/// extern void* __ctype_load(const char*, locale_t); -/// extern void* __messages_load(const char*, locale_t); -/// extern void* __monetary_load(const char*, locale_t); -/// extern void* __numeric_load(const char*, locale_t); -/// extern void* __time_load(const char*, locale_t); -/// -/// extern struct _xlocale __xlocale_global_locale; -/// extern struct _xlocale __xlocale_C_locale; -/// -/// -/// -/// -/// void __set_thread_rune_locale(locale_t loc); -/// -/// -/// -/// -/// extern int __has_thread_locale; -/// -/// -/// -/// -/// -/// extern _Thread_local locale_t __thread_locale; -/// -/// -/// -/// -/// -/// -/// -/// static inline locale_t __get_locale(void) -/// { -/// -/// if (!__has_thread_locale) { -/// return (&__xlocale_global_locale); -/// } -/// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); -/// } -/// -/// -/// -/// -/// -/// static inline locale_t get_real_locale(locale_t locale) -/// { -/// switch ((intptr_t)locale) { -/// case 0: return (&__xlocale_C_locale); -/// case -1: return (&__xlocale_global_locale); -/// default: return (locale); -/// } -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_ctype { -/// struct xlocale_component header; -/// _RuneLocale *runes; -/// size_t (*__mbrtowc)(wchar_t * -/// -/// restrict -/// -/// , const char * -/// -/// restrict -/// -/// , -/// size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int (*__mbsinit)(const mbstate_t *); -/// size_t (*__mbsnrtowcs)(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcrtomb)(char * -/// -/// restrict -/// -/// , wchar_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcsnrtombs)(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int __mb_cur_max; -/// int __mb_sb_limit; -/// -/// __mbstate_t mblen; -/// -/// __mbstate_t mbrlen; -/// -/// __mbstate_t mbrtoc16; -/// -/// __mbstate_t mbrtoc32; -/// -/// __mbstate_t mbrtowc; -/// -/// __mbstate_t mbsnrtowcs; -/// -/// __mbstate_t mbsrtowcs; -/// -/// __mbstate_t mbtowc; -/// -/// __mbstate_t c16rtomb; -/// -/// __mbstate_t c32rtomb; -/// -/// __mbstate_t wcrtomb; -/// -/// __mbstate_t wcsnrtombs; -/// -/// __mbstate_t wcsrtombs; -/// -/// __mbstate_t wctomb; -/// }; -/// -/// extern struct xlocale_ctype __xlocale_global_ctype; -/// -/// -/// -/// -/// int _none_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// -/// typedef size_t (*mbrtowc_pfn_t)(wchar_t * -/// -/// restrict -/// -/// , -/// const char * -/// -/// restrict -/// -/// , size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// typedef size_t (*wcrtomb_pfn_t)(char * -/// -/// restrict -/// -/// , wchar_t, -/// mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t __mbsnrtowcs_std(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , mbrtowc_pfn_t); -/// size_t __wcsnrtombs_std(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , wcrtomb_pfn_t); -/// - -var X_DefaultRuneLocale = _RuneLocale{ - - __magic: *(*[8]int8)(unsafe.Pointer(ts)), - __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), - __invalid_rune: 0xFFFD, - - __runetype: [256]uint64{ - - 0: uint64(0x00000200), - - 1: uint64(0x00000200), - - 2: uint64(0x00000200), - - 3: uint64(0x00000200), - - 4: uint64(0x00000200), - - 5: uint64(0x00000200), - - 6: uint64(0x00000200), - - 7: uint64(0x00000200), - - 8: uint64(0x00000200), - - 9: uint64(0x00000200 | - - 0x00004000 | - - 0x00020000), - - 10: uint64(0x00000200 | - - 0x00004000), - - 11: uint64(0x00000200 | - - 0x00004000), - - 12: uint64(0x00000200 | - - 0x00004000), - - 13: uint64(0x00000200 | - - 0x00004000), - - 14: uint64(0x00000200), - - 15: uint64(0x00000200), - - 16: uint64(0x00000200), - - 17: uint64(0x00000200), - - 18: uint64(0x00000200), - - 19: uint64(0x00000200), - - 20: uint64(0x00000200), - - 21: uint64(0x00000200), - - 22: uint64(0x00000200), - - 23: uint64(0x00000200), - - 24: uint64(0x00000200), - - 25: uint64(0x00000200), - - 26: uint64(0x00000200), - - 27: uint64(0x00000200), - - 28: uint64(0x00000200), - - 29: uint64(0x00000200), - - 30: uint64(0x00000200), - - 31: uint64(0x00000200), - - 32: uint64(0x00004000 | - - 0x00020000 | - - 0x00040000), - - 33: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 34: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 35: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 36: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 37: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 38: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 39: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 40: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 41: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 42: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 43: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 44: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 45: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 46: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 47: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 48: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(0)), - - 49: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(1)), - - 50: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(2)), - - 51: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(3)), - - 52: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(4)), - - 53: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(5)), - - 54: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(6)), - - 55: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(7)), - - 56: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(8)), - - 57: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(9)), - - 58: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 59: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 60: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 61: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 62: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 63: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 64: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 65: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(10)), - - 66: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(11)), - - 67: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(12)), - - 68: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(13)), - - 69: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(14)), - - 70: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(15)), - - 71: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 72: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 73: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 74: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 75: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 76: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 77: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 78: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 79: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 80: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 81: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 82: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 83: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 84: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 85: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 86: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 87: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 88: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 89: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 90: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 91: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 92: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 93: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 94: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 95: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 96: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 97: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(10)), - - 98: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(11)), - - 99: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(12)), - - 100: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(13)), - - 101: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(14)), - - 102: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(15)), - - 103: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 104: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 105: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 106: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 107: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 108: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 109: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 110: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 111: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 112: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 113: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 114: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 115: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 116: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 117: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 118: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 119: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 120: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 121: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 122: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 123: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 124: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 125: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 126: uint64(0x00002000 | - - 0x00040000 | +// # 1 "lib/libc/gen/ctype_.c" +// # 1 "" +// # 1 "" +// # 1 "lib/libc/gen/ctype_.c" +// # 36 "lib/libc/gen/ctype_.c" +// # 1 "./include/ctype.h" 1 +// # 43 "./include/ctype.h" +// # 1 "./sys/sys/cdefs.h" 1 +// # 41 "./sys/sys/cdefs.h" +// # 1 "./machine/cdefs.h" 1 +// # 42 "./sys/sys/cdefs.h" 2 +// # 44 "./include/ctype.h" 2 +// # 57 "./include/ctype.h" +// typedef void *locale_t; +// +// +// +// +// +// extern const char *_ctype_; +// extern const short *_tolower_tab_; +// extern const short *_toupper_tab_; +// +// +// int isalnum(int); +// int isalpha(int); +// int iscntrl(int); +// int isdigit(int); +// int isgraph(int); +// int islower(int); +// int isprint(int); +// int ispunct(int); +// int isspace(int); +// int isupper(int); +// int isxdigit(int); +// int tolower(int); +// int toupper(int); +// +// +// +// int isblank(int); +// +// +// +// int isascii(int); +// int toascii(int); +// int _tolower(int); +// int _toupper(int); +// +// +// +// int isalnum_l(int, locale_t); +// int isalpha_l(int, locale_t); +// int isblank_l(int, locale_t); +// int iscntrl_l(int, locale_t); +// int isdigit_l(int, locale_t); +// int isgraph_l(int, locale_t); +// int islower_l(int, locale_t); +// int isprint_l(int, locale_t); +// int ispunct_l(int, locale_t); +// int isspace_l(int, locale_t); +// int isupper_l(int, locale_t); +// int isxdigit_l(int, locale_t); +// int tolower_l(int, locale_t); +// int toupper_l(int, locale_t); +// +// +// +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int islower(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_tolower_tab_ + 1)[_c]); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_toupper_tab_ + 1)[_c]); +// } +// +// - 0x00000800), +// extern __inline __attribute__((__gnu_inline__)) +func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ + return Bool32(_c == ' ' || _c == '\t') +} - 127: uint64(0x00000200), - }, - __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, -} /* table.cpp.c:2243:19 */ - -var X_CurrentRuneLocale uintptr = 0 /* table.cpp.c:4092:19 */ - -/// _RuneLocale * -/// __runes_for_locale(locale_t locale, int *mb_sb_limit) -/// { -/// (locale = get_real_locale(locale)); -/// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); -/// *mb_sb_limit = c->__mb_sb_limit; -/// return c->runes; -/// } +// extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) +// { +// return ((unsigned int)_c <= 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) +// { +// return (_c & 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) +// { +// return (_c - 'A' + 'a'); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) +// { +// return (_c - 'a' + 'A'); +// } +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalnum_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalnum(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalpha_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalpha(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isblank_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isblank(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return iscntrl(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isgraph_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isgraph(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// islower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return islower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isprint_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isprint(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// ispunct_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return ispunct(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isspace_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isspace(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isupper(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isxdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// tolower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return tolower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// toupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return toupper(_c); +// } +// +// +// +// +// +// # 37 "lib/libc/gen/ctype_.c" 2 +// # 1 "./lib/libc/include/ctype_private.h" 1 +// +// +// +// +// +// # 5 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility push(hidden) +// # 5 "./lib/libc/include/ctype_private.h" +// +// extern const char _C_ctype_[]; +// extern const short _C_toupper_[]; +// extern const short _C_tolower_[]; +// +// # 9 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility pop +// # 9 "./lib/libc/include/ctype_private.h" +// +// # 38 "lib/libc/gen/ctype_.c" 2 + +var X_C_ctype_ = [257]int8{ + int8(0), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), + int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), + + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), +} /* ctype_.c:282:12 */ + +var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) @@ -3451,39 +809,39 @@ type ssize_t = int64 /* alltypes.h:65:15 */ type off_t = int64 /* alltypes.h:162:16 */ 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 + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:320:9 */ type FILE = _IO_FILE /* alltypes.h:320:25 */ @@ -3491,8 +849,8 @@ type FILE = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -3505,7 +863,7 @@ 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 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -3515,7 +873,7 @@ 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 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -3530,58 +888,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -3620,8 +978,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3630,13 +988,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3647,8 +1005,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3689,8 +1047,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -3701,8 +1059,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -3944,16 +1302,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3963,8 +1321,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3978,8 +1336,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3990,8 +1348,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -4020,18 +1378,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4051,8 +1409,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -4062,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4143,8 +1501,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -4153,18 +1511,18 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() } - for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4172,14 +1530,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4188,11 +1546,11 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(float32(sign) * X__builtin_inff(tls)) } if !(i != 0) { - for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4201,21 +1559,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } - return float64(X__builtin_nanf(tls, ts+54)) + 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4223,10 +1581,10 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float continue } if c == ')' { - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -4235,19 +1593,19 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -4257,16 +1615,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -4313,8 +1671,8 @@ __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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -4328,8 +1686,8 @@ __3: } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4339,8 +1697,8 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4348,23 +1706,23 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -4397,8 +1755,8 @@ __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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -4420,8 +1778,8 @@ __17: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4438,8 +1796,8 @@ __20: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4458,7 +1816,7 @@ __15: if !!(base&(base-uint32(1)) != 0) { goto __24 } - bs = int32(*(*int8)(unsafe.Pointer(ts + 55 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + bs = int32(*(*int8)(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)) { @@ -4468,8 +1826,8 @@ __26: goto __27 __27: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4486,8 +1844,8 @@ __29: goto __30 __30: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4506,8 +1864,8 @@ __32: goto __33 __33: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4524,8 +1882,8 @@ __35: goto __36 __36: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4547,8 +1905,8 @@ __39: goto __40 __40: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4567,8 +1925,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -4601,34 +1959,34 @@ __43: // 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 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 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) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } 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) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = 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) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*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) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -4655,7 +2013,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -4684,7 +2042,7 @@ 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 u struct {Ff float64;} at bp, 8 var y double_t = x @@ -4721,26 +2079,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:41:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type pid_t = int32 /* alltypes.h:235:13 */ @@ -4750,8 +2108,8 @@ type uid_t = uint32 /* alltypes.h:245:18 */ type gid_t = uint32 /* alltypes.h:250:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:355:1 */ type socklen_t = uint32 /* alltypes.h:361:18 */ @@ -4759,311 +2117,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */ type sa_family_t = uint16 /* alltypes.h:366: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 + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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 in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_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 + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__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 + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_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 + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_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 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_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 } + 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: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 } + 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:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + 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]int8 + F__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 } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_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 + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_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 + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_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 + 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: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 + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_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 + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [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 + Fai 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 + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [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 + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype 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 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout 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) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -5076,8 +2434,8 @@ type time_t = int64 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:229:1 */ type pthread_t = uintptr /* alltypes.h:273:26 */ @@ -5088,62 +2446,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:402:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ @@ -5151,35 +2509,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int64 /* alltypes.h:219: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 + 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 } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ type useconds_t = uint32 /* alltypes.h:260:18 */ @@ -5213,10 +2571,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } 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 + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -5312,7 +2670,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -5322,30 +2680,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //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 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 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 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { 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) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) 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 + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -5359,33 +2717,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid 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 + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -5483,8 +2841,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -5495,7 +2853,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, 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 + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -5505,117 +2863,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_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)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_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 + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_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 + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -5629,24 +2987,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [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 + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -5660,45 +3018,45 @@ 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 */ + F__ccgo_pad1 [0]uint32 + Fid 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 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount 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]int8 - 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]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -5706,10 +3064,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -5726,7 +3084,7 @@ func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ bp := tls.Alloc(32) defer tls.Free(32) - Xsprintf(tls, s, ts+64, + Xsprintf(tls, s, ts+23, 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))))) } @@ -5738,10 +3096,10 @@ func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') } - Xstrcpy(tls, s, ts+89) + Xstrcpy(tls, s, ts+48) } -var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 98)) /* getnameinfo.c:36:20 */ +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* 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) @@ -5758,13 +3116,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 // 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+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { return } if family == 2 { Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) - Xmemcpy(tls, bp, ts+129, uint64(12)) + Xmemcpy(tls, bp, ts+88, uint64(12)) a = bp /* &atmp[0] */ } for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { @@ -5780,13 +3138,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) - Xmemcpy(tls, bp+528+8, ts+129, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + Xmemcpy(tls, bp+528+8, ts+88, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -5900,21 +3258,21 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr switch af { case 2: - if socklen_t(Xsnprintf(tls, s, uint64(l), ts+142, 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 { + if socklen_t(Xsnprintf(tls, s, uint64(l), ts+101, 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+129, uint64(12)) != 0 { + if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 { Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), - ts+154, + ts+113, 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]int8{})), - ts+178, + ts+137, 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))), @@ -5927,7 +3285,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { continue } - j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+208)) + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) if j > max { best = i max = j @@ -6071,8 +3429,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 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) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -6095,7 +3453,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -6119,20 +3477,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:152:18 */ 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 + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -6158,14 +3516,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 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 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -6196,7 +3554,7 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); var _f FILE _ = _f - var f uintptr = Xfopen(tls, ts+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { case 2: @@ -6258,10 +3616,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [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: */ @@ -6311,31 +3669,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: 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 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 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)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -6344,7 +3702,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -6377,7 +3735,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 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 + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -6457,7 +3815,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -6474,12 +3832,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -6493,10 +3851,10 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) } else { Xmemcpy(tls, bp+28+8, - ts+129, uint64(12)) + ts+88, uint64(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) Xmemcpy(tls, bp+8, - ts+129, uint64(12)) + ts+88, uint64(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4)) da = bp + 56 /* &da4 */ @@ -6506,8 +3864,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -6535,7 +3893,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -6555,7 +3913,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i var cnt int32 = 0 var p uintptr _ = p - *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 54 /* "" */ + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ var port uint64 = uint64(0) switch socktype { @@ -6587,9 +3945,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -6604,14 +3962,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -6672,19 +4030,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } 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 { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*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)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).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 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&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 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -6706,7 +4064,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ 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) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -6738,11 +4096,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -6772,12 +4130,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -6848,8 +4206,8 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ } func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.cpp.c:4092:41: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_)) // ctype_.c:319:23: } -var ts1 = "RuneMagi\x00NONE\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\x00infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\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 ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\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/musl_openbsd_arm64.go b/vendor/modernc.org/libc/musl_openbsd_arm64.go index 6a2a07bade..ba015fc487 100644 --- a/vendor/modernc.org/libc/musl_openbsd_arm64.go +++ b/vendor/modernc.org/libc/musl_openbsd_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.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/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/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.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/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/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -357,2970 +357,328 @@ type size_t = uint64 /* :9:23 */ type wchar_t = int32 /* :15:24 */ -/// typedef __ct_rune_t __wint_t; -/// -/// -/// -/// typedef __uint_least16_t __char16_t; -/// typedef __uint_least32_t __char32_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef struct { -/// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); -/// -/// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); -/// -/// } __max_align_t; -/// -/// typedef __uint64_t __dev_t; -/// -/// typedef __uint32_t __fixpt_t; -/// -/// -/// -/// -/// -/// typedef union { -/// char __mbstate8[128]; -/// __int64_t _mbstateL; -/// } __mbstate_t; -/// -/// typedef __uintmax_t __rman_res_t; -/// -/// -/// -/// -/// -/// -/// typedef __builtin_va_list __va_list; -/// -/// -/// -/// -/// -/// -/// typedef __va_list __gnuc_va_list; -/// -/// -/// -/// -/// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); -/// -/// -/// extern int __mb_sb_limit; - -type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr -} /* table.cpp.c:290:3 */ - -type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr -} /* table.cpp.c:295:3 */ - -type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - _ [4]byte - __runetype [256]uint64 - __maplower [256]int32 - __mapupper [256]int32 - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - _ [4]byte -} /* table.cpp.c:320:3 */ -/// -/// extern const _RuneLocale _DefaultRuneLocale; -/// extern const _RuneLocale *_CurrentRuneLocale; -/// -/// -/// -/// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; -/// static __inline const _RuneLocale *__getCurrentRuneLocale(void) -/// { -/// -/// if (_ThreadRuneLocale) -/// return _ThreadRuneLocale; -/// return _CurrentRuneLocale; -/// } -/// -/// -/// -/// -/// -/// static __inline int -/// __maskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : -/// (__getCurrentRuneLocale())->__runetype[_c]) & _f; -/// } -/// -/// static __inline int -/// __sbmaskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : -/// (__getCurrentRuneLocale())->__runetype[_c] & _f; -/// } -/// -/// static __inline int -/// __istype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__maskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __sbistype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__sbmaskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __isctype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= 128) ? 0 : -/// !!(_DefaultRuneLocale.__runetype[_c] & _f); -/// } -/// -/// static __inline __ct_rune_t -/// __toupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtoupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __tolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline int -/// __wcwidth(__ct_rune_t _c) -/// { -/// unsigned int _x; -/// -/// if (_c == 0) -/// return (0); -/// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); -/// if ((_x & 0xe0000000L) != 0) -/// return ((_x & 0xe0000000L) >> 30); -/// return ((_x & 0x00040000L) != 0 ? 1 : -1); -/// } -/// -/// -/// -/// int isalnum(int); -/// int isalpha(int); -/// int iscntrl(int); -/// int isdigit(int); -/// int isgraph(int); -/// int islower(int); -/// int isprint(int); -/// int ispunct(int); -/// int isspace(int); -/// int isupper(int); -/// int isxdigit(int); -/// int tolower(int); -/// int toupper(int); -/// -/// -/// int isascii(int); -/// int toascii(int); -/// -/// -/// -/// int isblank(int); -/// -/// -/// -/// int digittoint(int); -/// int ishexnumber(int); -/// int isideogram(int); -/// int isnumber(int); -/// int isphonogram(int); -/// int isrune(int); -/// int isspecial(int); -/// -/// -/// -/// -/// -/// typedef struct _xlocale *locale_t; -/// -/// -/// -/// -/// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// _RuneLocale *__runes_for_locale(locale_t, int*); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// int __limit; -/// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); -/// return (__c < 0 || __c >= __limit) ? 0 : -/// runes->__runetype[__c] & __f; -/// } -/// -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// return (!!__sbmaskrune_l(__c, __f, __loc)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } -/// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } -/// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } -/// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } -/// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } -/// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } -/// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } -/// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } -/// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } -/// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } -/// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } -/// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } -/// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } -/// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } -/// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } -/// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } -/// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// -/// inline int digittoint_l(int, locale_t); -/// inline int tolower_l(int, locale_t); -/// inline int toupper_l(int, locale_t); -/// -/// inline int digittoint_l(int __c, locale_t __l) -/// { return __sbmaskrune_l((__c), 0xFF, __l); } -/// -/// inline int tolower_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__maplower[__c]; -/// } -/// inline int toupper_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__mapupper[__c]; -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __mbstate_t mbstate_t; -/// -/// -/// -/// -/// typedef __size_t size_t; -/// -/// -/// -/// -/// -/// typedef __va_list va_list; -/// -/// -/// -/// -/// -/// -/// typedef ___wchar_t wchar_t; -/// -/// -/// -/// -/// -/// typedef __wint_t wint_t; -/// -/// typedef struct __sFILE FILE; -/// -/// struct tm; -/// -/// -/// wint_t btowc(int); -/// wint_t fgetwc(FILE *); -/// wchar_t * -/// fgetws(wchar_t * restrict, int, FILE * restrict); -/// wint_t fputwc(wchar_t, FILE *); -/// int fputws(const wchar_t * restrict, FILE * restrict); -/// int fwide(FILE *, int); -/// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); -/// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); -/// wint_t getwc(FILE *); -/// wint_t getwchar(void); -/// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); -/// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, -/// mbstate_t * restrict); -/// int mbsinit(const mbstate_t *); -/// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// mbstate_t * restrict); -/// wint_t putwc(wchar_t, FILE *); -/// wint_t putwchar(wchar_t); -/// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// ...); -/// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); -/// wint_t ungetwc(wint_t, FILE *); -/// int vfwprintf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// __va_list); -/// int vwprintf(const wchar_t * restrict, __va_list); -/// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); -/// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// int wcscoll(const wchar_t *, const wchar_t *); -/// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); -/// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, -/// const struct tm * restrict); -/// size_t wcslen(const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, -/// size_t); -/// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); -/// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// mbstate_t * restrict); -/// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) -/// __attribute__((__pure__)); -/// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); -/// int wctob(wint_t); -/// double wcstod(const wchar_t * restrict, wchar_t ** restrict); -/// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, -/// wchar_t ** restrict); -/// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); -/// unsigned long -/// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); -/// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); -/// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); -/// wchar_t *wmemset(wchar_t *, wchar_t, size_t); -/// int wprintf(const wchar_t * restrict, ...); -/// int wscanf(const wchar_t * restrict, ...); -/// -/// -/// extern FILE *__stdinp; -/// extern FILE *__stdoutp; -/// extern FILE *__stderrp; -/// -/// int vfwscanf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, -/// __va_list); -/// int vwscanf(const wchar_t * restrict, __va_list); -/// float wcstof(const wchar_t * restrict, wchar_t ** restrict); -/// long double -/// wcstold(const wchar_t * restrict, wchar_t ** restrict); -/// -/// -/// long long -/// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// unsigned long long -/// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// -/// -/// -/// int wcswidth(const wchar_t *, size_t); -/// int wcwidth(wchar_t); -/// -/// -/// -/// -/// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// FILE *open_wmemstream(wchar_t **, size_t *); -/// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); -/// int wcscasecmp(const wchar_t *, const wchar_t *); -/// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); -/// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); -/// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// -/// -/// -/// wchar_t *fgetwln(FILE * restrict, size_t * restrict); -/// size_t wcslcat(wchar_t *, const wchar_t *, size_t); -/// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -/// -/// -/// -/// -/// -/// int wcscasecmp_l(const wchar_t *, const wchar_t *, -/// locale_t); -/// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, -/// locale_t); -/// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -/// size_t wcsxfrm_l(wchar_t * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct lconv { -/// char *decimal_point; -/// char *thousands_sep; -/// char *grouping; -/// char *int_curr_symbol; -/// char *currency_symbol; -/// char *mon_decimal_point; -/// char *mon_thousands_sep; -/// char *mon_grouping; -/// char *positive_sign; -/// char *negative_sign; -/// char int_frac_digits; -/// char frac_digits; -/// char p_cs_precedes; -/// char p_sep_by_space; -/// char n_cs_precedes; -/// char n_sep_by_space; -/// char p_sign_posn; -/// char n_sign_posn; -/// char int_p_cs_precedes; -/// char int_n_cs_precedes; -/// char int_p_sep_by_space; -/// char int_n_sep_by_space; -/// char int_p_sign_posn; -/// char int_n_sign_posn; -/// }; -/// -/// -/// struct lconv *localeconv(void); -/// char *setlocale(int, const char *); -/// -/// -/// -/// -/// locale_t duplocale(locale_t base); -/// void freelocale(locale_t loc); -/// locale_t newlocale(int mask, const char *locale, locale_t base); -/// const char *querylocale(int mask, locale_t loc); -/// locale_t uselocale(locale_t loc); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// wint_t btowc_l(int, locale_t); -/// wint_t fgetwc_l(FILE *, locale_t); -/// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, -/// locale_t); -/// wint_t fputwc_l(wchar_t, FILE *, locale_t); -/// int fputws_l(const wchar_t * restrict, FILE * restrict, -/// locale_t); -/// int fwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// int fwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t getwc_l(FILE *, locale_t); -/// wint_t getwchar_l(locale_t); -/// size_t mbrlen_l(const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t mbrtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// int mbsinit_l(const mbstate_t *, locale_t); -/// size_t mbsrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// wint_t putwc_l(wchar_t, FILE *, locale_t); -/// wint_t putwchar_l(wchar_t, locale_t); -/// int swprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, ...); -/// int swscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t ungetwc_l(wint_t, FILE *, locale_t); -/// int vfwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vwprintf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// size_t wcrtomb_l(char * restrict, wchar_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsftime_l(wchar_t * restrict, size_t, -/// const wchar_t * restrict, -/// const struct tm * restrict, locale_t); -/// size_t wcsrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// double wcstod_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long wcstol_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long wcstoul_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// int wcswidth_l(const wchar_t *, size_t, locale_t); -/// int wctob_l(wint_t, locale_t); -/// int wcwidth_l(wchar_t, locale_t); -/// int wprintf_l(locale_t, const wchar_t * restrict, ...); -/// int wscanf_l(locale_t, const wchar_t * restrict, ...); -/// int vfwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t *restrict, __va_list); -/// int vwscanf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// float wcstof_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long double wcstold_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long long wcstoll_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long long wcstoull_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// size_t mbsnrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsnrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// -/// -/// -/// -/// -/// struct lconv *localeconv_l(locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __rune_t rune_t; -/// -/// typedef struct { -/// int quot; -/// int rem; -/// } div_t; -/// -/// typedef struct { -/// long quot; -/// long rem; -/// } ldiv_t; -/// -/// -/// -/// -/// -/// double atof_l(const char *, locale_t); -/// int atoi_l(const char *, locale_t); -/// long atol_l(const char *, locale_t); -/// long long atoll_l(const char *, locale_t); -/// int mblen_l(const char *, size_t, locale_t); -/// size_t mbstowcs_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// int mbtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// double strtod_l(const char *, char **, locale_t); -/// float strtof_l(const char *, char **, locale_t); -/// long strtol_l(const char *, char **, int, locale_t); -/// long double strtold_l(const char *, char **, locale_t); -/// long long strtoll_l(const char *, char **, int, locale_t); -/// unsigned long strtoul_l(const char *, char **, int, locale_t); -/// unsigned long long strtoull_l(const char *, char **, int, locale_t); -/// size_t wcstombs_l(char * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// int wctomb_l(char *, wchar_t, locale_t); -/// -/// int ___mb_cur_max_l(locale_t); -/// -/// -/// extern int __mb_cur_max; -/// extern int ___mb_cur_max(void); -/// -/// -/// _Noreturn void abort(void); -/// int abs(int) __attribute__((__const__)); -/// int atexit(void (* )(void)); -/// double atof(const char *); -/// int atoi(const char *); -/// long atol(const char *); -/// void *bsearch(const void *, const void *, size_t, -/// size_t, int (*)(const void * , const void *)); -/// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(1, 2))); -/// div_t div(int, int) __attribute__((__const__)); -/// _Noreturn void exit(int); -/// void free(void *); -/// char *getenv(const char *); -/// long labs(long) __attribute__((__const__)); -/// ldiv_t ldiv(long, long) __attribute__((__const__)); -/// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); -/// int mblen(const char *, size_t); -/// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); -/// int mbtowc(wchar_t * restrict, const char * restrict, size_t); -/// void qsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// int rand(void); -/// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// void srand(unsigned); -/// double strtod(const char * restrict, char ** restrict); -/// float strtof(const char * restrict, char ** restrict); -/// long strtol(const char * restrict, char ** restrict, int); -/// long double -/// strtold(const char * restrict, char ** restrict); -/// unsigned long -/// strtoul(const char * restrict, char ** restrict, int); -/// int system(const char *); -/// int wctomb(char *, wchar_t); -/// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); -/// -/// typedef struct { -/// long long quot; -/// long long rem; -/// } lldiv_t; -/// -/// -/// long long -/// atoll(const char *); -/// -/// long long -/// llabs(long long) __attribute__((__const__)); -/// -/// lldiv_t lldiv(long long, long long) __attribute__((__const__)); -/// -/// long long -/// strtoll(const char * restrict, char ** restrict, int); -/// -/// unsigned long long -/// strtoull(const char * restrict, char ** restrict, int); -/// -/// -/// _Noreturn void _Exit(int); -/// -/// -/// -/// -/// -/// -/// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) -/// __attribute__((__alloc_size__(2))); -/// int at_quick_exit(void (*)(void)); -/// _Noreturn void -/// quick_exit(int); -/// -/// -/// -/// -/// -/// char *realpath(const char * restrict, char * restrict); -/// -/// -/// int rand_r(unsigned *); -/// -/// -/// int posix_memalign(void **, size_t, size_t); -/// int setenv(const char *, const char *, int); -/// int unsetenv(const char *); -/// -/// -/// -/// int getsubopt(char **, char *const *, char **); -/// -/// char *mkdtemp(char *); -/// -/// -/// -/// int mkstemp(char *); -/// -/// long a64l(const char *); -/// double drand48(void); -/// -/// double erand48(unsigned short[3]); -/// -/// -/// char *initstate(unsigned int, char *, size_t); -/// long jrand48(unsigned short[3]); -/// char *l64a(long); -/// void lcong48(unsigned short[7]); -/// long lrand48(void); -/// -/// char *mktemp(char *); -/// -/// -/// long mrand48(void); -/// long nrand48(unsigned short[3]); -/// int putenv(char *); -/// long random(void); -/// unsigned short -/// *seed48(unsigned short[3]); -/// char *setstate( char *); -/// void srand48(long); -/// void srandom(unsigned int); -/// -/// -/// -/// int grantpt(int); -/// int posix_openpt(int); -/// char *ptsname(int); -/// int unlockpt(int); -/// -/// -/// -/// int ptsname_r(int, char *, size_t); -/// -/// -/// -/// extern const char *malloc_conf; -/// extern void (*malloc_message)(void *, const char *); -/// -/// void abort2(const char *, int, void **) __attribute__((__noreturn__)); -/// __uint32_t -/// arc4random(void); -/// void arc4random_buf(void *, size_t); -/// __uint32_t -/// arc4random_uniform(__uint32_t); -/// -/// -/// -/// -/// -/// -/// char *getbsize(int *, long *); -/// -/// char *cgetcap(char *, const char *, int); -/// int cgetclose(void); -/// int cgetent(char **, char **, const char *); -/// int cgetfirst(char **, char **); -/// int cgetmatch(const char *, const char *); -/// int cgetnext(char **, char **); -/// int cgetnum(char *, const char *, long *); -/// int cgetset(const char *); -/// int cgetstr(char *, const char *, char **); -/// int cgetustr(char *, const char *, char **); -/// -/// int daemon(int, int); -/// int daemonfd(int, int); -/// char *devname(__dev_t, __mode_t); -/// char *devname_r(__dev_t, __mode_t, char *, int); -/// char *fdevname(int); -/// char *fdevname_r(int, char *, int); -/// int getloadavg(double [], int); -/// const char * -/// getprogname(void); -/// -/// int heapsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// -/// -/// -/// -/// -/// -/// int l64a_r(long, char *, int); -/// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); -/// -/// -/// -/// int mkostemp(char *, int); -/// int mkostemps(char *, int, int); -/// int mkostempsat(int, char *, int, int); -/// void qsort_r(void *, size_t, size_t, void *, -/// int (*)(void *, const void *, const void *)); -/// int radixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(2, 3))); -/// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// int rpmatch(const char *); -/// void setprogname(const char *); -/// int sradixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void srandomdev(void); -/// long long -/// strtonum(const char *, long long, long long, const char **); -/// -/// -/// __int64_t -/// strtoq(const char *, char **, int); -/// __uint64_t -/// strtouq(const char *, char **, int); -/// -/// extern char *suboptarg; -/// -/// -/// -/// -/// -/// -/// typedef size_t rsize_t; -/// -/// -/// -/// -/// typedef int errno_t; -/// -/// -/// -/// typedef void (*constraint_handler_t)(const char * restrict, -/// void * restrict, errno_t); -/// -/// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); -/// -/// _Noreturn void abort_handler_s(const char * restrict, void * restrict, -/// errno_t); -/// -/// void ignore_handler_s(const char * restrict, void * restrict, errno_t); -/// -/// errno_t qsort_s(void *, rsize_t, rsize_t, -/// int (*)(const void *, const void *, void *), void *); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __int8_t int8_t; -/// -/// -/// -/// -/// typedef __int16_t int16_t; -/// -/// -/// -/// -/// typedef __int32_t int32_t; -/// -/// -/// -/// -/// typedef __int64_t int64_t; -/// -/// -/// -/// -/// typedef __uint8_t uint8_t; -/// -/// -/// -/// -/// typedef __uint16_t uint16_t; -/// -/// -/// -/// -/// typedef __uint32_t uint32_t; -/// -/// -/// -/// -/// typedef __uint64_t uint64_t; -/// -/// -/// -/// -/// typedef __intptr_t intptr_t; -/// -/// -/// -/// typedef __uintptr_t uintptr_t; -/// -/// -/// -/// typedef __intmax_t intmax_t; -/// -/// -/// -/// typedef __uintmax_t uintmax_t; -/// -/// -/// typedef __int_least8_t int_least8_t; -/// typedef __int_least16_t int_least16_t; -/// typedef __int_least32_t int_least32_t; -/// typedef __int_least64_t int_least64_t; -/// -/// typedef __uint_least8_t uint_least8_t; -/// typedef __uint_least16_t uint_least16_t; -/// typedef __uint_least32_t uint_least32_t; -/// typedef __uint_least64_t uint_least64_t; -/// -/// typedef __int_fast8_t int_fast8_t; -/// typedef __int_fast16_t int_fast16_t; -/// typedef __int_fast32_t int_fast32_t; -/// typedef __int_fast64_t int_fast64_t; -/// -/// typedef __uint_fast8_t uint_fast8_t; -/// typedef __uint_fast16_t uint_fast16_t; -/// typedef __uint_fast32_t uint_fast32_t; -/// typedef __uint_fast64_t uint_fast64_t; -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct pthread; -/// struct pthread_attr; -/// struct pthread_cond; -/// struct pthread_cond_attr; -/// struct pthread_mutex; -/// struct pthread_mutex_attr; -/// struct pthread_once; -/// struct pthread_rwlock; -/// struct pthread_rwlockattr; -/// struct pthread_barrier; -/// struct pthread_barrier_attr; -/// struct pthread_spinlock; -/// -/// typedef struct pthread *pthread_t; -/// -/// -/// typedef struct pthread_attr *pthread_attr_t; -/// typedef struct pthread_mutex *pthread_mutex_t; -/// typedef struct pthread_mutex_attr *pthread_mutexattr_t; -/// typedef struct pthread_cond *pthread_cond_t; -/// typedef struct pthread_cond_attr *pthread_condattr_t; -/// typedef int pthread_key_t; -/// typedef struct pthread_once pthread_once_t; -/// typedef struct pthread_rwlock *pthread_rwlock_t; -/// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; -/// typedef struct pthread_barrier *pthread_barrier_t; -/// typedef struct pthread_barrierattr *pthread_barrierattr_t; -/// typedef struct pthread_spinlock *pthread_spinlock_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef void *pthread_addr_t; -/// typedef void *(*pthread_startroutine_t)(void *); -/// -/// -/// -/// -/// struct pthread_once { -/// int state; -/// pthread_mutex_t mutex; -/// }; -/// -/// -/// -/// typedef unsigned char u_char; -/// typedef unsigned short u_short; -/// typedef unsigned int u_int; -/// typedef unsigned long u_long; -/// -/// typedef unsigned short ushort; -/// typedef unsigned int uint; -/// -/// typedef __uint8_t u_int8_t; -/// typedef __uint16_t u_int16_t; -/// typedef __uint32_t u_int32_t; -/// typedef __uint64_t u_int64_t; -/// -/// typedef __uint64_t u_quad_t; -/// typedef __int64_t quad_t; -/// typedef quad_t * qaddr_t; -/// -/// typedef char * caddr_t; -/// typedef const char * c_caddr_t; -/// -/// -/// typedef __blksize_t blksize_t; -/// -/// -/// -/// typedef __cpuwhich_t cpuwhich_t; -/// typedef __cpulevel_t cpulevel_t; -/// typedef __cpusetid_t cpusetid_t; -/// -/// -/// typedef __blkcnt_t blkcnt_t; -/// -/// -/// -/// -/// typedef __clock_t clock_t; -/// -/// -/// -/// -/// typedef __clockid_t clockid_t; -/// -/// -/// -/// typedef __critical_t critical_t; -/// typedef __daddr_t daddr_t; -/// -/// -/// typedef __dev_t dev_t; -/// -/// -/// -/// -/// typedef __fflags_t fflags_t; -/// -/// -/// -/// typedef __fixpt_t fixpt_t; -/// -/// -/// typedef __fsblkcnt_t fsblkcnt_t; -/// typedef __fsfilcnt_t fsfilcnt_t; -/// -/// -/// -/// -/// typedef __gid_t gid_t; -/// -/// -/// -/// -/// typedef __uint32_t in_addr_t; -/// -/// -/// -/// -/// typedef __uint16_t in_port_t; -/// -/// -/// -/// -/// typedef __id_t id_t; -/// -/// -/// -/// -/// typedef __ino_t ino_t; -/// -/// -/// -/// -/// typedef __key_t key_t; -/// -/// -/// -/// -/// typedef __lwpid_t lwpid_t; -/// -/// -/// -/// -/// typedef __mode_t mode_t; -/// -/// -/// -/// -/// typedef __accmode_t accmode_t; -/// -/// -/// -/// -/// typedef __nlink_t nlink_t; -/// -/// -/// -/// -/// typedef __off_t off_t; -/// -/// -/// -/// -/// typedef __off64_t off64_t; -/// -/// -/// -/// -/// typedef __pid_t pid_t; -/// -/// -/// -/// typedef __register_t register_t; -/// -/// -/// typedef __rlim_t rlim_t; -/// -/// -/// -/// typedef __int64_t sbintime_t; -/// -/// typedef __segsz_t segsz_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef __ssize_t ssize_t; -/// -/// -/// -/// -/// typedef __suseconds_t suseconds_t; -/// -/// -/// -/// -/// typedef __time_t time_t; -/// -/// -/// -/// -/// typedef __timer_t timer_t; -/// -/// -/// -/// -/// typedef __mqd_t mqd_t; -/// -/// -/// -/// typedef __u_register_t u_register_t; -/// -/// -/// typedef __uid_t uid_t; -/// -/// -/// -/// -/// typedef __useconds_t useconds_t; -/// -/// -/// -/// -/// -/// typedef unsigned long cap_ioctl_t; -/// -/// -/// -/// -/// struct cap_rights; -/// -/// typedef struct cap_rights cap_rights_t; -/// -/// typedef __uint64_t kpaddr_t; -/// typedef __uint64_t kvaddr_t; -/// typedef __uint64_t ksize_t; -/// typedef __int64_t kssize_t; -/// -/// typedef __vm_offset_t vm_offset_t; -/// typedef __uint64_t vm_ooffset_t; -/// typedef __vm_paddr_t vm_paddr_t; -/// typedef __uint64_t vm_pindex_t; -/// typedef __vm_size_t vm_size_t; -/// -/// typedef __rman_res_t rman_res_t; -/// -/// static __inline __uint16_t -/// __bitcount16(__uint16_t _x) -/// { -/// -/// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); -/// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f; -/// _x = (_x + (_x >> 8)) & 0x00ff; -/// return (_x); -/// } -/// -/// static __inline __uint32_t -/// __bitcount32(__uint32_t _x) -/// { -/// -/// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); -/// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// static __inline __uint64_t -/// __bitcount64(__uint64_t _x) -/// { -/// -/// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); -/// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)); -/// _x = (_x + (_x >> 32)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// -/// -/// -/// typedef struct __sigset { -/// __uint32_t __bits[4]; -/// } __sigset_t; -/// -/// -/// -/// struct timeval { -/// time_t tv_sec; -/// suseconds_t tv_usec; -/// }; -/// -/// -/// -/// -/// -/// struct timespec { -/// time_t tv_sec; -/// long tv_nsec; -/// }; -/// -/// -/// struct itimerspec { -/// struct timespec it_interval; -/// struct timespec it_value; -/// }; -/// -/// -/// typedef unsigned long __fd_mask; -/// -/// typedef __fd_mask fd_mask; -/// -/// -/// -/// -/// typedef __sigset_t sigset_t; -/// -/// typedef struct fd_set { -/// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; -/// } fd_set; -/// -/// -/// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -/// const struct timespec *restrict, const sigset_t *restrict); -/// -/// -/// -/// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -/// -/// -/// -/// -/// static __inline int -/// __major(dev_t _d) -/// { -/// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); -/// } -/// -/// static __inline int -/// __minor(dev_t _d) -/// { -/// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); -/// } -/// -/// static __inline dev_t -/// __makedev(int _Major, int _Minor) -/// { -/// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | -/// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// int ftruncate(int, off_t); -/// -/// -/// -/// off_t lseek(int, off_t, int); -/// -/// -/// -/// void * mmap(void *, size_t, int, int, int, off_t); -/// -/// -/// -/// int truncate(const char *, off_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// -/// -/// -/// -/// -/// static __inline u_int -/// atomic_fetchadd_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddl %0,%1 ; " -/// "# atomic_fetchadd_int" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// static __inline u_long -/// atomic_fetchadd_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddq %0,%1 ; " -/// "# atomic_fetchadd_long" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// static __inline int -/// atomic_testandset_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsl %2,%1 ; " -/// "# atomic_testandset_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandset_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsq %2,%1 ; " -/// "# atomic_testandset_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrl %2,%1 ; " -/// "# atomic_testandclear_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrq %2,%1 ; " -/// "# atomic_testandclear_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline void -/// __storeload_barrier(void) -/// { -/// -/// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_seq_cst(void) -/// { -/// -/// __storeload_barrier(); -/// } -/// -/// -/// -/// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// -/// -/// -/// -/// -/// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// -/// static __inline u_int -/// atomic_swap_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " xchgl %1,%0 ; " -/// "# atomic_swap_int" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// static __inline u_long -/// atomic_swap_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " xchgq %1,%0 ; " -/// "# atomic_swap_long" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// extern char *_PathLocale; -/// -/// int __detect_path_locale(void); -/// int __wrap_setrunelocale(const char *); -/// -/// -/// enum { -/// XLC_COLLATE = 0, -/// XLC_CTYPE, -/// XLC_MONETARY, -/// XLC_NUMERIC, -/// XLC_TIME, -/// XLC_MESSAGES, -/// XLC_LAST -/// }; -/// -/// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); -/// _Static_assert(XLC_COLLATE == -/// -/// 1 -/// -/// - 1, -/// "XLC_COLLATE doesn't match the LC_COLLATE value."); -/// _Static_assert(XLC_CTYPE == -/// -/// 2 -/// -/// - 1, -/// "XLC_CTYPE doesn't match the LC_CTYPE value."); -/// _Static_assert(XLC_MONETARY == -/// -/// 3 -/// -/// - 1, -/// "XLC_MONETARY doesn't match the LC_MONETARY value."); -/// _Static_assert(XLC_NUMERIC == -/// -/// 4 -/// -/// - 1, -/// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); -/// _Static_assert(XLC_TIME == -/// -/// 5 -/// -/// - 1, -/// "XLC_TIME doesn't match the LC_TIME value."); -/// _Static_assert(XLC_MESSAGES == -/// -/// 6 -/// -/// - 1, -/// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); -/// -/// struct xlocale_refcounted { -/// -/// long retain_count; -/// -/// void(*destructor)(void*); -/// }; -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_component { -/// struct xlocale_refcounted header; -/// -/// char locale[31 +1]; -/// -/// char version[12]; -/// }; -/// -/// -/// -/// -/// struct _xlocale { -/// struct xlocale_refcounted header; -/// -/// struct xlocale_component *components[XLC_LAST]; -/// -/// -/// int monetary_locale_changed; -/// -/// -/// int using_monetary_locale; -/// -/// -/// int numeric_locale_changed; -/// -/// -/// int using_numeric_locale; -/// -/// -/// int using_time_locale; -/// -/// -/// int using_messages_locale; -/// -/// struct lconv lconv; -/// -/// char *csym; -/// }; -/// -/// -/// -/// -/// __attribute__((unused)) static void* -/// xlocale_retain(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// atomic_add_long(&(obj->retain_count), 1); -/// return (val); -/// } -/// -/// -/// -/// -/// __attribute__((unused)) static void -/// xlocale_release(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// long count; -/// -/// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; -/// if (count < 0 && obj->destructor != -/// -/// ((void *)0) -/// -/// ) -/// obj->destructor(obj); -/// } -/// -/// -/// -/// -/// -/// extern void* __collate_load(const char*, locale_t); -/// extern void* __ctype_load(const char*, locale_t); -/// extern void* __messages_load(const char*, locale_t); -/// extern void* __monetary_load(const char*, locale_t); -/// extern void* __numeric_load(const char*, locale_t); -/// extern void* __time_load(const char*, locale_t); -/// -/// extern struct _xlocale __xlocale_global_locale; -/// extern struct _xlocale __xlocale_C_locale; -/// -/// -/// -/// -/// void __set_thread_rune_locale(locale_t loc); -/// -/// -/// -/// -/// extern int __has_thread_locale; -/// -/// -/// -/// -/// -/// extern _Thread_local locale_t __thread_locale; -/// -/// -/// -/// -/// -/// -/// -/// static inline locale_t __get_locale(void) -/// { -/// -/// if (!__has_thread_locale) { -/// return (&__xlocale_global_locale); -/// } -/// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); -/// } -/// -/// -/// -/// -/// -/// static inline locale_t get_real_locale(locale_t locale) -/// { -/// switch ((intptr_t)locale) { -/// case 0: return (&__xlocale_C_locale); -/// case -1: return (&__xlocale_global_locale); -/// default: return (locale); -/// } -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_ctype { -/// struct xlocale_component header; -/// _RuneLocale *runes; -/// size_t (*__mbrtowc)(wchar_t * -/// -/// restrict -/// -/// , const char * -/// -/// restrict -/// -/// , -/// size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int (*__mbsinit)(const mbstate_t *); -/// size_t (*__mbsnrtowcs)(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcrtomb)(char * -/// -/// restrict -/// -/// , wchar_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcsnrtombs)(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int __mb_cur_max; -/// int __mb_sb_limit; -/// -/// __mbstate_t mblen; -/// -/// __mbstate_t mbrlen; -/// -/// __mbstate_t mbrtoc16; -/// -/// __mbstate_t mbrtoc32; -/// -/// __mbstate_t mbrtowc; -/// -/// __mbstate_t mbsnrtowcs; -/// -/// __mbstate_t mbsrtowcs; -/// -/// __mbstate_t mbtowc; -/// -/// __mbstate_t c16rtomb; -/// -/// __mbstate_t c32rtomb; -/// -/// __mbstate_t wcrtomb; -/// -/// __mbstate_t wcsnrtombs; -/// -/// __mbstate_t wcsrtombs; -/// -/// __mbstate_t wctomb; -/// }; -/// -/// extern struct xlocale_ctype __xlocale_global_ctype; -/// -/// -/// -/// -/// int _none_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// -/// typedef size_t (*mbrtowc_pfn_t)(wchar_t * -/// -/// restrict -/// -/// , -/// const char * -/// -/// restrict -/// -/// , size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// typedef size_t (*wcrtomb_pfn_t)(char * -/// -/// restrict -/// -/// , wchar_t, -/// mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t __mbsnrtowcs_std(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , mbrtowc_pfn_t); -/// size_t __wcsnrtombs_std(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , wcrtomb_pfn_t); -/// - -var X_DefaultRuneLocale = _RuneLocale{ - - __magic: *(*[8]int8)(unsafe.Pointer(ts)), - __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), - __invalid_rune: 0xFFFD, - - __runetype: [256]uint64{ - - 0: uint64(0x00000200), - - 1: uint64(0x00000200), - - 2: uint64(0x00000200), - - 3: uint64(0x00000200), - - 4: uint64(0x00000200), - - 5: uint64(0x00000200), - - 6: uint64(0x00000200), - - 7: uint64(0x00000200), - - 8: uint64(0x00000200), - - 9: uint64(0x00000200 | - - 0x00004000 | - - 0x00020000), - - 10: uint64(0x00000200 | - - 0x00004000), - - 11: uint64(0x00000200 | - - 0x00004000), - - 12: uint64(0x00000200 | - - 0x00004000), - - 13: uint64(0x00000200 | - - 0x00004000), - - 14: uint64(0x00000200), - - 15: uint64(0x00000200), - - 16: uint64(0x00000200), - - 17: uint64(0x00000200), - - 18: uint64(0x00000200), - - 19: uint64(0x00000200), - - 20: uint64(0x00000200), - - 21: uint64(0x00000200), - - 22: uint64(0x00000200), - - 23: uint64(0x00000200), - - 24: uint64(0x00000200), - - 25: uint64(0x00000200), - - 26: uint64(0x00000200), - - 27: uint64(0x00000200), - - 28: uint64(0x00000200), - - 29: uint64(0x00000200), - - 30: uint64(0x00000200), - - 31: uint64(0x00000200), - - 32: uint64(0x00004000 | - - 0x00020000 | - - 0x00040000), - - 33: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 34: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 35: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 36: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 37: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 38: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 39: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 40: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 41: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 42: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 43: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 44: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 45: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 46: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 47: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 48: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(0)), - - 49: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(1)), - - 50: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(2)), - - 51: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(3)), - - 52: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(4)), - - 53: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(5)), - - 54: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(6)), - - 55: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(7)), - - 56: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(8)), - - 57: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(9)), - - 58: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 59: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 60: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 61: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 62: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 63: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 64: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 65: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(10)), - - 66: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(11)), - - 67: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(12)), - - 68: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(13)), - - 69: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(14)), - - 70: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(15)), - - 71: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 72: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 73: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 74: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 75: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 76: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 77: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 78: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 79: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 80: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 81: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 82: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 83: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 84: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 85: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 86: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 87: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 88: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 89: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 90: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 91: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 92: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 93: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 94: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 95: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 96: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 97: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(10)), - - 98: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(11)), - - 99: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(12)), - - 100: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(13)), - - 101: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(14)), - - 102: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(15)), - - 103: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 104: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 105: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 106: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 107: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 108: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 109: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 110: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 111: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 112: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 113: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 114: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 115: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 116: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 117: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 118: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 119: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 120: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 121: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 122: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 123: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 124: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 125: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 126: uint64(0x00002000 | - - 0x00040000 | +// # 1 "lib/libc/gen/ctype_.c" +// # 1 "" +// # 1 "" +// # 1 "lib/libc/gen/ctype_.c" +// # 36 "lib/libc/gen/ctype_.c" +// # 1 "./include/ctype.h" 1 +// # 43 "./include/ctype.h" +// # 1 "./sys/sys/cdefs.h" 1 +// # 41 "./sys/sys/cdefs.h" +// # 1 "./machine/cdefs.h" 1 +// # 42 "./sys/sys/cdefs.h" 2 +// # 44 "./include/ctype.h" 2 +// # 57 "./include/ctype.h" +// typedef void *locale_t; +// +// +// +// +// +// extern const char *_ctype_; +// extern const short *_tolower_tab_; +// extern const short *_toupper_tab_; +// +// +// int isalnum(int); +// int isalpha(int); +// int iscntrl(int); +// int isdigit(int); +// int isgraph(int); +// int islower(int); +// int isprint(int); +// int ispunct(int); +// int isspace(int); +// int isupper(int); +// int isxdigit(int); +// int tolower(int); +// int toupper(int); +// +// +// +// int isblank(int); +// +// +// +// int isascii(int); +// int toascii(int); +// int _tolower(int); +// int _toupper(int); +// +// +// +// int isalnum_l(int, locale_t); +// int isalpha_l(int, locale_t); +// int isblank_l(int, locale_t); +// int iscntrl_l(int, locale_t); +// int isdigit_l(int, locale_t); +// int isgraph_l(int, locale_t); +// int islower_l(int, locale_t); +// int isprint_l(int, locale_t); +// int ispunct_l(int, locale_t); +// int isspace_l(int, locale_t); +// int isupper_l(int, locale_t); +// int isxdigit_l(int, locale_t); +// int tolower_l(int, locale_t); +// int toupper_l(int, locale_t); +// +// +// +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int islower(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_tolower_tab_ + 1)[_c]); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_toupper_tab_ + 1)[_c]); +// } +// +// - 0x00000800), +// extern __inline __attribute__((__gnu_inline__)) +func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ + return Bool32(_c == ' ' || _c == '\t') +} - 127: uint64(0x00000200), - }, - __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, -} /* table.cpp.c:2243:19 */ - -var X_CurrentRuneLocale uintptr = 0 /* table.cpp.c:4092:19 */ - -/// _RuneLocale * -/// __runes_for_locale(locale_t locale, int *mb_sb_limit) -/// { -/// (locale = get_real_locale(locale)); -/// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); -/// *mb_sb_limit = c->__mb_sb_limit; -/// return c->runes; -/// } +// extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) +// { +// return ((unsigned int)_c <= 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) +// { +// return (_c & 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) +// { +// return (_c - 'A' + 'a'); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) +// { +// return (_c - 'a' + 'A'); +// } +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalnum_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalnum(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalpha_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalpha(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isblank_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isblank(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return iscntrl(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isgraph_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isgraph(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// islower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return islower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isprint_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isprint(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// ispunct_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return ispunct(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isspace_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isspace(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isupper(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isxdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// tolower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return tolower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// toupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return toupper(_c); +// } +// +// +// +// +// +// # 37 "lib/libc/gen/ctype_.c" 2 +// # 1 "./lib/libc/include/ctype_private.h" 1 +// +// +// +// +// +// # 5 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility push(hidden) +// # 5 "./lib/libc/include/ctype_private.h" +// +// extern const char _C_ctype_[]; +// extern const short _C_toupper_[]; +// extern const short _C_tolower_[]; +// +// # 9 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility pop +// # 9 "./lib/libc/include/ctype_private.h" +// +// # 38 "lib/libc/gen/ctype_.c" 2 + +var X_C_ctype_ = [257]int8{ + int8(0), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), + int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), + + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), +} /* ctype_.c:282:12 */ + +var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) } -type locale_t = uintptr /* alltypes.h:343:32 */ +type locale_t = uintptr /* alltypes.h:351:32 */ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ return Bool32(func() int32 { @@ -3401,29 +759,29 @@ func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ return Xisxdigit(tls, c) } -type uintptr_t = uint64 /* alltypes.h:55:24 */ +type uintptr_t = uint64 /* alltypes.h:63:24 */ -type intptr_t = int64 /* alltypes.h:70:15 */ +type intptr_t = int64 /* alltypes.h:78:15 */ -type int8_t = int8 /* alltypes.h:96:25 */ +type int8_t = int8 /* alltypes.h:104:25 */ -type int16_t = int16 /* alltypes.h:101:25 */ +type int16_t = int16 /* alltypes.h:109:25 */ -type int32_t = int32 /* alltypes.h:106:25 */ +type int32_t = int32 /* alltypes.h:114:25 */ -type int64_t = int64 /* alltypes.h:111:25 */ +type int64_t = int64 /* alltypes.h:119:25 */ -type intmax_t = int64 /* alltypes.h:116:25 */ +type intmax_t = int64 /* alltypes.h:124:25 */ -type uint8_t = uint8 /* alltypes.h:121:25 */ +type uint8_t = uint8 /* alltypes.h:129:25 */ -type uint16_t = uint16 /* alltypes.h:126:25 */ +type uint16_t = uint16 /* alltypes.h:134:25 */ -type uint32_t = uint32 /* alltypes.h:131:25 */ +type uint32_t = uint32 /* alltypes.h:139:25 */ -type uint64_t = uint64 /* alltypes.h:136:25 */ +type uint64_t = uint64 /* alltypes.h:144:25 */ -type uintmax_t = uint64 /* alltypes.h:146:25 */ +type uintmax_t = uint64 /* alltypes.h:154:25 */ type int_fast8_t = int8_t /* stdint.h:22:16 */ type int_fast64_t = int64_t /* stdint.h:23:17 */ @@ -3446,66 +804,66 @@ 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 ssize_t = int64 /* alltypes.h:65:15 */ +type ssize_t = int64 /* alltypes.h:73:15 */ -type off_t = int64 /* alltypes.h:162:16 */ +type off_t = int64 /* alltypes.h:170:16 */ 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:320:9 */ - -type FILE = _IO_FILE /* alltypes.h:320:25 */ - -type va_list = uintptr /* alltypes.h:326:27 */ + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr +} /* alltypes.h:328:9 */ + +type FILE = _IO_FILE /* alltypes.h:328:25 */ + +type va_list = uintptr /* alltypes.h:334:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ -type float_t = float32 /* alltypes.h:29:15 */ +type float_t = float32 /* alltypes.h:38:15 */ -type double_t = float64 /* alltypes.h:34:16 */ +type double_t = float64 /* alltypes.h:43: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 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -3515,7 +873,7 @@ 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 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -3530,58 +888,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -3620,8 +978,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3630,13 +988,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3647,8 +1005,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3689,8 +1047,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -3701,8 +1059,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -3944,16 +1302,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3963,8 +1321,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3978,8 +1336,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3990,8 +1348,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -4020,18 +1378,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4051,8 +1409,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -4062,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4143,8 +1501,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -4153,18 +1511,18 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() } - for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4172,14 +1530,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4188,11 +1546,11 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(float32(sign) * X__builtin_inff(tls)) } if !(i != 0) { - for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4201,21 +1559,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } - return float64(X__builtin_nanf(tls, ts+54)) + 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4223,10 +1581,10 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float continue } if c == ')' { - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -4235,19 +1593,19 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -4257,16 +1615,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -4313,8 +1671,8 @@ __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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -4328,8 +1686,8 @@ __3: } 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4339,8 +1697,8 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4348,23 +1706,23 @@ __4: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -4397,8 +1755,8 @@ __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-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -4420,8 +1778,8 @@ __17: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4438,8 +1796,8 @@ __20: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4458,7 +1816,7 @@ __15: if !!(base&(base-uint32(1)) != 0) { goto __24 } - bs = int32(*(*int8)(unsafe.Pointer(ts + 55 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + bs = int32(*(*int8)(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)) { @@ -4468,8 +1826,8 @@ __26: goto __27 __27: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4486,8 +1844,8 @@ __29: goto __30 __30: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4506,8 +1864,8 @@ __32: goto __33 __33: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4524,8 +1882,8 @@ __35: goto __36 __36: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4547,8 +1905,8 @@ __39: goto __40 __40: 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)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4567,8 +1925,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -4601,34 +1959,34 @@ __43: // 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 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 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) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } 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) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = 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) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*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) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -4655,7 +2013,7 @@ 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 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -4684,7 +2042,7 @@ 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 u struct {Ff float64;} at bp, 8 var y double_t = x @@ -4721,349 +2079,349 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 -} /* alltypes.h:41:54 */ + F__ll int64 + F__ld float64 +} /* alltypes.h:49:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ -type pid_t = int32 /* alltypes.h:235:13 */ +type pid_t = int32 /* alltypes.h:243:13 */ -type uid_t = uint32 /* alltypes.h:245:18 */ +type uid_t = uint32 /* alltypes.h:253:18 */ -type gid_t = uint32 /* alltypes.h:250:18 */ +type gid_t = uint32 /* alltypes.h:258:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t -} /* alltypes.h:355:1 */ + Fiov_base uintptr + Fiov_len size_t +} /* alltypes.h:363:1 */ -type socklen_t = uint32 /* alltypes.h:361:18 */ +type socklen_t = uint32 /* alltypes.h:369:18 */ -type sa_family_t = uint16 /* alltypes.h:366:24 */ +type sa_family_t = uint16 /* alltypes.h:374: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 + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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 in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_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 + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__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 + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_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 + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_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 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_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 } + 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: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 } + 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:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__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]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + 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]int8 + F__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 } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_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 + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_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 + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_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 + 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: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 + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_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 + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [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 + Fai 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 + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [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 + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype 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 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout 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) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -5071,118 +2429,118 @@ __3: //TODO else UNLOCK(b->lock); } -type time_t = int64 /* alltypes.h:85:16 */ +type time_t = int64 /* alltypes.h:93:16 */ -type clockid_t = int32 /* alltypes.h:214:13 */ +type clockid_t = int32 /* alltypes.h:222:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 -} /* alltypes.h:229:1 */ + Ftv_sec time_t + Ftv_nsec int64 +} /* alltypes.h:237:1 */ -type pthread_t = uintptr /* alltypes.h:273:26 */ +type pthread_t = uintptr /* alltypes.h:281:26 */ -type pthread_once_t = int32 /* alltypes.h:279:13 */ +type pthread_once_t = int32 /* alltypes.h:287:13 */ -type pthread_key_t = uint32 /* alltypes.h:284:18 */ +type pthread_key_t = uint32 /* alltypes.h:292:18 */ -type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ +type pthread_spinlock_t = int32 /* alltypes.h:297:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:302:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:307:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:312:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:317:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:357:9 */ -type sigset_t = __sigset_t /* alltypes.h:349:71 */ +type sigset_t = __sigset_t /* alltypes.h:357:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } -} /* alltypes.h:372:147 */ +} /* alltypes.h:380:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } -} /* alltypes.h:377:157 */ +} /* alltypes.h:385:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } -} /* alltypes.h:387:112 */ +} /* alltypes.h:395:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } -} /* alltypes.h:397:139 */ +} /* alltypes.h:405:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } -} /* alltypes.h:402:137 */ +} /* alltypes.h:410:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ -type timer_t = uintptr /* alltypes.h:209:14 */ +type timer_t = uintptr /* alltypes.h:217:14 */ -type clock_t = int64 /* alltypes.h:219:14 */ +type clock_t = int64 /* alltypes.h:227: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 + 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 } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ -type useconds_t = uint32 /* alltypes.h:260:18 */ +type useconds_t = uint32 /* alltypes.h:268:18 */ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ bp := tls.Alloc(1608) @@ -5213,10 +2571,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } 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 + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -5312,7 +2670,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -5322,30 +2680,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //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 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 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 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { 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) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) 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 + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -5359,33 +2717,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid 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 + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -5483,8 +2841,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -5495,7 +2853,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, 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 + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -5505,117 +2863,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_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)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_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)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_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 + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_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 + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -5629,24 +2987,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [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 + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -5660,45 +3018,45 @@ 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 */ + F__ccgo_pad1 [0]uint32 + Fid 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 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount 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]int8 - 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]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -5706,10 +3064,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -5726,7 +3084,7 @@ func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ bp := tls.Alloc(32) defer tls.Free(32) - Xsprintf(tls, s, ts+64, + Xsprintf(tls, s, ts+23, 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))))) } @@ -5738,10 +3096,10 @@ func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') } - Xstrcpy(tls, s, ts+89) + Xstrcpy(tls, s, ts+48) } -var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 98)) /* getnameinfo.c:36:20 */ +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* 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) @@ -5758,13 +3116,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 // 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+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { return } if family == 2 { Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) - Xmemcpy(tls, bp, ts+129, uint64(12)) + Xmemcpy(tls, bp, ts+88, uint64(12)) a = bp /* &atmp[0] */ } for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { @@ -5780,13 +3138,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) - Xmemcpy(tls, bp+528+8, ts+129, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + Xmemcpy(tls, bp+528+8, ts+88, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -5900,21 +3258,21 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr switch af { case 2: - if socklen_t(Xsnprintf(tls, s, uint64(l), ts+142, 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 { + if socklen_t(Xsnprintf(tls, s, uint64(l), ts+101, 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+129, uint64(12)) != 0 { + if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 { Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), - ts+154, + ts+113, 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]int8{})), - ts+178, + ts+137, 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))), @@ -5927,7 +3285,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { continue } - j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+208)) + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) if j > max { best = i max = j @@ -6071,8 +3429,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 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) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -6095,7 +3453,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -6119,20 +3477,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } -type mode_t = uint32 /* alltypes.h:152:18 */ +type mode_t = uint32 /* alltypes.h:160:18 */ 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 + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -6158,14 +3516,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 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 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -6196,7 +3554,7 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); var _f FILE _ = _f - var f uintptr = Xfopen(tls, ts+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { case 2: @@ -6258,10 +3616,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [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: */ @@ -6311,31 +3669,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: 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 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 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)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -6344,7 +3702,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -6377,7 +3735,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 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 + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -6457,7 +3815,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -6474,12 +3832,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -6493,10 +3851,10 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) } else { Xmemcpy(tls, bp+28+8, - ts+129, uint64(12)) + ts+88, uint64(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) Xmemcpy(tls, bp+8, - ts+129, uint64(12)) + ts+88, uint64(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4)) da = bp + 56 /* &da4 */ @@ -6506,8 +3864,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -6535,7 +3893,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -6555,7 +3913,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i var cnt int32 = 0 var p uintptr _ = p - *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 54 /* "" */ + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ var port uint64 = uint64(0) switch socktype { @@ -6587,9 +3945,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -6604,14 +3962,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = 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) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -6672,19 +4030,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } 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 { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*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)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).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 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&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 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -6706,7 +4064,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ 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) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -6738,11 +4096,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -6772,12 +4130,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = 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) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -6848,8 +4206,8 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ } func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.cpp.c:4092:41: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_)) // ctype_.c:319:23: } -var ts1 = "RuneMagi\x00NONE\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\x00infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\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 ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\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/musl_windows_386.go b/vendor/modernc.org/libc/musl_windows_386.go index f802d13d50..24c5b2408f 100644 --- a/vendor/modernc.org/libc/musl_windows_386.go +++ b/vendor/modernc.org/libc/musl_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch\i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/stdlib/bsearch.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT. +// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT. package libc @@ -863,32 +863,32 @@ type mode_t = uint32 /* alltypes.h:175:18 */ type syscall_arg_t = int32 /* syscall.h:22:14 */ func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */ - panic(`arch\i386\atomic_arch.h:4:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:4:2: assembler statements not supported`) return t } func a_and(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:29:20: */ - panic(`arch\i386\atomic_arch.h:31:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:31:2: assembler statements not supported`) } func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:37:20: */ - panic(`arch\i386\atomic_arch.h:39:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:39:2: assembler statements not supported`) } func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:87:19: */ var r int32 - panic(`arch\i386\atomic_arch.h:90:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:90:2: assembler statements not supported`) return r } func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:96:19: */ var r int32 - panic(`arch\i386\atomic_arch.h:99:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:99:2: assembler statements not supported`) return r } func a_clz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:104:19: */ - panic(`arch\i386\atomic_arch.h:106:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:106:2: assembler statements not supported`) return int32(x) } @@ -917,7 +917,7 @@ type __timer = struct { func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */ var self uintptr - panic(`arch\i386\pthread_arch.h:4:2: assembler statements not supported`) + panic(`arch/i386/pthread_arch.h:4:2: assembler statements not supported`) return self } @@ -1039,26 +1039,6 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c return Xwcsrtombs(tls, s, bp, n, uintptr(0)) } -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 > size_t(0) { - try = base + uintptr(width*(nel/size_t(2))) - sign = (*struct { - f func(*TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) - if sign < 0 { - nel = nel / size_t(2) - } else if sign > 0 { - base = try + uintptr(width) - nel = nel - (nel/size_t(2) + size_t(1)) - } else { - return try - } - } - return uintptr(0) -} - // Support signed or unsigned plain-char // Implementation choices... diff --git a/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go b/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go index c6ed350178..a360eefe61 100644 --- a/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname netdb', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netdb/netdb_darwin_amd64.go -pkgname netdb', DO NOT EDIT. package netdb diff --git a/vendor/modernc.org/libc/netdb/capi_openbsd_386.go b/vendor/modernc.org/libc/netdb/capi_openbsd_386.go index f52677fe6f..7a1e621c73 100644 --- a/vendor/modernc.org/libc/netdb/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/netdb/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netdb/netdb_freebsd_386.go -pkgname netdb', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netdb/netdb_openbsd_386.go -pkgname netdb', DO NOT EDIT. package netdb diff --git a/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go b/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go index 88a4a4f321..6b0868954b 100644 --- a/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netdb/netdb_openbsd_amd64.go -pkgname netdb', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netdb/netdb_openbsd_arm64.go -pkgname netdb', DO NOT EDIT. package netdb diff --git a/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go b/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go index 8243f35839..3e115620ec 100644 --- a/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go +++ b/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname netdb', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netdb/netdb_darwin_amd64.go -pkgname netdb', DO NOT EDIT. package netdb @@ -15,734 +15,734 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 - AF_CCITT = 10 - AF_CHAOS = 5 - AF_CNT = 21 - AF_COIP = 20 - AF_DATAKIT = 9 - AF_DECnet = 12 - AF_DLI = 13 - AF_E164 = 28 - AF_ECMA = 8 - AF_HYLINK = 15 - AF_IEEE80211 = 37 - AF_IMPLINK = 3 - AF_INET = 2 - AF_INET6 = 30 - AF_IPX = 23 - AF_ISDN = 28 - AF_ISO = 7 - AF_LAT = 14 - AF_LINK = 18 - AF_LOCAL = 1 - AF_MAX = 40 - AF_NATM = 31 - AF_NDRV = 27 - AF_NETBIOS = 33 - AF_NS = 6 - AF_OSI = 7 - AF_PPP = 34 - AF_PUP = 4 - AF_RESERVED_36 = 36 - AF_ROUTE = 17 - AF_SIP = 24 - AF_SNA = 11 - AF_SYSTEM = 32 - AF_UNIX = 1 - AF_UNSPEC = 0 - AF_UTUN = 38 - AI_ADDRCONFIG = 0x00000400 - AI_ALL = 0x00000100 - AI_CANONNAME = 0x00000002 - AI_DEFAULT = 1536 - AI_MASK = 5127 - AI_NUMERICHOST = 0x00000004 - AI_NUMERICSERV = 0x00001000 - AI_PASSIVE = 0x00000001 - AI_UNUSABLE = 0x10000000 - AI_V4MAPPED = 0x00000800 - AI_V4MAPPED_CFG = 0x00000200 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - CONNECT_DATA_AUTHENTICATED = 0x4 - CONNECT_DATA_IDEMPOTENT = 0x2 - CONNECT_RESUME_ON_READ_WRITE = 0x1 - EAI_ADDRFAMILY = 1 - EAI_AGAIN = 2 - EAI_BADFLAGS = 3 - EAI_BADHINTS = 12 - EAI_FAIL = 4 - EAI_FAMILY = 5 - EAI_MAX = 15 - EAI_MEMORY = 6 - EAI_NODATA = 7 - EAI_NONAME = 8 - EAI_OVERFLOW = 14 - EAI_PROTOCOL = 13 - EAI_SERVICE = 9 - EAI_SOCKTYPE = 10 - EAI_SYSTEM = 11 - FD_SETSIZE = 1024 - HOST_NOT_FOUND = 1 - ICMP6_FILTER = 18 - ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 - INADDR_NONE = 0xffffffff - INET6_ADDRSTRLEN = 46 - INET_ADDRSTRLEN = 16 - INT16_MAX = 32767 - INT16_MIN = -32768 - INT32_MAX = 2147483647 - INT32_MIN = -2147483648 - INT64_MAX = 9223372036854775807 - INT64_MIN = -9223372036854775808 - INT8_MAX = 127 - INT8_MIN = -128 - INTMAX_MAX = 9223372036854775807 - INTMAX_MIN = -9223372036854775808 - INTPTR_MAX = 9223372036854775807 - INTPTR_MIN = -9223372036854775808 - INT_FAST16_MAX = 32767 - INT_FAST16_MIN = -32768 - INT_FAST32_MAX = 2147483647 - INT_FAST32_MIN = -2147483648 - INT_FAST64_MAX = 9223372036854775807 - INT_FAST64_MIN = -9223372036854775808 - INT_FAST8_MAX = 127 - INT_FAST8_MIN = -128 - INT_LEAST16_MAX = 32767 - INT_LEAST16_MIN = -32768 - INT_LEAST32_MAX = 2147483647 - INT_LEAST32_MIN = -2147483648 - INT_LEAST64_MAX = 9223372036854775807 - INT_LEAST64_MIN = -9223372036854775808 - INT_LEAST8_MAX = 127 - INT_LEAST8_MIN = -128 - IN_CLASSA_HOST = 0x00ffffff - IN_CLASSA_MAX = 128 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 24 - IN_CLASSB_HOST = 0x0000ffff - IN_CLASSB_MAX = 65536 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 16 - IN_CLASSC_HOST = 0x000000ff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 8 - IN_CLASSD_HOST = 0x0fffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 28 - IN_LOOPBACKNET = 127 - IPCTL_ACCEPTSOURCEROUTE = 13 - IPCTL_DEFTTL = 3 - IPCTL_DIRECTEDBROADCAST = 9 - IPCTL_FASTFORWARDING = 14 - IPCTL_FORWARDING = 1 - IPCTL_GIF_TTL = 16 - IPCTL_INTRQDROPS = 11 - IPCTL_INTRQMAXLEN = 10 - IPCTL_KEEPFAITH = 15 - IPCTL_MAXID = 17 - IPCTL_RTEXPIRE = 5 - IPCTL_RTMAXCACHE = 7 - IPCTL_RTMINEXPIRE = 6 - IPCTL_SENDREDIRECTS = 2 - IPCTL_SOURCEROUTE = 8 - IPCTL_STATS = 12 - IPPORT_HIFIRSTAUTO = 49152 - IPPORT_HILASTAUTO = 65535 - IPPORT_RESERVED = 1024 - IPPORT_RESERVEDSTART = 600 - IPPORT_USERRESERVED = 5000 - IPPROTO_3PC = 34 - IPPROTO_ADFS = 68 - IPPROTO_AH = 51 - IPPROTO_AHIP = 61 - IPPROTO_APES = 99 - IPPROTO_ARGUS = 13 - IPPROTO_AX25 = 93 - IPPROTO_BHA = 49 - IPPROTO_BLT = 30 - IPPROTO_BRSATMON = 76 - IPPROTO_CFTP = 62 - IPPROTO_CHAOS = 16 - IPPROTO_CMTP = 38 - IPPROTO_CPHB = 73 - IPPROTO_CPNX = 72 - IPPROTO_DDP = 37 - IPPROTO_DGP = 86 - IPPROTO_DIVERT = 254 - IPPROTO_DONE = 257 - IPPROTO_DSTOPTS = 60 - IPPROTO_EGP = 8 - IPPROTO_EMCON = 14 - IPPROTO_ENCAP = 98 - IPPROTO_EON = 80 - IPPROTO_ESP = 50 - IPPROTO_ETHERIP = 97 - IPPROTO_FRAGMENT = 44 - IPPROTO_GGP = 3 - IPPROTO_GMTP = 100 - IPPROTO_GRE = 47 - IPPROTO_HELLO = 63 - IPPROTO_HMP = 20 - IPPROTO_HOPOPTS = 0 - IPPROTO_ICMP = 1 - IPPROTO_ICMPV6 = 58 - IPPROTO_IDP = 22 - IPPROTO_IDPR = 35 - IPPROTO_IDRP = 45 - IPPROTO_IGMP = 2 - IPPROTO_IGP = 85 - IPPROTO_IGRP = 88 - IPPROTO_IL = 40 - IPPROTO_INLSP = 52 - IPPROTO_INP = 32 - IPPROTO_IP = 0 - IPPROTO_IPCOMP = 108 - IPPROTO_IPCV = 71 - IPPROTO_IPEIP = 94 - IPPROTO_IPIP = 4 - IPPROTO_IPPC = 67 - IPPROTO_IPV4 = 4 - IPPROTO_IPV6 = 41 - IPPROTO_IRTP = 28 - IPPROTO_KRYPTOLAN = 65 - IPPROTO_LARP = 91 - IPPROTO_LEAF1 = 25 - IPPROTO_LEAF2 = 26 - IPPROTO_MAX = 256 - IPPROTO_MAXID = 52 - IPPROTO_MEAS = 19 - IPPROTO_MHRP = 48 - IPPROTO_MICP = 95 - IPPROTO_MTP = 92 - IPPROTO_MUX = 18 - IPPROTO_ND = 77 - IPPROTO_NHRP = 54 - IPPROTO_NONE = 59 - IPPROTO_NSP = 31 - IPPROTO_NVPII = 11 - IPPROTO_OSPFIGP = 89 - IPPROTO_PGM = 113 - IPPROTO_PIGP = 9 - IPPROTO_PIM = 103 - IPPROTO_PRM = 21 - IPPROTO_PUP = 12 - IPPROTO_PVP = 75 - IPPROTO_RAW = 255 - IPPROTO_RCCMON = 10 - IPPROTO_RDP = 27 - IPPROTO_ROUTING = 43 - IPPROTO_RSVP = 46 - IPPROTO_RVD = 66 - IPPROTO_SATEXPAK = 64 - IPPROTO_SATMON = 69 - IPPROTO_SCCSP = 96 - IPPROTO_SCTP = 132 - IPPROTO_SDRP = 42 - IPPROTO_SEP = 33 - IPPROTO_SRPC = 90 - IPPROTO_ST = 7 - IPPROTO_SVMTP = 82 - IPPROTO_SWIPE = 53 - IPPROTO_TCF = 87 - IPPROTO_TCP = 6 - IPPROTO_TP = 29 - IPPROTO_TPXX = 39 - IPPROTO_TRUNK1 = 23 - IPPROTO_TRUNK2 = 24 - IPPROTO_TTP = 84 - IPPROTO_UDP = 17 - IPPROTO_VINES = 83 - IPPROTO_VISA = 70 - IPPROTO_VMTP = 81 - IPPROTO_WBEXPAK = 79 - IPPROTO_WBMON = 78 - IPPROTO_WSN = 74 - IPPROTO_XNET = 15 - IPPROTO_XTP = 36 - IPV6CTL_ACCEPT_RTADV = 12 - IPV6CTL_ADDRCTLPOLICY = 38 - IPV6CTL_AUTO_FLOWLABEL = 17 - IPV6CTL_AUTO_LINKLOCAL = 35 - IPV6CTL_DAD_COUNT = 16 - IPV6CTL_DEFHLIM = 3 - IPV6CTL_DEFMCASTHLIM = 18 - IPV6CTL_FORWARDING = 1 - IPV6CTL_FORWSRCRT = 5 - IPV6CTL_GIF_HLIM = 19 - IPV6CTL_HDRNESTLIMIT = 15 - IPV6CTL_KAME_VERSION = 20 - IPV6CTL_KEEPFAITH = 13 - IPV6CTL_LOG_INTERVAL = 14 - IPV6CTL_MAXDYNROUTES = 49 - IPV6CTL_MAXFRAGPACKETS = 9 - IPV6CTL_MAXFRAGS = 41 - IPV6CTL_MAXID = 51 - IPV6CTL_MAXIFDEFROUTERS = 48 - IPV6CTL_MAXIFPREFIXES = 47 - IPV6CTL_MCAST_PMTU = 44 - IPV6CTL_MRTPROTO = 8 - IPV6CTL_MRTSTATS = 7 - IPV6CTL_NEIGHBORGCTHRESH = 46 - IPV6CTL_PREFER_TEMPADDR = 37 - IPV6CTL_RIP6STATS = 36 - IPV6CTL_RR_PRUNE = 22 - IPV6CTL_RTEXPIRE = 25 - IPV6CTL_RTMAXCACHE = 27 - IPV6CTL_RTMINEXPIRE = 26 - IPV6CTL_SENDREDIRECTS = 2 - IPV6CTL_SOURCECHECK = 10 - IPV6CTL_SOURCECHECK_LOGINT = 11 - IPV6CTL_STATS = 6 - IPV6CTL_TEMPPLTIME = 33 - IPV6CTL_TEMPVLTIME = 34 - IPV6CTL_USETEMPADDR = 32 - IPV6CTL_USE_DEFAULTZONE = 39 - IPV6CTL_USE_DEPRECATED = 21 - IPV6CTL_V6ONLY = 24 - IPV6PORT_ANONMAX = 65535 - IPV6PORT_ANONMIN = 49152 - IPV6PORT_RESERVED = 1024 - IPV6PORT_RESERVEDMAX = 1023 - IPV6PORT_RESERVEDMIN = 600 - IPV6PROTO_MAXID = 104 - IPV6_2292DSTOPTS = 23 - IPV6_2292HOPLIMIT = 20 - IPV6_2292HOPOPTS = 22 - IPV6_2292NEXTHOP = 21 - IPV6_2292PKTINFO = 19 - IPV6_2292PKTOPTIONS = 25 - IPV6_2292RTHDR = 24 - IPV6_BINDV6ONLY = 27 - IPV6_BOUND_IF = 125 - IPV6_CHECKSUM = 26 - IPV6_DEFAULT_MULTICAST_HOPS = 1 - IPV6_DEFAULT_MULTICAST_LOOP = 1 - IPV6_FAITH = 29 - IPV6_FW_ADD = 30 - IPV6_FW_DEL = 31 - IPV6_FW_FLUSH = 32 - IPV6_FW_GET = 34 - IPV6_FW_ZERO = 33 - IPV6_IPSEC_POLICY = 28 - IPV6_JOIN_GROUP = 12 - IPV6_LEAVE_GROUP = 13 - IPV6_MAX_GROUP_SRC_FILTER = 512 - IPV6_MAX_MEMBERSHIPS = 4095 - IPV6_MAX_SOCK_SRC_FILTER = 128 - IPV6_MIN_MEMBERSHIPS = 31 - IPV6_MULTICAST_HOPS = 10 - IPV6_MULTICAST_IF = 9 - IPV6_MULTICAST_LOOP = 11 - IPV6_PORTRANGE = 14 - IPV6_PORTRANGE_DEFAULT = 0 - IPV6_PORTRANGE_HIGH = 1 - IPV6_PORTRANGE_LOW = 2 - IPV6_RECVTCLASS = 35 - IPV6_RTHDR_LOOSE = 0 - IPV6_RTHDR_STRICT = 1 - IPV6_RTHDR_TYPE_0 = 0 - IPV6_SOCKOPT_RESERVED1 = 3 - IPV6_TCLASS = 36 - IPV6_UNICAST_HOPS = 4 - IPV6_V6ONLY = 27 - IP_ADD_MEMBERSHIP = 12 - IP_ADD_SOURCE_MEMBERSHIP = 70 - IP_BLOCK_SOURCE = 72 - IP_BOUND_IF = 25 - IP_DEFAULT_MULTICAST_LOOP = 1 - IP_DEFAULT_MULTICAST_TTL = 1 - IP_DROP_MEMBERSHIP = 13 - IP_DROP_SOURCE_MEMBERSHIP = 71 - IP_DUMMYNET_CONFIGURE = 60 - IP_DUMMYNET_DEL = 61 - IP_DUMMYNET_FLUSH = 62 - IP_DUMMYNET_GET = 64 - IP_FAITH = 22 - IP_FW_ADD = 40 - IP_FW_DEL = 41 - IP_FW_FLUSH = 42 - IP_FW_GET = 44 - IP_FW_RESETLOG = 45 - IP_FW_ZERO = 43 - IP_HDRINCL = 2 - IP_IPSEC_POLICY = 21 - IP_MAX_GROUP_SRC_FILTER = 512 - IP_MAX_MEMBERSHIPS = 4095 - IP_MAX_SOCK_MUTE_FILTER = 128 - IP_MAX_SOCK_SRC_FILTER = 128 - IP_MIN_MEMBERSHIPS = 31 - IP_MSFILTER = 74 - IP_MULTICAST_IF = 9 - IP_MULTICAST_IFINDEX = 66 - IP_MULTICAST_LOOP = 11 - IP_MULTICAST_TTL = 10 - IP_MULTICAST_VIF = 14 - IP_NAT__XXX = 55 - IP_OLD_FW_ADD = 50 - IP_OLD_FW_DEL = 51 - IP_OLD_FW_FLUSH = 52 - IP_OLD_FW_GET = 54 - IP_OLD_FW_RESETLOG = 56 - IP_OLD_FW_ZERO = 53 - IP_OPTIONS = 1 - IP_PKTINFO = 26 - IP_PORTRANGE = 19 - IP_PORTRANGE_DEFAULT = 0 - IP_PORTRANGE_HIGH = 1 - IP_PORTRANGE_LOW = 2 - IP_RECVDSTADDR = 7 - IP_RECVIF = 20 - IP_RECVOPTS = 5 - IP_RECVPKTINFO = 26 - IP_RECVRETOPTS = 6 - IP_RECVTOS = 27 - IP_RECVTTL = 24 - IP_RETOPTS = 8 - IP_RSVP_OFF = 16 - IP_RSVP_ON = 15 - IP_RSVP_VIF_OFF = 18 - IP_RSVP_VIF_ON = 17 - IP_STRIPHDR = 23 - IP_TOS = 3 - IP_TRAFFIC_MGT_BACKGROUND = 65 - IP_TTL = 4 - IP_UNBLOCK_SOURCE = 73 - KEV_DL_ADDMULTI = 7 - KEV_DL_AWDL_RESTRICTED = 26 - KEV_DL_AWDL_UNRESTRICTED = 27 - KEV_DL_DELMULTI = 8 - KEV_DL_IFCAP_CHANGED = 19 - KEV_DL_IFDELEGATE_CHANGED = 25 - KEV_DL_IF_ATTACHED = 9 - KEV_DL_IF_DETACHED = 11 - KEV_DL_IF_DETACHING = 10 - KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 - KEV_DL_ISSUES = 24 - KEV_DL_LINK_ADDRESS_CHANGED = 16 - KEV_DL_LINK_OFF = 12 - KEV_DL_LINK_ON = 13 - KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 - KEV_DL_LOW_POWER_MODE_CHANGED = 30 - KEV_DL_MASTER_ELECTED = 23 - KEV_DL_NODE_ABSENCE = 22 - KEV_DL_NODE_PRESENCE = 21 - KEV_DL_PROTO_ATTACHED = 14 - KEV_DL_PROTO_DETACHED = 15 - KEV_DL_QOS_MODE_CHANGED = 29 - KEV_DL_RRC_STATE_CHANGED = 28 - KEV_DL_SIFFLAGS = 1 - KEV_DL_SIFGENERIC = 6 - KEV_DL_SIFMEDIA = 5 - KEV_DL_SIFMETRICS = 2 - KEV_DL_SIFMTU = 3 - KEV_DL_SIFPHYS = 4 - KEV_DL_SUBCLASS = 2 - KEV_DL_WAKEFLAGS_CHANGED = 17 - KEV_INET6_ADDR_DELETED = 3 - KEV_INET6_CHANGED_ADDR = 2 - KEV_INET6_DEFROUTER = 6 - KEV_INET6_NEW_LL_ADDR = 4 - KEV_INET6_NEW_RTADV_ADDR = 5 - KEV_INET6_NEW_USER_ADDR = 1 - KEV_INET6_REQUEST_NAT64_PREFIX = 7 - KEV_INET6_SUBCLASS = 6 - KEV_INET_ADDR_DELETED = 3 - KEV_INET_ARPCOLLISION = 7 - KEV_INET_ARPRTRALIVE = 10 - KEV_INET_ARPRTRFAILURE = 9 - KEV_INET_CHANGED_ADDR = 2 - KEV_INET_NEW_ADDR = 1 - KEV_INET_PORTINUSE = 8 - KEV_INET_SIFBRDADDR = 5 - KEV_INET_SIFDSTADDR = 4 - KEV_INET_SIFNETMASK = 6 - KEV_INET_SUBCLASS = 1 - LITTLE_ENDIAN = 1234 - MCAST_BLOCK_SOURCE = 84 - MCAST_EXCLUDE = 2 - MCAST_INCLUDE = 1 - MCAST_JOIN_GROUP = 80 - MCAST_JOIN_SOURCE_GROUP = 82 - MCAST_LEAVE_GROUP = 81 - MCAST_LEAVE_SOURCE_GROUP = 83 - MCAST_UNBLOCK_SOURCE = 85 - MCAST_UNDEFINED = 0 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - NBBY = 8 - NETDB_INTERNAL = -1 - NETDB_SUCCESS = 0 - NETSVC_MRKNG_LVL_L2 = 1 - NETSVC_MRKNG_LVL_L3L2_ALL = 2 - NETSVC_MRKNG_LVL_L3L2_BK = 3 - NETSVC_MRKNG_UNKNOWN = 0 - NET_MAXID = 40 - NET_RT_DUMP = 1 - NET_RT_DUMP2 = 7 - NET_RT_FLAGS = 2 - NET_RT_FLAGS_PRIV = 10 - NET_RT_IFLIST = 3 - NET_RT_IFLIST2 = 6 - NET_RT_MAXID = 11 - NET_RT_STAT = 4 - NET_RT_TRASH = 5 - NET_SERVICE_TYPE_AV = 6 - NET_SERVICE_TYPE_BE = 0 - NET_SERVICE_TYPE_BK = 1 - NET_SERVICE_TYPE_OAM = 7 - NET_SERVICE_TYPE_RD = 8 - NET_SERVICE_TYPE_RV = 5 - NET_SERVICE_TYPE_SIG = 2 - NET_SERVICE_TYPE_VI = 3 - NET_SERVICE_TYPE_VO = 4 - NI_DGRAM = 0x00000010 - NI_MAXHOST = 1025 - NI_MAXSERV = 32 - NI_NAMEREQD = 0x00000004 - NI_NOFQDN = 0x00000001 - NI_NUMERICHOST = 0x00000002 - NI_NUMERICSCOPE = 0x00000100 - NI_NUMERICSERV = 0x00000008 - NI_WITHSCOPEID = 0x00000020 - NO_ADDRESS = 4 - NO_DATA = 4 - NO_RECOVERY = 3 - PDP_ENDIAN = 3412 - PF_APPLETALK = 16 - PF_CCITT = 10 - PF_CHAOS = 5 - PF_CNT = 21 - PF_COIP = 20 - PF_DATAKIT = 9 - PF_DECnet = 12 - PF_DLI = 13 - PF_ECMA = 8 - PF_HYLINK = 15 - PF_IMPLINK = 3 - PF_INET = 2 - PF_INET6 = 30 - PF_IPX = 23 - PF_ISDN = 28 - PF_ISO = 7 - PF_KEY = 29 - PF_LAT = 14 - PF_LINK = 18 - PF_LOCAL = 1 - PF_MAX = 40 - PF_NATM = 31 - PF_NDRV = 27 - PF_NETBIOS = 33 - PF_NS = 6 - PF_OSI = 7 - PF_PIP = 25 - PF_PPP = 34 - PF_PUP = 4 - PF_RESERVED_36 = 36 - PF_ROUTE = 17 - PF_RTIP = 22 - PF_SIP = 24 - PF_SNA = 11 - PF_SYSTEM = 32 - PF_UNIX = 1 - PF_UNSPEC = 0 - PF_UTUN = 38 - PF_XTP = 19 - PTRDIFF_MAX = 9223372036854775807 - PTRDIFF_MIN = -9223372036854775808 - RSIZE_MAX = 9223372036854775807 - SAE_ASSOCID_ANY = 0 - SAE_CONNID_ANY = 0 - SCM_CREDS = 0x03 - SCM_RIGHTS = 0x01 - SCM_TIMESTAMP = 0x02 - SCM_TIMESTAMP_MONOTONIC = 0x04 - SCOPE_DELIMITER = 37 - SHUT_RD = 0 - SHUT_RDWR = 2 - SHUT_WR = 1 - SIG_ATOMIC_MAX = 2147483647 - SIG_ATOMIC_MIN = -2147483648 - SIN6_LEN = 0 - SIZE_MAX = 18446744073709551615 - SOCK_DGRAM = 2 - SOCK_MAXADDRLEN = 255 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_STREAM = 1 - SOL_SOCKET = 0xffff - SOMAXCONN = 128 - SONPX_SETOPTSHUT = 0x000000001 - SO_ACCEPTCONN = 0x0002 - SO_BROADCAST = 0x0020 - SO_DEBUG = 0x0001 - SO_DONTROUTE = 0x0010 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x0008 - SO_LABEL = 0x1010 - SO_LINGER = 0x0080 - SO_LINGER_SEC = 0x1080 - SO_NETSVC_MARKING_LEVEL = 0x1119 - SO_NET_SERVICE_TYPE = 0x1116 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x0100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x0004 - SO_REUSEPORT = 0x0200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x0400 - SO_TIMESTAMP_MONOTONIC = 0x0800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x0040 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - TRY_AGAIN = 2 - UINT16_MAX = 65535 - UINT32_MAX = 4294967295 - UINT64_MAX = 18446744073709551615 - UINT8_MAX = 255 - UINTMAX_MAX = 18446744073709551615 - UINTPTR_MAX = 18446744073709551615 - UINT_FAST16_MAX = 65535 - UINT_FAST32_MAX = 4294967295 - UINT_FAST64_MAX = 18446744073709551615 - UINT_FAST8_MAX = 255 - UINT_LEAST16_MAX = 65535 - UINT_LEAST32_MAX = 4294967295 - UINT_LEAST64_MAX = 18446744073709551615 - UINT_LEAST8_MAX = 255 - WCHAR_MAX = 2147483647 - WCHAR_MIN = -2147483648 - WINT_MAX = 2147483647 - WINT_MIN = -2147483648 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_I386__PARAM_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NETDB_H_ = 0 - X_NETINET6_IN6_H_ = 0 - X_NETINET_IN_H_ = 0 - X_NET_NETKEV_H_ = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PATH_HEQUIV = "/etc/hosts.equiv" - X_PATH_HOSTS = "/etc/hosts" - X_PATH_NETWORKS = "/etc/networks" - X_PATH_PROTOCOLS = "/etc/protocols" - X_PATH_SERVICES = "/etc/services" - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SA_FAMILY_T = 0 - X_SIZE_T = 0 - X_SOCKLEN_T = 0 - X_SSIZE_T = 0 - X_SS_MAXSIZE = 128 - X_STRUCT_IOVEC = 0 - X_SUSECONDS_T = 0 - X_SYS_SOCKET_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 - Pseudo_AF_HDRCMPLT = 35 - Pseudo_AF_KEY = 29 - Pseudo_AF_PIP = 25 - Pseudo_AF_RTIP = 22 - Pseudo_AF_XTP = 19 + AF_APPLETALK = 16 // socket.h:375:1: + AF_CCITT = 10 // socket.h:369:1: + AF_CHAOS = 5 // socket.h:363:1: + AF_CNT = 21 // socket.h:380:1: + AF_COIP = 20 // socket.h:379:1: + AF_DATAKIT = 9 // socket.h:368:1: + AF_DECnet = 12 // socket.h:371:1: + AF_DLI = 13 // socket.h:372:1: + AF_E164 = 28 // socket.h:387:1: + AF_ECMA = 8 // socket.h:367:1: + AF_HYLINK = 15 // socket.h:374:1: + AF_IEEE80211 = 37 // socket.h:399:1: + AF_IMPLINK = 3 // socket.h:361:1: + AF_INET = 2 // socket.h:359:1: + AF_INET6 = 30 // socket.h:390:1: + AF_IPX = 23 // socket.h:382:1: + AF_ISDN = 28 // socket.h:386:1: + AF_ISO = 7 // socket.h:365:1: + AF_LAT = 14 // socket.h:373:1: + AF_LINK = 18 // socket.h:377:1: + AF_LOCAL = 1 // socket.h:357:1: + AF_MAX = 40 // socket.h:401:1: + AF_NATM = 31 // socket.h:392:1: + AF_NDRV = 27 // socket.h:385:1: + AF_NETBIOS = 33 // socket.h:394:1: + AF_NS = 6 // socket.h:364:1: + AF_OSI = 7 // socket.h:366:1: + AF_PPP = 34 // socket.h:395:1: + AF_PUP = 4 // socket.h:362:1: + AF_RESERVED_36 = 36 // socket.h:398:1: + AF_ROUTE = 17 // socket.h:376:1: + AF_SIP = 24 // socket.h:383:1: + AF_SNA = 11 // socket.h:370:1: + AF_SYSTEM = 32 // socket.h:393:1: + AF_UNIX = 1 // socket.h:355:1: + AF_UNSPEC = 0 // socket.h:354:1: + AF_UTUN = 38 // socket.h:400:1: + AI_ADDRCONFIG = 0x00000400 // netdb.h:226:1: + AI_ALL = 0x00000100 // netdb.h:222:1: + AI_CANONNAME = 0x00000002 // netdb.h:212:1: + AI_DEFAULT = 1536 // netdb.h:230:1: + AI_MASK = 5127 // netdb.h:217:1: + AI_NUMERICHOST = 0x00000004 // netdb.h:213:1: + AI_NUMERICSERV = 0x00001000 // netdb.h:214:1: + AI_PASSIVE = 0x00000001 // netdb.h:211:1: + AI_UNUSABLE = 0x10000000 // netdb.h:234:1: + AI_V4MAPPED = 0x00000800 // netdb.h:227:1: + AI_V4MAPPED_CFG = 0x00000200 // netdb.h:224:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CONNECT_DATA_AUTHENTICATED = 0x4 // socket.h:300:1: + CONNECT_DATA_IDEMPOTENT = 0x2 // socket.h:299:1: + CONNECT_RESUME_ON_READ_WRITE = 0x1 // socket.h:298:1: + EAI_ADDRFAMILY = 1 // netdb.h:185:1: + EAI_AGAIN = 2 // netdb.h:187:1: + EAI_BADFLAGS = 3 // netdb.h:188:1: + EAI_BADHINTS = 12 // netdb.h:200:1: + EAI_FAIL = 4 // netdb.h:189:1: + EAI_FAMILY = 5 // netdb.h:190:1: + EAI_MAX = 15 // netdb.h:205:1: + EAI_MEMORY = 6 // netdb.h:191:1: + EAI_NODATA = 7 // netdb.h:193:1: + EAI_NONAME = 8 // netdb.h:195:1: + EAI_OVERFLOW = 14 // netdb.h:203:1: + EAI_PROTOCOL = 13 // netdb.h:201:1: + EAI_SERVICE = 9 // netdb.h:196:1: + EAI_SOCKTYPE = 10 // netdb.h:197:1: + EAI_SYSTEM = 11 // netdb.h:198:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + HOST_NOT_FOUND = 1 // netdb.h:174:1: + ICMP6_FILTER = 18 // in6.h:380:1: + ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 // in6.h:615:1: + INADDR_NONE = 0xffffffff // in.h:342:1: + INET6_ADDRSTRLEN = 46 // in6.h:161:1: + INET_ADDRSTRLEN = 16 // in.h:388:1: + INT16_MAX = 32767 // stdint.h:599:1: + INT16_MIN = -32768 // stdint.h:600:1: + INT32_MAX = 2147483647 // stdint.h:555:1: + INT32_MIN = -2147483648 // stdint.h:556:1: + INT64_MAX = 9223372036854775807 // stdint.h:461:1: + INT64_MIN = -9223372036854775808 // stdint.h:462:1: + INT8_MAX = 127 // stdint.h:621:1: + INT8_MIN = -128 // stdint.h:622:1: + INTMAX_MAX = 9223372036854775807 // stdint.h:663:1: + INTMAX_MIN = -9223372036854775808 // stdint.h:662:1: + INTPTR_MAX = 9223372036854775807 // stdint.h:649:1: + INTPTR_MIN = -9223372036854775808 // stdint.h:648:1: + INT_FAST16_MAX = 32767 // stdint.h:615:1: + INT_FAST16_MIN = -32768 // stdint.h:614:1: + INT_FAST32_MAX = 2147483647 // stdint.h:574:1: + INT_FAST32_MIN = -2147483648 // stdint.h:573:1: + INT_FAST64_MAX = 9223372036854775807 // stdint.h:483:1: + INT_FAST64_MIN = -9223372036854775808 // stdint.h:482:1: + INT_FAST8_MAX = 127 // stdint.h:634:1: + INT_FAST8_MIN = -128 // stdint.h:633:1: + INT_LEAST16_MAX = 32767 // stdint.h:612:1: + INT_LEAST16_MIN = -32768 // stdint.h:611:1: + INT_LEAST32_MAX = 2147483647 // stdint.h:571:1: + INT_LEAST32_MIN = -2147483648 // stdint.h:570:1: + INT_LEAST64_MAX = 9223372036854775807 // stdint.h:480:1: + INT_LEAST64_MIN = -9223372036854775808 // stdint.h:479:1: + INT_LEAST8_MAX = 127 // stdint.h:631:1: + INT_LEAST8_MIN = -128 // stdint.h:630:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:317:1: + IN_CLASSA_MAX = 128 // in.h:318:1: + IN_CLASSA_NET = 0xff000000 // in.h:315:1: + IN_CLASSA_NSHIFT = 24 // in.h:316:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:323:1: + IN_CLASSB_MAX = 65536 // in.h:324:1: + IN_CLASSB_NET = 0xffff0000 // in.h:321:1: + IN_CLASSB_NSHIFT = 16 // in.h:322:1: + IN_CLASSC_HOST = 0x000000ff // in.h:329:1: + IN_CLASSC_NET = 0xffffff00 // in.h:327:1: + IN_CLASSC_NSHIFT = 8 // in.h:328:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:334:1: + IN_CLASSD_NET = 0xf0000000 // in.h:332:1: + IN_CLASSD_NSHIFT = 28 // in.h:333:1: + IN_LOOPBACKNET = 127 // in.h:369:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:649:1: + IPCTL_DEFTTL = 3 // in.h:637:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:645:1: + IPCTL_FASTFORWARDING = 14 // in.h:650:1: + IPCTL_FORWARDING = 1 // in.h:635:1: + IPCTL_GIF_TTL = 16 // in.h:652:1: + IPCTL_INTRQDROPS = 11 // in.h:647:1: + IPCTL_INTRQMAXLEN = 10 // in.h:646:1: + IPCTL_KEEPFAITH = 15 // in.h:651:1: + IPCTL_MAXID = 17 // in.h:653:1: + IPCTL_RTEXPIRE = 5 // in.h:641:1: + IPCTL_RTMAXCACHE = 7 // in.h:643:1: + IPCTL_RTMINEXPIRE = 6 // in.h:642:1: + IPCTL_SENDREDIRECTS = 2 // in.h:636:1: + IPCTL_SOURCEROUTE = 8 // in.h:644:1: + IPCTL_STATS = 12 // in.h:648:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:286:1: + IPPORT_HILASTAUTO = 65535 // in.h:287:1: + IPPORT_RESERVED = 1024 // in.h:279:1: + IPPORT_RESERVEDSTART = 600 // in.h:295:1: + IPPORT_USERRESERVED = 5000 // in.h:281:1: + IPPROTO_3PC = 34 // in.h:139:1: + IPPROTO_ADFS = 68 // in.h:173:1: + IPPROTO_AH = 51 // in.h:158:1: + IPPROTO_AHIP = 61 // in.h:166:1: + IPPROTO_APES = 99 // in.h:204:1: + IPPROTO_ARGUS = 13 // in.h:116:1: + IPPROTO_AX25 = 93 // in.h:198:1: + IPPROTO_BHA = 49 // in.h:156:1: + IPPROTO_BLT = 30 // in.h:135:1: + IPPROTO_BRSATMON = 76 // in.h:181:1: + IPPROTO_CFTP = 62 // in.h:167:1: + IPPROTO_CHAOS = 16 // in.h:119:1: + IPPROTO_CMTP = 38 // in.h:143:1: + IPPROTO_CPHB = 73 // in.h:178:1: + IPPROTO_CPNX = 72 // in.h:177:1: + IPPROTO_DDP = 37 // in.h:142:1: + IPPROTO_DGP = 86 // in.h:191:1: + IPPROTO_DIVERT = 254 // in.h:213:1: + IPPROTO_DONE = 257 // in.h:221:1: + IPPROTO_DSTOPTS = 60 // in.h:165:1: + IPPROTO_EGP = 8 // in.h:111:1: + IPPROTO_EMCON = 14 // in.h:117:1: + IPPROTO_ENCAP = 98 // in.h:203:1: + IPPROTO_EON = 80 // in.h:185:1: + IPPROTO_ESP = 50 // in.h:157:1: + IPPROTO_ETHERIP = 97 // in.h:202:1: + IPPROTO_FRAGMENT = 44 // in.h:151:1: + IPPROTO_GGP = 3 // in.h:104:1: + IPPROTO_GMTP = 100 // in.h:205:1: + IPPROTO_GRE = 47 // in.h:154:1: + IPPROTO_HELLO = 63 // in.h:168:1: + IPPROTO_HMP = 20 // in.h:125:1: + IPPROTO_HOPOPTS = 0 // in.h:99:1: + IPPROTO_ICMP = 1 // in.h:101:1: + IPPROTO_ICMPV6 = 58 // in.h:163:1: + IPPROTO_IDP = 22 // in.h:127:1: + IPPROTO_IDPR = 35 // in.h:140:1: + IPPROTO_IDRP = 45 // in.h:152:1: + IPPROTO_IGMP = 2 // in.h:103:1: + IPPROTO_IGP = 85 // in.h:190:1: + IPPROTO_IGRP = 88 // in.h:193:1: + IPPROTO_IL = 40 // in.h:145:1: + IPPROTO_INLSP = 52 // in.h:159:1: + IPPROTO_INP = 32 // in.h:137:1: + IPPROTO_IP = 0 // in.h:97:1: + IPPROTO_IPCOMP = 108 // in.h:208:1: + IPPROTO_IPCV = 71 // in.h:176:1: + IPPROTO_IPEIP = 94 // in.h:199:1: + IPPROTO_IPIP = 4 // in.h:106:1: + IPPROTO_IPPC = 67 // in.h:172:1: + IPPROTO_IPV4 = 4 // in.h:105:1: + IPPROTO_IPV6 = 41 // in.h:147:1: + IPPROTO_IRTP = 28 // in.h:133:1: + IPPROTO_KRYPTOLAN = 65 // in.h:170:1: + IPPROTO_LARP = 91 // in.h:196:1: + IPPROTO_LEAF1 = 25 // in.h:130:1: + IPPROTO_LEAF2 = 26 // in.h:131:1: + IPPROTO_MAX = 256 // in.h:218:1: + IPPROTO_MAXID = 52 // in.h:629:1: + IPPROTO_MEAS = 19 // in.h:124:1: + IPPROTO_MHRP = 48 // in.h:155:1: + IPPROTO_MICP = 95 // in.h:200:1: + IPPROTO_MTP = 92 // in.h:197:1: + IPPROTO_MUX = 18 // in.h:123:1: + IPPROTO_ND = 77 // in.h:182:1: + IPPROTO_NHRP = 54 // in.h:161:1: + IPPROTO_NONE = 59 // in.h:164:1: + IPPROTO_NSP = 31 // in.h:136:1: + IPPROTO_NVPII = 11 // in.h:114:1: + IPPROTO_OSPFIGP = 89 // in.h:194:1: + IPPROTO_PGM = 113 // in.h:209:1: + IPPROTO_PIGP = 9 // in.h:112:1: + IPPROTO_PIM = 103 // in.h:207:1: + IPPROTO_PRM = 21 // in.h:126:1: + IPPROTO_PUP = 12 // in.h:115:1: + IPPROTO_PVP = 75 // in.h:180:1: + IPPROTO_RAW = 255 // in.h:215:1: + IPPROTO_RCCMON = 10 // in.h:113:1: + IPPROTO_RDP = 27 // in.h:132:1: + IPPROTO_ROUTING = 43 // in.h:150:1: + IPPROTO_RSVP = 46 // in.h:153:1: + IPPROTO_RVD = 66 // in.h:171:1: + IPPROTO_SATEXPAK = 64 // in.h:169:1: + IPPROTO_SATMON = 69 // in.h:174:1: + IPPROTO_SCCSP = 96 // in.h:201:1: + IPPROTO_SCTP = 132 // in.h:210:1: + IPPROTO_SDRP = 42 // in.h:149:1: + IPPROTO_SEP = 33 // in.h:138:1: + IPPROTO_SRPC = 90 // in.h:195:1: + IPPROTO_ST = 7 // in.h:110:1: + IPPROTO_SVMTP = 82 // in.h:187:1: + IPPROTO_SWIPE = 53 // in.h:160:1: + IPPROTO_TCF = 87 // in.h:192:1: + IPPROTO_TCP = 6 // in.h:108:1: + IPPROTO_TP = 29 // in.h:134:1: + IPPROTO_TPXX = 39 // in.h:144:1: + IPPROTO_TRUNK1 = 23 // in.h:128:1: + IPPROTO_TRUNK2 = 24 // in.h:129:1: + IPPROTO_TTP = 84 // in.h:189:1: + IPPROTO_UDP = 17 // in.h:121:1: + IPPROTO_VINES = 83 // in.h:188:1: + IPPROTO_VISA = 70 // in.h:175:1: + IPPROTO_VMTP = 81 // in.h:186:1: + IPPROTO_WBEXPAK = 79 // in.h:184:1: + IPPROTO_WBMON = 78 // in.h:183:1: + IPPROTO_WSN = 74 // in.h:179:1: + IPPROTO_XNET = 15 // in.h:118:1: + IPPROTO_XTP = 36 // in.h:141:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:580:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:605:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:585:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:602:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:584:1: + IPV6CTL_DEFHLIM = 3 // in6.h:569:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:586:1: + IPV6CTL_FORWARDING = 1 // in6.h:567:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:573:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:587:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:583:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:588:1: + IPV6CTL_KEEPFAITH = 13 // in6.h:581:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:582:1: + IPV6CTL_MAXDYNROUTES = 49 // in6.h:614:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:577:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:608:1: + IPV6CTL_MAXID = 51 // in6.h:619:1: + IPV6CTL_MAXIFDEFROUTERS = 48 // in6.h:613:1: + IPV6CTL_MAXIFPREFIXES = 47 // in6.h:612:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:609:1: + IPV6CTL_MRTPROTO = 8 // in6.h:576:1: + IPV6CTL_MRTSTATS = 7 // in6.h:575:1: + IPV6CTL_NEIGHBORGCTHRESH = 46 // in6.h:611:1: + IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:604:1: + IPV6CTL_RIP6STATS = 36 // in6.h:603:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:590:1: + IPV6CTL_RTEXPIRE = 25 // in6.h:595:1: + IPV6CTL_RTMAXCACHE = 27 // in6.h:597:1: + IPV6CTL_RTMINEXPIRE = 26 // in6.h:596:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:568:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:578:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:579:1: + IPV6CTL_STATS = 6 // in6.h:574:1: + IPV6CTL_TEMPPLTIME = 33 // in6.h:600:1: + IPV6CTL_TEMPVLTIME = 34 // in6.h:601:1: + IPV6CTL_USETEMPADDR = 32 // in6.h:599:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:606:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:589:1: + IPV6CTL_V6ONLY = 24 // in6.h:594:1: + IPV6PORT_ANONMAX = 65535 // in6.h:143:1: + IPV6PORT_ANONMIN = 49152 // in6.h:142:1: + IPV6PORT_RESERVED = 1024 // in6.h:141:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:145:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:144:1: + IPV6PROTO_MAXID = 104 // in6.h:562:1: + IPV6_2292DSTOPTS = 23 // in6.h:385:1: + IPV6_2292HOPLIMIT = 20 // in6.h:382:1: + IPV6_2292HOPOPTS = 22 // in6.h:384:1: + IPV6_2292NEXTHOP = 21 // in6.h:383:1: + IPV6_2292PKTINFO = 19 // in6.h:381:1: + IPV6_2292PKTOPTIONS = 25 // in6.h:389:1: + IPV6_2292RTHDR = 24 // in6.h:386:1: + IPV6_BINDV6ONLY = 27 // in6.h:405:1: + IPV6_BOUND_IF = 125 // in6.h:494:1: + IPV6_CHECKSUM = 26 // in6.h:401:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:506:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:507:1: + IPV6_FAITH = 29 // in6.h:411:1: + IPV6_FW_ADD = 30 // in6.h:414:1: + IPV6_FW_DEL = 31 // in6.h:415:1: + IPV6_FW_FLUSH = 32 // in6.h:416:1: + IPV6_FW_GET = 34 // in6.h:418:1: + IPV6_FW_ZERO = 33 // in6.h:417:1: + IPV6_IPSEC_POLICY = 28 // in6.h:409:1: + IPV6_JOIN_GROUP = 12 // in6.h:375:1: + IPV6_LEAVE_GROUP = 13 // in6.h:376:1: + IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:521:1: + IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:515:1: + IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:522:1: + IPV6_MIN_MEMBERSHIPS = 31 // in6.h:514:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:373:1: + IPV6_MULTICAST_IF = 9 // in6.h:372:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:374:1: + IPV6_PORTRANGE = 14 // in6.h:379:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:552:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:553:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:554:1: + IPV6_RECVTCLASS = 35 // in6.h:426:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:499:1: + IPV6_RTHDR_STRICT = 1 // in6.h:500:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:501:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:369:1: + IPV6_TCLASS = 36 // in6.h:427:1: + IPV6_UNICAST_HOPS = 4 // in6.h:371:1: + IPV6_V6ONLY = 27 // in6.h:403:1: + IP_ADD_MEMBERSHIP = 12 // in.h:418:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:464:1: + IP_BLOCK_SOURCE = 72 // in.h:466:1: + IP_BOUND_IF = 25 // in.h:434:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:485:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:484:1: + IP_DROP_MEMBERSHIP = 13 // in.h:419:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:455:1: + IP_DUMMYNET_DEL = 61 // in.h:456:1: + IP_DUMMYNET_FLUSH = 62 // in.h:457:1: + IP_DUMMYNET_GET = 64 // in.h:458:1: + IP_FAITH = 22 // in.h:429:1: + IP_FW_ADD = 40 // in.h:439:1: + IP_FW_DEL = 41 // in.h:440:1: + IP_FW_FLUSH = 42 // in.h:441:1: + IP_FW_GET = 44 // in.h:443:1: + IP_FW_RESETLOG = 45 // in.h:444:1: + IP_FW_ZERO = 43 // in.h:442:1: + IP_HDRINCL = 2 // in.h:408:1: + IP_IPSEC_POLICY = 21 // in.h:428:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:499:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:493:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:501:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:500:1: + IP_MIN_MEMBERSHIPS = 31 // in.h:492:1: + IP_MSFILTER = 74 // in.h:470:1: + IP_MULTICAST_IF = 9 // in.h:415:1: + IP_MULTICAST_IFINDEX = 66 // in.h:461:1: + IP_MULTICAST_LOOP = 11 // in.h:417:1: + IP_MULTICAST_TTL = 10 // in.h:416:1: + IP_MULTICAST_VIF = 14 // in.h:420:1: + IP_NAT__XXX = 55 // in.h:452:1: + IP_OLD_FW_ADD = 50 // in.h:447:1: + IP_OLD_FW_DEL = 51 // in.h:448:1: + IP_OLD_FW_FLUSH = 52 // in.h:449:1: + IP_OLD_FW_GET = 54 // in.h:451:1: + IP_OLD_FW_RESETLOG = 56 // in.h:453:1: + IP_OLD_FW_ZERO = 53 // in.h:450:1: + IP_OPTIONS = 1 // in.h:407:1: + IP_PKTINFO = 26 // in.h:435:1: + IP_PORTRANGE = 19 // in.h:425:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:593:1: + IP_PORTRANGE_HIGH = 1 // in.h:594:1: + IP_PORTRANGE_LOW = 2 // in.h:595:1: + IP_RECVDSTADDR = 7 // in.h:413:1: + IP_RECVIF = 20 // in.h:426:1: + IP_RECVOPTS = 5 // in.h:411:1: + IP_RECVPKTINFO = 26 // in.h:436:1: + IP_RECVRETOPTS = 6 // in.h:412:1: + IP_RECVTOS = 27 // in.h:437:1: + IP_RECVTTL = 24 // in.h:433:1: + IP_RETOPTS = 8 // in.h:414:1: + IP_RSVP_OFF = 16 // in.h:422:1: + IP_RSVP_ON = 15 // in.h:421:1: + IP_RSVP_VIF_OFF = 18 // in.h:424:1: + IP_RSVP_VIF_ON = 17 // in.h:423:1: + IP_STRIPHDR = 23 // in.h:431:1: + IP_TOS = 3 // in.h:409:1: + IP_TRAFFIC_MGT_BACKGROUND = 65 // in.h:460:1: + IP_TTL = 4 // in.h:410:1: + IP_UNBLOCK_SOURCE = 73 // in.h:467:1: + KEV_DL_ADDMULTI = 7 // net_kev.h:61:1: + KEV_DL_AWDL_RESTRICTED = 26 // net_kev.h:80:1: + KEV_DL_AWDL_UNRESTRICTED = 27 // net_kev.h:81:1: + KEV_DL_DELMULTI = 8 // net_kev.h:62:1: + KEV_DL_IFCAP_CHANGED = 19 // net_kev.h:73:1: + KEV_DL_IFDELEGATE_CHANGED = 25 // net_kev.h:79:1: + KEV_DL_IF_ATTACHED = 9 // net_kev.h:63:1: + KEV_DL_IF_DETACHED = 11 // net_kev.h:65:1: + KEV_DL_IF_DETACHING = 10 // net_kev.h:64:1: + KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 // net_kev.h:72:1: + KEV_DL_ISSUES = 24 // net_kev.h:78:1: + KEV_DL_LINK_ADDRESS_CHANGED = 16 // net_kev.h:70:1: + KEV_DL_LINK_OFF = 12 // net_kev.h:66:1: + KEV_DL_LINK_ON = 13 // net_kev.h:67:1: + KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 // net_kev.h:74:1: + KEV_DL_LOW_POWER_MODE_CHANGED = 30 // net_kev.h:84:1: + KEV_DL_MASTER_ELECTED = 23 // net_kev.h:77:1: + KEV_DL_NODE_ABSENCE = 22 // net_kev.h:76:1: + KEV_DL_NODE_PRESENCE = 21 // net_kev.h:75:1: + KEV_DL_PROTO_ATTACHED = 14 // net_kev.h:68:1: + KEV_DL_PROTO_DETACHED = 15 // net_kev.h:69:1: + KEV_DL_QOS_MODE_CHANGED = 29 // net_kev.h:83:1: + KEV_DL_RRC_STATE_CHANGED = 28 // net_kev.h:82:1: + KEV_DL_SIFFLAGS = 1 // net_kev.h:55:1: + KEV_DL_SIFGENERIC = 6 // net_kev.h:60:1: + KEV_DL_SIFMEDIA = 5 // net_kev.h:59:1: + KEV_DL_SIFMETRICS = 2 // net_kev.h:56:1: + KEV_DL_SIFMTU = 3 // net_kev.h:57:1: + KEV_DL_SIFPHYS = 4 // net_kev.h:58:1: + KEV_DL_SUBCLASS = 2 // net_kev.h:50:1: + KEV_DL_WAKEFLAGS_CHANGED = 17 // net_kev.h:71:1: + KEV_INET6_ADDR_DELETED = 3 // net_kev.h:91:1: + KEV_INET6_CHANGED_ADDR = 2 // net_kev.h:90:1: + KEV_INET6_DEFROUTER = 6 // net_kev.h:94:1: + KEV_INET6_NEW_LL_ADDR = 4 // net_kev.h:92:1: + KEV_INET6_NEW_RTADV_ADDR = 5 // net_kev.h:93:1: + KEV_INET6_NEW_USER_ADDR = 1 // net_kev.h:89:1: + KEV_INET6_REQUEST_NAT64_PREFIX = 7 // net_kev.h:95:1: + KEV_INET6_SUBCLASS = 6 // net_kev.h:87:1: + KEV_INET_ADDR_DELETED = 3 // net_kev.h:39:1: + KEV_INET_ARPCOLLISION = 7 // net_kev.h:43:1: + KEV_INET_ARPRTRALIVE = 10 // net_kev.h:48:1: + KEV_INET_ARPRTRFAILURE = 9 // net_kev.h:47:1: + KEV_INET_CHANGED_ADDR = 2 // net_kev.h:38:1: + KEV_INET_NEW_ADDR = 1 // net_kev.h:37:1: + KEV_INET_PORTINUSE = 8 // net_kev.h:45:1: + KEV_INET_SIFBRDADDR = 5 // net_kev.h:41:1: + KEV_INET_SIFDSTADDR = 4 // net_kev.h:40:1: + KEV_INET_SIFNETMASK = 6 // net_kev.h:42:1: + KEV_INET_SUBCLASS = 1 // net_kev.h:35:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MCAST_BLOCK_SOURCE = 84 // in.h:477:1: + MCAST_EXCLUDE = 2 // in.h:587:1: + MCAST_INCLUDE = 1 // in.h:586:1: + MCAST_JOIN_GROUP = 80 // in.h:473:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:475:1: + MCAST_LEAVE_GROUP = 81 // in.h:474:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:476:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:478:1: + MCAST_UNDEFINED = 0 // in.h:585:1: + MSG_CTRUNC = 0x20 // socket.h:563:1: + MSG_DONTROUTE = 0x4 // socket.h:560:1: + MSG_DONTWAIT = 0x80 // socket.h:566:1: + MSG_EOF = 0x100 // socket.h:567:1: + MSG_EOR = 0x8 // socket.h:561:1: + MSG_FLUSH = 0x400 // socket.h:572:1: + MSG_HAVEMORE = 0x2000 // socket.h:575:1: + MSG_HOLD = 0x800 // socket.h:573:1: + MSG_NEEDSA = 0x10000 // socket.h:578:1: + MSG_OOB = 0x1 // socket.h:558:1: + MSG_PEEK = 0x2 // socket.h:559:1: + MSG_RCVMORE = 0x4000 // socket.h:576:1: + MSG_SEND = 0x1000 // socket.h:574:1: + MSG_TRUNC = 0x10 // socket.h:562:1: + MSG_WAITALL = 0x40 // socket.h:564:1: + MSG_WAITSTREAM = 0x200 // socket.h:570:1: + NBBY = 8 // types.h:186:1: + NETDB_INTERNAL = -1 // netdb.h:171:1: + NETDB_SUCCESS = 0 // netdb.h:172:1: + NETSVC_MRKNG_LVL_L2 = 1 // socket.h:283:1: + NETSVC_MRKNG_LVL_L3L2_ALL = 2 // socket.h:284:1: + NETSVC_MRKNG_LVL_L3L2_BK = 3 // socket.h:285:1: + NETSVC_MRKNG_UNKNOWN = 0 // socket.h:282:1: + NET_MAXID = 40 // socket.h:506:1: + NET_RT_DUMP = 1 // socket.h:519:1: + NET_RT_DUMP2 = 7 // socket.h:525:1: + NET_RT_FLAGS = 2 // socket.h:520:1: + NET_RT_FLAGS_PRIV = 10 // socket.h:530:1: + NET_RT_IFLIST = 3 // socket.h:521:1: + NET_RT_IFLIST2 = 6 // socket.h:524:1: + NET_RT_MAXID = 11 // socket.h:531:1: + NET_RT_STAT = 4 // socket.h:522:1: + NET_RT_TRASH = 5 // socket.h:523:1: + NET_SERVICE_TYPE_AV = 6 // socket.h:276:1: + NET_SERVICE_TYPE_BE = 0 // socket.h:270:1: + NET_SERVICE_TYPE_BK = 1 // socket.h:271:1: + NET_SERVICE_TYPE_OAM = 7 // socket.h:277:1: + NET_SERVICE_TYPE_RD = 8 // socket.h:278:1: + NET_SERVICE_TYPE_RV = 5 // socket.h:275:1: + NET_SERVICE_TYPE_SIG = 2 // socket.h:272:1: + NET_SERVICE_TYPE_VI = 3 // socket.h:273:1: + NET_SERVICE_TYPE_VO = 4 // socket.h:274:1: + NI_DGRAM = 0x00000010 // netdb.h:252:1: + NI_MAXHOST = 1025 // netdb.h:241:1: + NI_MAXSERV = 32 // netdb.h:242:1: + NI_NAMEREQD = 0x00000004 // netdb.h:249:1: + NI_NOFQDN = 0x00000001 // netdb.h:247:1: + NI_NUMERICHOST = 0x00000002 // netdb.h:248:1: + NI_NUMERICSCOPE = 0x00000100 // netdb.h:251:1: + NI_NUMERICSERV = 0x00000008 // netdb.h:250:1: + NI_WITHSCOPEID = 0x00000020 // netdb.h:254:1: + NO_ADDRESS = 4 // netdb.h:179:1: + NO_DATA = 4 // netdb.h:177:1: + NO_RECOVERY = 3 // netdb.h:176:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + PF_APPLETALK = 16 // socket.h:469:1: + PF_CCITT = 10 // socket.h:463:1: + PF_CHAOS = 5 // socket.h:457:1: + PF_CNT = 21 // socket.h:474:1: + PF_COIP = 20 // socket.h:473:1: + PF_DATAKIT = 9 // socket.h:462:1: + PF_DECnet = 12 // socket.h:465:1: + PF_DLI = 13 // socket.h:466:1: + PF_ECMA = 8 // socket.h:461:1: + PF_HYLINK = 15 // socket.h:468:1: + PF_IMPLINK = 3 // socket.h:455:1: + PF_INET = 2 // socket.h:454:1: + PF_INET6 = 30 // socket.h:482:1: + PF_IPX = 23 // socket.h:476:1: + PF_ISDN = 28 // socket.h:480:1: + PF_ISO = 7 // socket.h:459:1: + PF_KEY = 29 // socket.h:481:1: + PF_LAT = 14 // socket.h:467:1: + PF_LINK = 18 // socket.h:471:1: + PF_LOCAL = 1 // socket.h:452:1: + PF_MAX = 40 // socket.h:489:1: + PF_NATM = 31 // socket.h:483:1: + PF_NDRV = 27 // socket.h:479:1: + PF_NETBIOS = 33 // socket.h:485:1: + PF_NS = 6 // socket.h:458:1: + PF_OSI = 7 // socket.h:460:1: + PF_PIP = 25 // socket.h:478:1: + PF_PPP = 34 // socket.h:486:1: + PF_PUP = 4 // socket.h:456:1: + PF_RESERVED_36 = 36 // socket.h:487:1: + PF_ROUTE = 17 // socket.h:470:1: + PF_RTIP = 22 // socket.h:477:1: + PF_SIP = 24 // socket.h:475:1: + PF_SNA = 11 // socket.h:464:1: + PF_SYSTEM = 32 // socket.h:484:1: + PF_UNIX = 1 // socket.h:453:1: + PF_UNSPEC = 0 // socket.h:451:1: + PF_UTUN = 38 // socket.h:488:1: + PF_XTP = 19 // socket.h:472:1: + PTRDIFF_MAX = 9223372036854775807 // stdint.h:652:1: + PTRDIFF_MIN = -9223372036854775808 // stdint.h:651:1: + RSIZE_MAX = 9223372036854775807 // stdint.h:658:1: + SAE_ASSOCID_ANY = 0 // socket.h:290:1: + SAE_CONNID_ANY = 0 // socket.h:294:1: + SCM_CREDS = 0x03 // socket.h:661:1: + SCM_RIGHTS = 0x01 // socket.h:658:1: + SCM_TIMESTAMP = 0x02 // socket.h:660:1: + SCM_TIMESTAMP_MONOTONIC = 0x04 // socket.h:662:1: + SCOPE_DELIMITER = 37 // netdb.h:259:1: + SHUT_RD = 0 // socket.h:670:1: + SHUT_RDWR = 2 // socket.h:672:1: + SHUT_WR = 1 // socket.h:671:1: + SIG_ATOMIC_MAX = 2147483647 // stdint.h:668:1: + SIG_ATOMIC_MIN = -2147483648 // stdint.h:667:1: + SIN6_LEN = 0 // in6.h:167:1: + SIZE_MAX = 18446744073709551615 // stdint.h:653:1: + SOCK_DGRAM = 2 // socket.h:112:1: + SOCK_MAXADDRLEN = 255 // socket.h:414:1: + SOCK_RAW = 3 // socket.h:113:1: + SOCK_RDM = 4 // socket.h:115:1: + SOCK_SEQPACKET = 5 // socket.h:117:1: + SOCK_STREAM = 1 // socket.h:111:1: + SOL_SOCKET = 0xffff // socket.h:348:1: + SOMAXCONN = 128 // socket.h:540:1: + SONPX_SETOPTSHUT = 0x000000001 // socket.h:338:1: + SO_ACCEPTCONN = 0x0002 // socket.h:123:1: + SO_BROADCAST = 0x0020 // socket.h:127:1: + SO_DEBUG = 0x0001 // socket.h:122:1: + SO_DONTROUTE = 0x0010 // socket.h:126:1: + SO_DONTTRUNC = 0x2000 // socket.h:142:1: + SO_ERROR = 0x1007 // socket.h:160:1: + SO_KEEPALIVE = 0x0008 // socket.h:125:1: + SO_LABEL = 0x1010 // socket.h:163:1: + SO_LINGER = 0x0080 // socket.h:130:1: + SO_LINGER_SEC = 0x1080 // socket.h:176:1: + SO_NETSVC_MARKING_LEVEL = 0x1119 // socket.h:185:1: + SO_NET_SERVICE_TYPE = 0x1116 // socket.h:182:1: + SO_NKE = 0x1021 // socket.h:167:1: + SO_NOADDRERR = 0x1023 // socket.h:169:1: + SO_NOSIGPIPE = 0x1022 // socket.h:168:1: + SO_NOTIFYCONFLICT = 0x1026 // socket.h:173:1: + SO_NP_EXTENSIONS = 0x1083 // socket.h:178:1: + SO_NREAD = 0x1020 // socket.h:166:1: + SO_NUMRCVPKT = 0x1112 // socket.h:181:1: + SO_NWRITE = 0x1024 // socket.h:170:1: + SO_OOBINLINE = 0x0100 // socket.h:134:1: + SO_PEERLABEL = 0x1011 // socket.h:164:1: + SO_RANDOMPORT = 0x1082 // socket.h:177:1: + SO_RCVBUF = 0x1002 // socket.h:155:1: + SO_RCVLOWAT = 0x1004 // socket.h:157:1: + SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_REUSEADDR = 0x0004 // socket.h:124:1: + SO_REUSEPORT = 0x0200 // socket.h:136:1: + SO_REUSESHAREUID = 0x1025 // socket.h:171:1: + SO_SNDBUF = 0x1001 // socket.h:154:1: + SO_SNDLOWAT = 0x1003 // socket.h:156:1: + SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_TIMESTAMP = 0x0400 // socket.h:137:1: + SO_TIMESTAMP_MONOTONIC = 0x0800 // socket.h:138:1: + SO_TYPE = 0x1008 // socket.h:161:1: + SO_UPCALLCLOSEWAIT = 0x1027 // socket.h:174:1: + SO_USELOOPBACK = 0x0040 // socket.h:129:1: + SO_WANTMORE = 0x4000 // socket.h:144:1: + SO_WANTOOBFLAG = 0x8000 // socket.h:145:1: + TRY_AGAIN = 2 // netdb.h:175:1: + UINT16_MAX = 65535 // stdint.h:601:1: + UINT32_MAX = 4294967295 // stdint.h:557:1: + UINT64_MAX = 18446744073709551615 // stdint.h:463:1: + UINT8_MAX = 255 // stdint.h:623:1: + UINTMAX_MAX = 18446744073709551615 // stdint.h:664:1: + UINTPTR_MAX = 18446744073709551615 // stdint.h:650:1: + UINT_FAST16_MAX = 65535 // stdint.h:616:1: + UINT_FAST32_MAX = 4294967295 // stdint.h:575:1: + UINT_FAST64_MAX = 18446744073709551615 // stdint.h:484:1: + UINT_FAST8_MAX = 255 // stdint.h:635:1: + UINT_LEAST16_MAX = 65535 // stdint.h:613:1: + UINT_LEAST32_MAX = 4294967295 // stdint.h:572:1: + UINT_LEAST64_MAX = 18446744073709551615 // stdint.h:481:1: + UINT_LEAST8_MAX = 255 // stdint.h:632:1: + WCHAR_MAX = 2147483647 // stdint.h:678:1: + WCHAR_MIN = -2147483648 // stdint.h:682:1: + WINT_MAX = 2147483647 // stdint.h:674:1: + WINT_MIN = -2147483648 // stdint.h:673:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_I386__PARAM_H_ = 0 // _param.h:30:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NETDB_H_ = 0 // netdb.h:84:1: + X_NETINET6_IN6_H_ = 0 // in6.h:99:1: + X_NETINET_IN_H_ = 0 // in.h:65:1: + X_NET_NETKEV_H_ = 0 // net_kev.h:30:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:94:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:96:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:97:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:98:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:99:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SA_FAMILY_T = 0 // _sa_family_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SOCKLEN_T = 0 // _socklen_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SS_MAXSIZE = 128 // socket.h:429:1: + X_STRUCT_IOVEC = 0 // _iovec_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SOCKET_H_ = 0 // socket.h:73:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: + Pseudo_AF_HDRCMPLT = 35 // socket.h:396:1: + Pseudo_AF_KEY = 29 // socket.h:388:1: + Pseudo_AF_PIP = 25 // socket.h:384:1: + Pseudo_AF_RTIP = 22 // socket.h:381:1: + Pseudo_AF_XTP = 19 // socket.h:378:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go b/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go index 307a49695f..4f1d9fd71c 100644 --- a/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go +++ b/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netdb/netdb_freebsd_386.go -pkgname netdb', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netdb/netdb_openbsd_386.go -pkgname netdb', DO NOT EDIT. package netdb @@ -15,69 +15,325 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AI_ADDRCONFIG = 0x00000400 // netdb.h:200:1: - AI_ALL = 0x00000100 // netdb.h:198:1: - AI_CANONNAME = 0x00000002 // netdb.h:190:1: - AI_DEFAULT = 1536 // netdb.h:203:1: - AI_MASK = 3343 // netdb.h:194:1: - AI_NUMERICHOST = 0x00000004 // netdb.h:191:1: - AI_NUMERICSERV = 0x00000008 // netdb.h:192:1: - AI_PASSIVE = 0x00000001 // netdb.h:189:1: - AI_V4MAPPED = 0x00000800 // netdb.h:201:1: - AI_V4MAPPED_CFG = 0x00000200 // netdb.h:199:1: - EAI_AGAIN = 2 // netdb.h:168:1: - EAI_BADFLAGS = 3 // netdb.h:169:1: - EAI_BADHINTS = 12 // netdb.h:181:1: - EAI_FAIL = 4 // netdb.h:170:1: - EAI_FAMILY = 5 // netdb.h:171:1: - EAI_MAX = 15 // netdb.h:184:1: - EAI_MEMORY = 6 // netdb.h:172:1: - EAI_NONAME = 8 // netdb.h:177:1: - EAI_OVERFLOW = 14 // netdb.h:183:1: - EAI_PROTOCOL = 13 // netdb.h:182:1: - EAI_SERVICE = 9 // netdb.h:178:1: - EAI_SOCKTYPE = 10 // netdb.h:179:1: - EAI_SYSTEM = 11 // netdb.h:180:1: - HOST_NOT_FOUND = 1 // netdb.h:155:1: - IPPORT_RESERVED = 1024 // netdb.h:146:1: - NETDB_INTERNAL = -1 // netdb.h:153:1: - NETDB_SUCCESS = 0 // netdb.h:154:1: - NI_DGRAM = 0x00000010 // netdb.h:218:1: - NI_MAXHOST = 1025 // netdb.h:208:1: - NI_MAXSERV = 32 // netdb.h:209:1: - NI_NAMEREQD = 0x00000004 // netdb.h:216:1: - NI_NOFQDN = 0x00000001 // netdb.h:214:1: - NI_NUMERICHOST = 0x00000002 // netdb.h:215:1: - NI_NUMERICSCOPE = 0x00000020 // netdb.h:219:1: - NI_NUMERICSERV = 0x00000008 // netdb.h:217:1: - NO_ADDRESS = 4 // netdb.h:159:1: - NO_DATA = 4 // netdb.h:158:1: - NO_RECOVERY = 3 // netdb.h:157:1: - SCOPE_DELIMITER = 37 // netdb.h:224:1: - TRY_AGAIN = 2 // netdb.h:156:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_IN_ADDR_T_DECLARED = 0 // netdb.h:67:1: - X_IN_PORT_T_DECLARED = 0 // netdb.h:72:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_NETDB_H_ = 0 // netdb.h:60:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:91:1: - X_PATH_HOSTS = "/etc/hosts" // netdb.h:93:1: - X_PATH_NETWORKS = "/etc/networks" // netdb.h:94:1: - X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:95:1: - X_PATH_SERVICES = "/etc/services" // netdb.h:96:1: - X_PATH_SERVICES_DB = "/var/db/services.db" // netdb.h:97:1: - X_SIZE_T_DECLARED = 0 // netdb.h:77:1: - X_SOCKLEN_T_DECLARED = 0 // netdb.h:82:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_UINT32_T_DECLARED = 0 // netdb.h:87:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + AI_ADDRCONFIG = 64 // netdb.h:165:1: + AI_CANONNAME = 2 // netdb.h:160:1: + AI_EXT = 8 // netdb.h:162:1: + AI_FQDN = 32 // netdb.h:164:1: + AI_MASK = 119 // netdb.h:167:1: + AI_NUMERICHOST = 4 // netdb.h:161:1: + AI_NUMERICSERV = 16 // netdb.h:163:1: + AI_PASSIVE = 1 // netdb.h:159:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EAI_ADDRFAMILY = -9 // netdb.h:196:1: + EAI_AGAIN = -3 // netdb.h:190:1: + EAI_BADFLAGS = -1 // netdb.h:188:1: + EAI_BADHINTS = -12 // netdb.h:199:1: + EAI_FAIL = -4 // netdb.h:191:1: + EAI_FAMILY = -6 // netdb.h:193:1: + EAI_MEMORY = -10 // netdb.h:197:1: + EAI_NODATA = -5 // netdb.h:192:1: + EAI_NONAME = -2 // netdb.h:189:1: + EAI_OVERFLOW = -14 // netdb.h:201:1: + EAI_PROTOCOL = -13 // netdb.h:200:1: + EAI_SERVICE = -8 // netdb.h:195:1: + EAI_SOCKTYPE = -7 // netdb.h:194:1: + EAI_SYSTEM = -11 // netdb.h:198:1: + ERRSET_FAIL = 2 // netdb.h:225:1: + ERRSET_INVAL = 3 // netdb.h:226:1: + ERRSET_NODATA = 5 // netdb.h:228:1: + ERRSET_NOMEMORY = 1 // netdb.h:224:1: + ERRSET_NONAME = 4 // netdb.h:227:1: + ERRSET_SUCCESS = 0 // netdb.h:223:1: + HOST_NOT_FOUND = 1 // netdb.h:151:1: + ICMP6_FILTER = 18 // in6.h:304:1: + INET6_ADDRSTRLEN = 46 // in6.h:97:1: + INET_ADDRSTRLEN = 16 // in.h:382:1: + IN_CLASSA_MAX = 128 // in.h:195:1: + IN_CLASSA_NSHIFT = 24 // in.h:193:1: + IN_CLASSB_MAX = 65536 // in.h:202:1: + IN_CLASSB_NSHIFT = 16 // in.h:200:1: + IN_CLASSC_NSHIFT = 8 // in.h:207:1: + IN_CLASSD_NSHIFT = 28 // in.h:214:1: + IN_LOOPBACKNET = 127 // in.h:253:1: + IN_RFC3021_NSHIFT = 31 // in.h:219:1: + IPCTL_ARPDOWN = 40 // in.h:698:1: + IPCTL_ARPQUEUE = 41 // in.h:699:1: + IPCTL_ARPQUEUED = 36 // in.h:694:1: + IPCTL_ARPTIMEOUT = 39 // in.h:697:1: + IPCTL_DEFTTL = 3 // in.h:662:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:664:1: + IPCTL_ENCDEBUG = 12 // in.h:670:1: + IPCTL_FORWARDING = 1 // in.h:660:1: + IPCTL_IFQUEUE = 30 // in.h:688:1: + IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1: + IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1: + IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1: + IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1: + IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1: + IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1: + IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1: + IPCTL_IPSEC_BYTES = 20 // in.h:678:1: + IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1: + IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1: + IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1: + IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1: + IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1: + IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1: + IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1: + IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1: + IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1: + IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1: + IPCTL_IPSEC_STATS = 13 // in.h:671:1: + IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1: + IPCTL_MAXID = 42 // in.h:700:1: + IPCTL_MFORWARDING = 31 // in.h:689:1: + IPCTL_MRTMFC = 37 // in.h:695:1: + IPCTL_MRTPROTO = 34 // in.h:692:1: + IPCTL_MRTSTATS = 35 // in.h:693:1: + IPCTL_MRTVIF = 38 // in.h:696:1: + IPCTL_MTUDISC = 27 // in.h:685:1: + IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1: + IPCTL_MULTIPATH = 32 // in.h:690:1: + IPCTL_SENDREDIRECTS = 2 // in.h:661:1: + IPCTL_SOURCEROUTE = 5 // in.h:663:1: + IPCTL_STATS = 33 // in.h:691:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1: + IPPORT_HILASTAUTO = 65535 // in.h:160:1: + IPPORT_RESERVED = 1024 // in.h:153:1: + IPPORT_USERRESERVED = 49151 // in.h:154:1: + IPPROTO_AH = 51 // in.h:89:1: + IPPROTO_CARP = 112 // in.h:99:1: + IPPROTO_DIVERT = 258 // in.h:109:1: + IPPROTO_DONE = 257 // in.h:173:1: + IPPROTO_DSTOPTS = 60 // in.h:93:1: + IPPROTO_EGP = 8 // in.h:78:1: + IPPROTO_ENCAP = 98 // in.h:96:1: + IPPROTO_EON = 80 // in.h:94:1: + IPPROTO_ESP = 50 // in.h:88:1: + IPPROTO_ETHERIP = 97 // in.h:95:1: + IPPROTO_FRAGMENT = 44 // in.h:85:1: + IPPROTO_GGP = 3 // in.h:74:1: + IPPROTO_GRE = 47 // in.h:87:1: + IPPROTO_HOPOPTS = 0 // in.h:71:1: + IPPROTO_ICMP = 1 // in.h:72:1: + IPPROTO_ICMPV6 = 58 // in.h:91:1: + IPPROTO_IDP = 22 // in.h:81:1: + IPPROTO_IGMP = 2 // in.h:73:1: + IPPROTO_IP = 0 // in.h:70:1: + IPPROTO_IPCOMP = 108 // in.h:98:1: + IPPROTO_IPIP = 4 // in.h:75:1: + IPPROTO_IPV4 = 4 // in.h:76:1: + IPPROTO_IPV6 = 41 // in.h:83:1: + IPPROTO_MAX = 256 // in.h:106:1: + IPPROTO_MAXID = 259 // in.h:393:1: + IPPROTO_MOBILE = 55 // in.h:90:1: + IPPROTO_MPLS = 137 // in.h:102:1: + IPPROTO_NONE = 59 // in.h:92:1: + IPPROTO_PFSYNC = 240 // in.h:103:1: + IPPROTO_PIM = 103 // in.h:97:1: + IPPROTO_PUP = 12 // in.h:79:1: + IPPROTO_RAW = 255 // in.h:104:1: + IPPROTO_ROUTING = 43 // in.h:84:1: + IPPROTO_RSVP = 46 // in.h:86:1: + IPPROTO_SCTP = 132 // in.h:100:1: + IPPROTO_TCP = 6 // in.h:77:1: + IPPROTO_TP = 29 // in.h:82:1: + IPPROTO_UDP = 17 // in.h:80:1: + IPPROTO_UDPLITE = 136 // in.h:101:1: + IPSEC6_OUTSA = 56 // in6.h:337:1: + IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1: + IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1: + IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1: + IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1: + IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1: + IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1: + IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1: + IPSEC_LEVEL_NONE = 0x00 // in.h:329:1: + IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1: + IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1: + IPSEC_LEVEL_USE = 0x02 // in.h:331:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:578:1: + IPV6CTL_DAD_PENDING = 49 // in6.h:589:1: + IPV6CTL_DEFHLIM = 3 // in6.h:567:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1: + IPV6CTL_FORWARDING = 1 // in6.h:565:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:568:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1: + IPV6CTL_IFQUEUE = 51 // in6.h:591:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1: + IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:583:1: + IPV6CTL_MAXID = 55 // in6.h:595:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1: + IPV6CTL_MFORWARDING = 42 // in6.h:584:1: + IPV6CTL_MRTMFC = 53 // in6.h:593:1: + IPV6CTL_MRTMIF = 52 // in6.h:592:1: + IPV6CTL_MRTPROTO = 8 // in6.h:571:1: + IPV6CTL_MRTSTATS = 7 // in6.h:570:1: + IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1: + IPV6CTL_MULTIPATH = 43 // in6.h:585:1: + IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1: + IPV6CTL_SOIIKEY = 54 // in6.h:594:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:573:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1: + IPV6CTL_STATS = 6 // in6.h:569:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1: + IPV6PROTO_MAXID = 259 // in6.h:470:1: + IPV6_AUTH_LEVEL = 53 // in6.h:333:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1: + IPV6_CHECKSUM = 26 // in6.h:307:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1: + IPV6_DONTFRAG = 62 // in6.h:345:1: + IPV6_DSTOPTS = 50 // in6.h:330:1: + IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1: + IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1: + IPV6_HOPLIMIT = 47 // in6.h:327:1: + IPV6_HOPOPTS = 49 // in6.h:329:1: + IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1: + IPV6_JOIN_GROUP = 12 // in6.h:300:1: + IPV6_LEAVE_GROUP = 13 // in6.h:301:1: + IPV6_MINHOPCOUNT = 65 // in6.h:349:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:298:1: + IPV6_MULTICAST_IF = 9 // in6.h:297:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:299:1: + IPV6_NEXTHOP = 48 // in6.h:328:1: + IPV6_PATHMTU = 44 // in6.h:322:1: + IPV6_PIPEX = 63 // in6.h:346:1: + IPV6_PKTINFO = 46 // in6.h:326:1: + IPV6_PORTRANGE = 14 // in6.h:302:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:395:1: + IPV6_RECVDSTOPTS = 40 // in6.h:317:1: + IPV6_RECVDSTPORT = 64 // in6.h:348:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:314:1: + IPV6_RECVHOPOPTS = 39 // in6.h:316:1: + IPV6_RECVPATHMTU = 43 // in6.h:320:1: + IPV6_RECVPKTINFO = 36 // in6.h:313:1: + IPV6_RECVRTHDR = 38 // in6.h:315:1: + IPV6_RECVTCLASS = 57 // in6.h:339:1: + IPV6_RTABLE = 0x1021 // in6.h:351:1: + IPV6_RTHDR = 51 // in6.h:331:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:354:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1: + IPV6_TCLASS = 61 // in6.h:344:1: + IPV6_UNICAST_HOPS = 4 // in6.h:296:1: + IPV6_USE_MIN_MTU = 42 // in6.h:319:1: + IPV6_V6ONLY = 27 // in6.h:308:1: + IP_ADD_MEMBERSHIP = 12 // in.h:297:1: + IP_AUTH_LEVEL = 20 // in.h:300:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1: + IP_DROP_MEMBERSHIP = 13 // in.h:298:1: + IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1: + IP_ESP_TRANS_LEVEL = 21 // in.h:301:1: + IP_HDRINCL = 2 // in.h:287:1: + IP_IPCOMP_LEVEL = 29 // in.h:309:1: + IP_IPDEFTTL = 37 // in.h:317:1: + IP_IPSECFLOWINFO = 36 // in.h:316:1: + IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1: + IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1: + IP_IPSEC_LOCAL_ID = 23 // in.h:303:1: + IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1: + IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1: + IP_IPSEC_REMOTE_ID = 24 // in.h:304:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1: + IP_MINTTL = 32 // in.h:312:1: + IP_MIN_MEMBERSHIPS = 15 // in.h:353:1: + IP_MULTICAST_IF = 9 // in.h:294:1: + IP_MULTICAST_LOOP = 11 // in.h:296:1: + IP_MULTICAST_TTL = 10 // in.h:295:1: + IP_OPTIONS = 1 // in.h:286:1: + IP_PIPEX = 34 // in.h:314:1: + IP_PORTRANGE = 19 // in.h:299:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:374:1: + IP_PORTRANGE_HIGH = 1 // in.h:375:1: + IP_PORTRANGE_LOW = 2 // in.h:376:1: + IP_RECVDSTADDR = 7 // in.h:292:1: + IP_RECVDSTPORT = 33 // in.h:313:1: + IP_RECVIF = 30 // in.h:310:1: + IP_RECVOPTS = 5 // in.h:290:1: + IP_RECVRETOPTS = 6 // in.h:291:1: + IP_RECVRTABLE = 35 // in.h:315:1: + IP_RECVTTL = 31 // in.h:311:1: + IP_RETOPTS = 8 // in.h:293:1: + IP_RTABLE = 0x1021 // in.h:321:1: + IP_SENDSRCADDR = 7 // in.h:318:1: + IP_TOS = 3 // in.h:288:1: + IP_TTL = 4 // in.h:289:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NETDB_INTERNAL = -1 // netdb.h:149:1: + NETDB_SUCCESS = 0 // netdb.h:150:1: + NI_DGRAM = 16 // netdb.h:175:1: + NI_MAXHOST = 256 // netdb.h:179:1: + NI_MAXSERV = 32 // netdb.h:180:1: + NI_NAMEREQD = 8 // netdb.h:174:1: + NI_NOFQDN = 4 // netdb.h:173:1: + NI_NUMERICHOST = 1 // netdb.h:171:1: + NI_NUMERICSERV = 2 // netdb.h:172:1: + NO_ADDRESS = 4 // netdb.h:155:1: + NO_DATA = 4 // netdb.h:154:1: + NO_RECOVERY = 3 // netdb.h:153:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + RRSET_VALIDATED = 1 // netdb.h:218:1: + SCOPE_DELIMITER = 37 // netdb.h:185:1: + SIN6_LEN = 0 // in6.h:104:1: + TRY_AGAIN = 2 // netdb.h:152:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IN_ADDR_DECLARED = 0 // in.h:163:1: + X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NETDB_H_ = 0 // netdb.h:88:1: + X_NETINET6_IN6_H_ = 0 // in6.h:69:1: + X_NETINET_IN_H_ = 0 // in.h:39:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:97:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:98:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:99:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:100:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:101:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -89,9 +345,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: netdb.h,v 1.33 2015/01/18 20:29:31 deraadt Exp $ + +// ++Copyright++ 1980, 1983, 1988, 1993 // - -// SPDX-License-Identifier: (BSD-3-Clause AND ISC) -// // Copyright (c) 1980, 1983, 1988, 1993 // The Regents of the University of California. All rights reserved. // @@ -118,7 +375,6 @@ type X__float128 = float64 /* :47:21 */ // 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. -// // - // Portions Copyright (c) 1993 by Digital Equipment Corporation. // @@ -140,13 +396,71 @@ type X__float128 = float64 /* :47:21 */ // - // --Copyright-- +// Copyright (c) 1995, 1996, 1997, 1998, 1999 Craig Metz. 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. +// 3. Neither the name of the author nor the names of any 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. + // @(#)netdb.h 8.1 (Berkeley) 6/2/93 -// From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $ -// $FreeBSD$ +// $From: netdb.h,v 8.7 1996/05/09 05:59:09 vixie Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause +// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $ +// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ + +// Copyright (c) 1982, 1986, 1990, 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. +// 3. 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. + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -177,63 +491,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Testing against Clang-specific extensions. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. - -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -262,118 +552,120 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. - -// Type Safety Checking +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ -// Guard variables and structure members by lock. +// - +// Copyright (c) 1982, 1986, 1991, 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. +// 3. 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -383,11 +675,14 @@ type X__float128 = float64 /* :47:21 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -396,11 +691,44 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -431,17 +759,40 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. // -// Copyright (c) 2002 Mike Barcroft +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ + +// - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -453,11 +804,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -473,18 +820,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -511,162 +852,520 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// max value for an unsigned long long +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// Minimum signal stack size. +// Tell sys/endian.h we have MD variants of the swap macros. -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// Note that these macros evaluate their arguments several times. -type X__int64_t = int64 /* _types.h:66:20 */ +// Public names -type X__uint64_t = uint64 /* _types.h:68:28 */ +// These are specified to be function-like macros to match the spec -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type Int8_t = X__int8_t /* types.h:75:19 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +type Uint8_t = X__uint8_t /* types.h:80:20 */ -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// is pulled in by + +type Sa_family_t = X__sa_family_t /* in.h:58:23 */ // sockaddr address family type + +type In_addr_t = X__in_addr_t /* in.h:63:21 */ // base type for internet address +type In_port_t = X__in_port_t /* in.h:64:21 */ // IP port type + +// Protocols + +// Only used internally, so it can be outside the range of valid IP protocols + +// From FreeBSD: +// +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_RESERVED through +// IPPORT_USERRESERVED, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.port{hi}{first,last}) +// +// Changing those values has bad security implications if you are +// using a a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. -type In_addr_t = X__uint32_t /* netdb.h:66:20 */ +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). +// Ports > IPPORT_USERRESERVED are reserved +// for servers, not necessarily privileged. -type In_port_t = X__uint16_t /* netdb.h:71:20 */ +// Default local port range to use by setting IP_PORTRANGE_HIGH -type Socklen_t = X__socklen_t /* netdb.h:81:21 */ +// IP Version 4 Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:167:1 */ -type Uint32_t = X__uint32_t /* netdb.h:86:20 */ +// last return value of *_input(), meaning "all job for this pkt is done". + +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. + +// These ones aren't really net and host fields, but routing needn't know. + +// IP Version 4 socket address. +type Sockaddr_in = struct { + Fsin_len U_int8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]Int8_t +} /* in.h:258:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst 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]Int8_t +} /* in.h:273:1 */ + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// source address to use + +// Security levels - IPsec, not IPSO + +// Defaults and limits for options +// The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS +// and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS, +// and is reallocated when needed, sized according to a power-of-two increment. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:359:1 */ + +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:364:1 */ + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Buffer lengths for strings containing printable IP addresses + +// Definitions for inet sysctl operations. +// +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects + +// INET6 stuff +// $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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. +// 3. Neither the name of the project 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 PROJECT 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 PROJECT 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. + +// Copyright (c) 1982, 1986, 1990, 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. +// 3. 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb2.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } +} /* in6.h:81:1 */ + +// Socket address for IPv6 +type Sockaddr_in6 = struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t +} /* in6.h:106:1 */ + +// IPv6 route structure +type Route_in6 = struct { + Fro_rt uintptr + Fro_tableid U_long + Fro_dst struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } +} /* in6.h:150:1 */ + +// Definition of some useful macros to handle IP6 addresses + +// Macros started with IPV6_ADDR is KAME local + +// Unspecified + +// Loopback + +// IPv4 compatible + +// Mapped + +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). + +// Multicast + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. + +// new socket options introduced in RFC3542 + +// More new socket options introduced in RFC3542 + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:366:1 */ + +// IPV6_PKTINFO: Packet information(RFC3542 sec 6) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:374:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +// XXX Not allowed here by POSIX, but required by RFC 3542, so go +// XXX with the code on the pavement. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + Fip6m_mtu U_int32_t +} /* in6.h:384:1 */ + +// Argument for IPV6_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +type Socklen_t = X__socklen_t /* in6.h:401:21 */ // Structures returned by network data base library. All addresses are // supplied in host order, and returned in network order (suitable for @@ -677,27 +1376,39 @@ type Hostent = struct { Fh_addrtype int32 Fh_length int32 Fh_addr_list uintptr -} /* netdb.h:106:1 */ +} /* netdb.h:108:1 */ +// Assumption here is that a network number +// fits in an in_addr_t -- probably a poor one. type Netent = struct { Fn_name uintptr Fn_aliases uintptr Fn_addrtype int32 - Fn_net Uint32_t -} /* netdb.h:115:1 */ + Fn_net In_addr_t +} /* netdb.h:121:1 */ type Servent = struct { Fs_name uintptr Fs_aliases uintptr Fs_port int32 Fs_proto uintptr -} /* netdb.h:122:1 */ +} /* netdb.h:128:1 */ type Protoent = struct { Fp_name uintptr Fp_aliases uintptr Fp_proto int32 -} /* netdb.h:129:1 */ +} /* netdb.h:135:1 */ + +// Error return codes from gethostbyname() and gethostbyaddr() +// (left in extern int h_errno). + +// Values for getaddrinfo() and getnameinfo() +// valid flags for addrinfo + +// #define NI_NUMERICSCOPE 32 return the scope number, not the name + +// Scope delimit character (KAME hack) type Addrinfo = struct { Fai_flags int32 @@ -705,9 +1416,47 @@ type Addrinfo = struct { Fai_socktype int32 Fai_protocol int32 Fai_addrlen Socklen_t - Fai_canonname uintptr Fai_addr uintptr + Fai_canonname uintptr Fai_next uintptr -} /* netdb.h:135:1 */ +} /* netdb.h:203:1 */ + +// Flags for getrrsetbyname() + +// Return codes for getrrsetbyname() + +// Structures used by getrrsetbyname() and freerrset() +type Rdatainfo = struct { + Frdi_length uint32 + Frdi_data uintptr +} /* netdb.h:233:1 */ + +type Rrsetinfo = struct { + Frri_flags uint32 + Frri_rdclass uint32 + Frri_rdtype uint32 + Frri_ttl uint32 + Frri_nrdatas uint32 + Frri_nsigs uint32 + Frri_name uintptr + Frri_rdatas uintptr + Frri_sigs uintptr +} /* netdb.h:238:1 */ + +type Servent_data = struct { + Ffp uintptr + Faliases uintptr + Fmaxaliases int32 + Fstayopen int32 + Fline uintptr +} /* netdb.h:250:1 */ + +type Protoent_data = struct { + Ffp uintptr + Faliases uintptr + Fmaxaliases int32 + Fstayopen int32 + Fline uintptr +} /* netdb.h:258:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go b/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go index 40fb26c9ca..78cea261cd 100644 --- a/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go +++ b/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go @@ -288,8 +288,8 @@ const ( TRY_AGAIN = 2 // netdb.h:152:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -306,34 +306,34 @@ const ( X_NETDB_H_ = 0 // netdb.h:88:1: X_NETINET6_IN6_H_ = 0 // in6.h:69:1: X_NETINET_IN_H_ = 0 // in.h:39:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:97:1: X_PATH_HOSTS = "/etc/hosts" // netdb.h:98:1: X_PATH_NETWORKS = "/etc/networks" // netdb.h:99:1: X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:100:1: X_PATH_SERVICES = "/etc/services" // netdb.h:101:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -629,7 +629,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -799,7 +799,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -959,18 +959,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -1052,27 +1051,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go b/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go index 40fb26c9ca..31233ad8f7 100644 --- a/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go +++ b/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netdb/netdb_openbsd_amd64.go -pkgname netdb', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netdb/netdb_openbsd_arm64.go -pkgname netdb', DO NOT EDIT. package netdb @@ -287,9 +287,9 @@ const ( SIN6_LEN = 0 // in6.h:104:1: TRY_AGAIN = 2 // netdb.h:152:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -299,41 +299,41 @@ const ( X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_NETDB_H_ = 0 // netdb.h:88:1: X_NETINET6_IN6_H_ = 0 // in6.h:69:1: X_NETINET_IN_H_ = 0 // in.h:39:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:97:1: X_PATH_HOSTS = "/etc/hosts" // netdb.h:98:1: X_PATH_NETWORKS = "/etc/networks" // netdb.h:99:1: X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:100:1: X_PATH_SERVICES = "/etc/services" // netdb.h:101:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -502,10 +502,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -629,7 +626,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -799,7 +796,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -831,8 +828,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -874,66 +870,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -959,18 +957,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -1052,27 +1049,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go b/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go index afb6c70b29..5d34ac45bb 100644 --- a/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname in', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT. package in diff --git a/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go b/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go index a47b82a49f..c53a81566a 100644 --- a/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netinet/in/in_freebsd_386.go -pkgname in', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netinet/in/in_openbsd_386.go -pkgname in', DO NOT EDIT. package in diff --git a/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go b/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go index 627d283d88..a96a7b8715 100644 --- a/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netinet/in/in_openbsd_amd64.go -pkgname in', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netinet/in/in_openbsd_arm64.go -pkgname in', DO NOT EDIT. package in diff --git a/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go b/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go index f45ccdb822..69111122eb 100644 --- a/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname in', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT. package in @@ -15,684 +15,684 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 - AF_CCITT = 10 - AF_CHAOS = 5 - AF_CNT = 21 - AF_COIP = 20 - AF_DATAKIT = 9 - AF_DECnet = 12 - AF_DLI = 13 - AF_E164 = 28 - AF_ECMA = 8 - AF_HYLINK = 15 - AF_IEEE80211 = 37 - AF_IMPLINK = 3 - AF_INET = 2 - AF_INET6 = 30 - AF_IPX = 23 - AF_ISDN = 28 - AF_ISO = 7 - AF_LAT = 14 - AF_LINK = 18 - AF_LOCAL = 1 - AF_MAX = 40 - AF_NATM = 31 - AF_NDRV = 27 - AF_NETBIOS = 33 - AF_NS = 6 - AF_OSI = 7 - AF_PPP = 34 - AF_PUP = 4 - AF_RESERVED_36 = 36 - AF_ROUTE = 17 - AF_SIP = 24 - AF_SNA = 11 - AF_SYSTEM = 32 - AF_UNIX = 1 - AF_UNSPEC = 0 - AF_UTUN = 38 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - CONNECT_DATA_AUTHENTICATED = 0x4 - CONNECT_DATA_IDEMPOTENT = 0x2 - CONNECT_RESUME_ON_READ_WRITE = 0x1 - FD_SETSIZE = 1024 - ICMP6_FILTER = 18 - ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 - INADDR_NONE = 0xffffffff - INET6_ADDRSTRLEN = 46 - INET_ADDRSTRLEN = 16 - INT16_MAX = 32767 - INT16_MIN = -32768 - INT32_MAX = 2147483647 - INT32_MIN = -2147483648 - INT64_MAX = 9223372036854775807 - INT64_MIN = -9223372036854775808 - INT8_MAX = 127 - INT8_MIN = -128 - INTMAX_MAX = 9223372036854775807 - INTMAX_MIN = -9223372036854775808 - INTPTR_MAX = 9223372036854775807 - INTPTR_MIN = -9223372036854775808 - INT_FAST16_MAX = 32767 - INT_FAST16_MIN = -32768 - INT_FAST32_MAX = 2147483647 - INT_FAST32_MIN = -2147483648 - INT_FAST64_MAX = 9223372036854775807 - INT_FAST64_MIN = -9223372036854775808 - INT_FAST8_MAX = 127 - INT_FAST8_MIN = -128 - INT_LEAST16_MAX = 32767 - INT_LEAST16_MIN = -32768 - INT_LEAST32_MAX = 2147483647 - INT_LEAST32_MIN = -2147483648 - INT_LEAST64_MAX = 9223372036854775807 - INT_LEAST64_MIN = -9223372036854775808 - INT_LEAST8_MAX = 127 - INT_LEAST8_MIN = -128 - IN_CLASSA_HOST = 0x00ffffff - IN_CLASSA_MAX = 128 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 24 - IN_CLASSB_HOST = 0x0000ffff - IN_CLASSB_MAX = 65536 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 16 - IN_CLASSC_HOST = 0x000000ff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 8 - IN_CLASSD_HOST = 0x0fffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 28 - IN_LOOPBACKNET = 127 - IPCTL_ACCEPTSOURCEROUTE = 13 - IPCTL_DEFTTL = 3 - IPCTL_DIRECTEDBROADCAST = 9 - IPCTL_FASTFORWARDING = 14 - IPCTL_FORWARDING = 1 - IPCTL_GIF_TTL = 16 - IPCTL_INTRQDROPS = 11 - IPCTL_INTRQMAXLEN = 10 - IPCTL_KEEPFAITH = 15 - IPCTL_MAXID = 17 - IPCTL_RTEXPIRE = 5 - IPCTL_RTMAXCACHE = 7 - IPCTL_RTMINEXPIRE = 6 - IPCTL_SENDREDIRECTS = 2 - IPCTL_SOURCEROUTE = 8 - IPCTL_STATS = 12 - IPPORT_HIFIRSTAUTO = 49152 - IPPORT_HILASTAUTO = 65535 - IPPORT_RESERVED = 1024 - IPPORT_RESERVEDSTART = 600 - IPPORT_USERRESERVED = 5000 - IPPROTO_3PC = 34 - IPPROTO_ADFS = 68 - IPPROTO_AH = 51 - IPPROTO_AHIP = 61 - IPPROTO_APES = 99 - IPPROTO_ARGUS = 13 - IPPROTO_AX25 = 93 - IPPROTO_BHA = 49 - IPPROTO_BLT = 30 - IPPROTO_BRSATMON = 76 - IPPROTO_CFTP = 62 - IPPROTO_CHAOS = 16 - IPPROTO_CMTP = 38 - IPPROTO_CPHB = 73 - IPPROTO_CPNX = 72 - IPPROTO_DDP = 37 - IPPROTO_DGP = 86 - IPPROTO_DIVERT = 254 - IPPROTO_DONE = 257 - IPPROTO_DSTOPTS = 60 - IPPROTO_EGP = 8 - IPPROTO_EMCON = 14 - IPPROTO_ENCAP = 98 - IPPROTO_EON = 80 - IPPROTO_ESP = 50 - IPPROTO_ETHERIP = 97 - IPPROTO_FRAGMENT = 44 - IPPROTO_GGP = 3 - IPPROTO_GMTP = 100 - IPPROTO_GRE = 47 - IPPROTO_HELLO = 63 - IPPROTO_HMP = 20 - IPPROTO_HOPOPTS = 0 - IPPROTO_ICMP = 1 - IPPROTO_ICMPV6 = 58 - IPPROTO_IDP = 22 - IPPROTO_IDPR = 35 - IPPROTO_IDRP = 45 - IPPROTO_IGMP = 2 - IPPROTO_IGP = 85 - IPPROTO_IGRP = 88 - IPPROTO_IL = 40 - IPPROTO_INLSP = 52 - IPPROTO_INP = 32 - IPPROTO_IP = 0 - IPPROTO_IPCOMP = 108 - IPPROTO_IPCV = 71 - IPPROTO_IPEIP = 94 - IPPROTO_IPIP = 4 - IPPROTO_IPPC = 67 - IPPROTO_IPV4 = 4 - IPPROTO_IPV6 = 41 - IPPROTO_IRTP = 28 - IPPROTO_KRYPTOLAN = 65 - IPPROTO_LARP = 91 - IPPROTO_LEAF1 = 25 - IPPROTO_LEAF2 = 26 - IPPROTO_MAX = 256 - IPPROTO_MAXID = 52 - IPPROTO_MEAS = 19 - IPPROTO_MHRP = 48 - IPPROTO_MICP = 95 - IPPROTO_MTP = 92 - IPPROTO_MUX = 18 - IPPROTO_ND = 77 - IPPROTO_NHRP = 54 - IPPROTO_NONE = 59 - IPPROTO_NSP = 31 - IPPROTO_NVPII = 11 - IPPROTO_OSPFIGP = 89 - IPPROTO_PGM = 113 - IPPROTO_PIGP = 9 - IPPROTO_PIM = 103 - IPPROTO_PRM = 21 - IPPROTO_PUP = 12 - IPPROTO_PVP = 75 - IPPROTO_RAW = 255 - IPPROTO_RCCMON = 10 - IPPROTO_RDP = 27 - IPPROTO_ROUTING = 43 - IPPROTO_RSVP = 46 - IPPROTO_RVD = 66 - IPPROTO_SATEXPAK = 64 - IPPROTO_SATMON = 69 - IPPROTO_SCCSP = 96 - IPPROTO_SCTP = 132 - IPPROTO_SDRP = 42 - IPPROTO_SEP = 33 - IPPROTO_SRPC = 90 - IPPROTO_ST = 7 - IPPROTO_SVMTP = 82 - IPPROTO_SWIPE = 53 - IPPROTO_TCF = 87 - IPPROTO_TCP = 6 - IPPROTO_TP = 29 - IPPROTO_TPXX = 39 - IPPROTO_TRUNK1 = 23 - IPPROTO_TRUNK2 = 24 - IPPROTO_TTP = 84 - IPPROTO_UDP = 17 - IPPROTO_VINES = 83 - IPPROTO_VISA = 70 - IPPROTO_VMTP = 81 - IPPROTO_WBEXPAK = 79 - IPPROTO_WBMON = 78 - IPPROTO_WSN = 74 - IPPROTO_XNET = 15 - IPPROTO_XTP = 36 - IPV6CTL_ACCEPT_RTADV = 12 - IPV6CTL_ADDRCTLPOLICY = 38 - IPV6CTL_AUTO_FLOWLABEL = 17 - IPV6CTL_AUTO_LINKLOCAL = 35 - IPV6CTL_DAD_COUNT = 16 - IPV6CTL_DEFHLIM = 3 - IPV6CTL_DEFMCASTHLIM = 18 - IPV6CTL_FORWARDING = 1 - IPV6CTL_FORWSRCRT = 5 - IPV6CTL_GIF_HLIM = 19 - IPV6CTL_HDRNESTLIMIT = 15 - IPV6CTL_KAME_VERSION = 20 - IPV6CTL_KEEPFAITH = 13 - IPV6CTL_LOG_INTERVAL = 14 - IPV6CTL_MAXDYNROUTES = 49 - IPV6CTL_MAXFRAGPACKETS = 9 - IPV6CTL_MAXFRAGS = 41 - IPV6CTL_MAXID = 51 - IPV6CTL_MAXIFDEFROUTERS = 48 - IPV6CTL_MAXIFPREFIXES = 47 - IPV6CTL_MCAST_PMTU = 44 - IPV6CTL_MRTPROTO = 8 - IPV6CTL_MRTSTATS = 7 - IPV6CTL_NEIGHBORGCTHRESH = 46 - IPV6CTL_PREFER_TEMPADDR = 37 - IPV6CTL_RIP6STATS = 36 - IPV6CTL_RR_PRUNE = 22 - IPV6CTL_RTEXPIRE = 25 - IPV6CTL_RTMAXCACHE = 27 - IPV6CTL_RTMINEXPIRE = 26 - IPV6CTL_SENDREDIRECTS = 2 - IPV6CTL_SOURCECHECK = 10 - IPV6CTL_SOURCECHECK_LOGINT = 11 - IPV6CTL_STATS = 6 - IPV6CTL_TEMPPLTIME = 33 - IPV6CTL_TEMPVLTIME = 34 - IPV6CTL_USETEMPADDR = 32 - IPV6CTL_USE_DEFAULTZONE = 39 - IPV6CTL_USE_DEPRECATED = 21 - IPV6CTL_V6ONLY = 24 - IPV6PORT_ANONMAX = 65535 - IPV6PORT_ANONMIN = 49152 - IPV6PORT_RESERVED = 1024 - IPV6PORT_RESERVEDMAX = 1023 - IPV6PORT_RESERVEDMIN = 600 - IPV6PROTO_MAXID = 104 - IPV6_2292DSTOPTS = 23 - IPV6_2292HOPLIMIT = 20 - IPV6_2292HOPOPTS = 22 - IPV6_2292NEXTHOP = 21 - IPV6_2292PKTINFO = 19 - IPV6_2292PKTOPTIONS = 25 - IPV6_2292RTHDR = 24 - IPV6_BINDV6ONLY = 27 - IPV6_BOUND_IF = 125 - IPV6_CHECKSUM = 26 - IPV6_DEFAULT_MULTICAST_HOPS = 1 - IPV6_DEFAULT_MULTICAST_LOOP = 1 - IPV6_FAITH = 29 - IPV6_FW_ADD = 30 - IPV6_FW_DEL = 31 - IPV6_FW_FLUSH = 32 - IPV6_FW_GET = 34 - IPV6_FW_ZERO = 33 - IPV6_IPSEC_POLICY = 28 - IPV6_JOIN_GROUP = 12 - IPV6_LEAVE_GROUP = 13 - IPV6_MAX_GROUP_SRC_FILTER = 512 - IPV6_MAX_MEMBERSHIPS = 4095 - IPV6_MAX_SOCK_SRC_FILTER = 128 - IPV6_MIN_MEMBERSHIPS = 31 - IPV6_MULTICAST_HOPS = 10 - IPV6_MULTICAST_IF = 9 - IPV6_MULTICAST_LOOP = 11 - IPV6_PORTRANGE = 14 - IPV6_PORTRANGE_DEFAULT = 0 - IPV6_PORTRANGE_HIGH = 1 - IPV6_PORTRANGE_LOW = 2 - IPV6_RECVTCLASS = 35 - IPV6_RTHDR_LOOSE = 0 - IPV6_RTHDR_STRICT = 1 - IPV6_RTHDR_TYPE_0 = 0 - IPV6_SOCKOPT_RESERVED1 = 3 - IPV6_TCLASS = 36 - IPV6_UNICAST_HOPS = 4 - IPV6_V6ONLY = 27 - IP_ADD_MEMBERSHIP = 12 - IP_ADD_SOURCE_MEMBERSHIP = 70 - IP_BLOCK_SOURCE = 72 - IP_BOUND_IF = 25 - IP_DEFAULT_MULTICAST_LOOP = 1 - IP_DEFAULT_MULTICAST_TTL = 1 - IP_DROP_MEMBERSHIP = 13 - IP_DROP_SOURCE_MEMBERSHIP = 71 - IP_DUMMYNET_CONFIGURE = 60 - IP_DUMMYNET_DEL = 61 - IP_DUMMYNET_FLUSH = 62 - IP_DUMMYNET_GET = 64 - IP_FAITH = 22 - IP_FW_ADD = 40 - IP_FW_DEL = 41 - IP_FW_FLUSH = 42 - IP_FW_GET = 44 - IP_FW_RESETLOG = 45 - IP_FW_ZERO = 43 - IP_HDRINCL = 2 - IP_IPSEC_POLICY = 21 - IP_MAX_GROUP_SRC_FILTER = 512 - IP_MAX_MEMBERSHIPS = 4095 - IP_MAX_SOCK_MUTE_FILTER = 128 - IP_MAX_SOCK_SRC_FILTER = 128 - IP_MIN_MEMBERSHIPS = 31 - IP_MSFILTER = 74 - IP_MULTICAST_IF = 9 - IP_MULTICAST_IFINDEX = 66 - IP_MULTICAST_LOOP = 11 - IP_MULTICAST_TTL = 10 - IP_MULTICAST_VIF = 14 - IP_NAT__XXX = 55 - IP_OLD_FW_ADD = 50 - IP_OLD_FW_DEL = 51 - IP_OLD_FW_FLUSH = 52 - IP_OLD_FW_GET = 54 - IP_OLD_FW_RESETLOG = 56 - IP_OLD_FW_ZERO = 53 - IP_OPTIONS = 1 - IP_PKTINFO = 26 - IP_PORTRANGE = 19 - IP_PORTRANGE_DEFAULT = 0 - IP_PORTRANGE_HIGH = 1 - IP_PORTRANGE_LOW = 2 - IP_RECVDSTADDR = 7 - IP_RECVIF = 20 - IP_RECVOPTS = 5 - IP_RECVPKTINFO = 26 - IP_RECVRETOPTS = 6 - IP_RECVTOS = 27 - IP_RECVTTL = 24 - IP_RETOPTS = 8 - IP_RSVP_OFF = 16 - IP_RSVP_ON = 15 - IP_RSVP_VIF_OFF = 18 - IP_RSVP_VIF_ON = 17 - IP_STRIPHDR = 23 - IP_TOS = 3 - IP_TRAFFIC_MGT_BACKGROUND = 65 - IP_TTL = 4 - IP_UNBLOCK_SOURCE = 73 - KEV_DL_ADDMULTI = 7 - KEV_DL_AWDL_RESTRICTED = 26 - KEV_DL_AWDL_UNRESTRICTED = 27 - KEV_DL_DELMULTI = 8 - KEV_DL_IFCAP_CHANGED = 19 - KEV_DL_IFDELEGATE_CHANGED = 25 - KEV_DL_IF_ATTACHED = 9 - KEV_DL_IF_DETACHED = 11 - KEV_DL_IF_DETACHING = 10 - KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 - KEV_DL_ISSUES = 24 - KEV_DL_LINK_ADDRESS_CHANGED = 16 - KEV_DL_LINK_OFF = 12 - KEV_DL_LINK_ON = 13 - KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 - KEV_DL_LOW_POWER_MODE_CHANGED = 30 - KEV_DL_MASTER_ELECTED = 23 - KEV_DL_NODE_ABSENCE = 22 - KEV_DL_NODE_PRESENCE = 21 - KEV_DL_PROTO_ATTACHED = 14 - KEV_DL_PROTO_DETACHED = 15 - KEV_DL_QOS_MODE_CHANGED = 29 - KEV_DL_RRC_STATE_CHANGED = 28 - KEV_DL_SIFFLAGS = 1 - KEV_DL_SIFGENERIC = 6 - KEV_DL_SIFMEDIA = 5 - KEV_DL_SIFMETRICS = 2 - KEV_DL_SIFMTU = 3 - KEV_DL_SIFPHYS = 4 - KEV_DL_SUBCLASS = 2 - KEV_DL_WAKEFLAGS_CHANGED = 17 - KEV_INET6_ADDR_DELETED = 3 - KEV_INET6_CHANGED_ADDR = 2 - KEV_INET6_DEFROUTER = 6 - KEV_INET6_NEW_LL_ADDR = 4 - KEV_INET6_NEW_RTADV_ADDR = 5 - KEV_INET6_NEW_USER_ADDR = 1 - KEV_INET6_REQUEST_NAT64_PREFIX = 7 - KEV_INET6_SUBCLASS = 6 - KEV_INET_ADDR_DELETED = 3 - KEV_INET_ARPCOLLISION = 7 - KEV_INET_ARPRTRALIVE = 10 - KEV_INET_ARPRTRFAILURE = 9 - KEV_INET_CHANGED_ADDR = 2 - KEV_INET_NEW_ADDR = 1 - KEV_INET_PORTINUSE = 8 - KEV_INET_SIFBRDADDR = 5 - KEV_INET_SIFDSTADDR = 4 - KEV_INET_SIFNETMASK = 6 - KEV_INET_SUBCLASS = 1 - LITTLE_ENDIAN = 1234 - MCAST_BLOCK_SOURCE = 84 - MCAST_EXCLUDE = 2 - MCAST_INCLUDE = 1 - MCAST_JOIN_GROUP = 80 - MCAST_JOIN_SOURCE_GROUP = 82 - MCAST_LEAVE_GROUP = 81 - MCAST_LEAVE_SOURCE_GROUP = 83 - MCAST_UNBLOCK_SOURCE = 85 - MCAST_UNDEFINED = 0 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - NBBY = 8 - NETSVC_MRKNG_LVL_L2 = 1 - NETSVC_MRKNG_LVL_L3L2_ALL = 2 - NETSVC_MRKNG_LVL_L3L2_BK = 3 - NETSVC_MRKNG_UNKNOWN = 0 - NET_MAXID = 40 - NET_RT_DUMP = 1 - NET_RT_DUMP2 = 7 - NET_RT_FLAGS = 2 - NET_RT_FLAGS_PRIV = 10 - NET_RT_IFLIST = 3 - NET_RT_IFLIST2 = 6 - NET_RT_MAXID = 11 - NET_RT_STAT = 4 - NET_RT_TRASH = 5 - NET_SERVICE_TYPE_AV = 6 - NET_SERVICE_TYPE_BE = 0 - NET_SERVICE_TYPE_BK = 1 - NET_SERVICE_TYPE_OAM = 7 - NET_SERVICE_TYPE_RD = 8 - NET_SERVICE_TYPE_RV = 5 - NET_SERVICE_TYPE_SIG = 2 - NET_SERVICE_TYPE_VI = 3 - NET_SERVICE_TYPE_VO = 4 - PDP_ENDIAN = 3412 - PF_APPLETALK = 16 - PF_CCITT = 10 - PF_CHAOS = 5 - PF_CNT = 21 - PF_COIP = 20 - PF_DATAKIT = 9 - PF_DECnet = 12 - PF_DLI = 13 - PF_ECMA = 8 - PF_HYLINK = 15 - PF_IMPLINK = 3 - PF_INET = 2 - PF_INET6 = 30 - PF_IPX = 23 - PF_ISDN = 28 - PF_ISO = 7 - PF_KEY = 29 - PF_LAT = 14 - PF_LINK = 18 - PF_LOCAL = 1 - PF_MAX = 40 - PF_NATM = 31 - PF_NDRV = 27 - PF_NETBIOS = 33 - PF_NS = 6 - PF_OSI = 7 - PF_PIP = 25 - PF_PPP = 34 - PF_PUP = 4 - PF_RESERVED_36 = 36 - PF_ROUTE = 17 - PF_RTIP = 22 - PF_SIP = 24 - PF_SNA = 11 - PF_SYSTEM = 32 - PF_UNIX = 1 - PF_UNSPEC = 0 - PF_UTUN = 38 - PF_XTP = 19 - PTRDIFF_MAX = 9223372036854775807 - PTRDIFF_MIN = -9223372036854775808 - RSIZE_MAX = 9223372036854775807 - SAE_ASSOCID_ANY = 0 - SAE_CONNID_ANY = 0 - SCM_CREDS = 0x03 - SCM_RIGHTS = 0x01 - SCM_TIMESTAMP = 0x02 - SCM_TIMESTAMP_MONOTONIC = 0x04 - SHUT_RD = 0 - SHUT_RDWR = 2 - SHUT_WR = 1 - SIG_ATOMIC_MAX = 2147483647 - SIG_ATOMIC_MIN = -2147483648 - SIN6_LEN = 0 - SIZE_MAX = 18446744073709551615 - SOCK_DGRAM = 2 - SOCK_MAXADDRLEN = 255 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_STREAM = 1 - SOL_SOCKET = 0xffff - SOMAXCONN = 128 - SONPX_SETOPTSHUT = 0x000000001 - SO_ACCEPTCONN = 0x0002 - SO_BROADCAST = 0x0020 - SO_DEBUG = 0x0001 - SO_DONTROUTE = 0x0010 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x0008 - SO_LABEL = 0x1010 - SO_LINGER = 0x0080 - SO_LINGER_SEC = 0x1080 - SO_NETSVC_MARKING_LEVEL = 0x1119 - SO_NET_SERVICE_TYPE = 0x1116 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x0100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x0004 - SO_REUSEPORT = 0x0200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x0400 - SO_TIMESTAMP_MONOTONIC = 0x0800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x0040 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - UINT16_MAX = 65535 - UINT32_MAX = 4294967295 - UINT64_MAX = 18446744073709551615 - UINT8_MAX = 255 - UINTMAX_MAX = 18446744073709551615 - UINTPTR_MAX = 18446744073709551615 - UINT_FAST16_MAX = 65535 - UINT_FAST32_MAX = 4294967295 - UINT_FAST64_MAX = 18446744073709551615 - UINT_FAST8_MAX = 255 - UINT_LEAST16_MAX = 65535 - UINT_LEAST32_MAX = 4294967295 - UINT_LEAST64_MAX = 18446744073709551615 - UINT_LEAST8_MAX = 255 - WCHAR_MAX = 2147483647 - WCHAR_MIN = -2147483648 - WINT_MAX = 2147483647 - WINT_MIN = -2147483648 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_I386__PARAM_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NETINET6_IN6_H_ = 0 - X_NETINET_IN_H_ = 0 - X_NET_NETKEV_H_ = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SA_FAMILY_T = 0 - X_SIZE_T = 0 - X_SOCKLEN_T = 0 - X_SSIZE_T = 0 - X_SS_MAXSIZE = 128 - X_STRUCT_IOVEC = 0 - X_SUSECONDS_T = 0 - X_SYS_SOCKET_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 - Pseudo_AF_HDRCMPLT = 35 - Pseudo_AF_KEY = 29 - Pseudo_AF_PIP = 25 - Pseudo_AF_RTIP = 22 - Pseudo_AF_XTP = 19 + AF_APPLETALK = 16 // socket.h:375:1: + AF_CCITT = 10 // socket.h:369:1: + AF_CHAOS = 5 // socket.h:363:1: + AF_CNT = 21 // socket.h:380:1: + AF_COIP = 20 // socket.h:379:1: + AF_DATAKIT = 9 // socket.h:368:1: + AF_DECnet = 12 // socket.h:371:1: + AF_DLI = 13 // socket.h:372:1: + AF_E164 = 28 // socket.h:387:1: + AF_ECMA = 8 // socket.h:367:1: + AF_HYLINK = 15 // socket.h:374:1: + AF_IEEE80211 = 37 // socket.h:399:1: + AF_IMPLINK = 3 // socket.h:361:1: + AF_INET = 2 // socket.h:359:1: + AF_INET6 = 30 // socket.h:390:1: + AF_IPX = 23 // socket.h:382:1: + AF_ISDN = 28 // socket.h:386:1: + AF_ISO = 7 // socket.h:365:1: + AF_LAT = 14 // socket.h:373:1: + AF_LINK = 18 // socket.h:377:1: + AF_LOCAL = 1 // socket.h:357:1: + AF_MAX = 40 // socket.h:401:1: + AF_NATM = 31 // socket.h:392:1: + AF_NDRV = 27 // socket.h:385:1: + AF_NETBIOS = 33 // socket.h:394:1: + AF_NS = 6 // socket.h:364:1: + AF_OSI = 7 // socket.h:366:1: + AF_PPP = 34 // socket.h:395:1: + AF_PUP = 4 // socket.h:362:1: + AF_RESERVED_36 = 36 // socket.h:398:1: + AF_ROUTE = 17 // socket.h:376:1: + AF_SIP = 24 // socket.h:383:1: + AF_SNA = 11 // socket.h:370:1: + AF_SYSTEM = 32 // socket.h:393:1: + AF_UNIX = 1 // socket.h:355:1: + AF_UNSPEC = 0 // socket.h:354:1: + AF_UTUN = 38 // socket.h:400:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CONNECT_DATA_AUTHENTICATED = 0x4 // socket.h:300:1: + CONNECT_DATA_IDEMPOTENT = 0x2 // socket.h:299:1: + CONNECT_RESUME_ON_READ_WRITE = 0x1 // socket.h:298:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + ICMP6_FILTER = 18 // in6.h:380:1: + ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 // in6.h:615:1: + INADDR_NONE = 0xffffffff // in.h:342:1: + INET6_ADDRSTRLEN = 46 // in6.h:161:1: + INET_ADDRSTRLEN = 16 // in.h:388:1: + INT16_MAX = 32767 // stdint.h:599:1: + INT16_MIN = -32768 // stdint.h:600:1: + INT32_MAX = 2147483647 // stdint.h:555:1: + INT32_MIN = -2147483648 // stdint.h:556:1: + INT64_MAX = 9223372036854775807 // stdint.h:461:1: + INT64_MIN = -9223372036854775808 // stdint.h:462:1: + INT8_MAX = 127 // stdint.h:621:1: + INT8_MIN = -128 // stdint.h:622:1: + INTMAX_MAX = 9223372036854775807 // stdint.h:663:1: + INTMAX_MIN = -9223372036854775808 // stdint.h:662:1: + INTPTR_MAX = 9223372036854775807 // stdint.h:649:1: + INTPTR_MIN = -9223372036854775808 // stdint.h:648:1: + INT_FAST16_MAX = 32767 // stdint.h:615:1: + INT_FAST16_MIN = -32768 // stdint.h:614:1: + INT_FAST32_MAX = 2147483647 // stdint.h:574:1: + INT_FAST32_MIN = -2147483648 // stdint.h:573:1: + INT_FAST64_MAX = 9223372036854775807 // stdint.h:483:1: + INT_FAST64_MIN = -9223372036854775808 // stdint.h:482:1: + INT_FAST8_MAX = 127 // stdint.h:634:1: + INT_FAST8_MIN = -128 // stdint.h:633:1: + INT_LEAST16_MAX = 32767 // stdint.h:612:1: + INT_LEAST16_MIN = -32768 // stdint.h:611:1: + INT_LEAST32_MAX = 2147483647 // stdint.h:571:1: + INT_LEAST32_MIN = -2147483648 // stdint.h:570:1: + INT_LEAST64_MAX = 9223372036854775807 // stdint.h:480:1: + INT_LEAST64_MIN = -9223372036854775808 // stdint.h:479:1: + INT_LEAST8_MAX = 127 // stdint.h:631:1: + INT_LEAST8_MIN = -128 // stdint.h:630:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:317:1: + IN_CLASSA_MAX = 128 // in.h:318:1: + IN_CLASSA_NET = 0xff000000 // in.h:315:1: + IN_CLASSA_NSHIFT = 24 // in.h:316:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:323:1: + IN_CLASSB_MAX = 65536 // in.h:324:1: + IN_CLASSB_NET = 0xffff0000 // in.h:321:1: + IN_CLASSB_NSHIFT = 16 // in.h:322:1: + IN_CLASSC_HOST = 0x000000ff // in.h:329:1: + IN_CLASSC_NET = 0xffffff00 // in.h:327:1: + IN_CLASSC_NSHIFT = 8 // in.h:328:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:334:1: + IN_CLASSD_NET = 0xf0000000 // in.h:332:1: + IN_CLASSD_NSHIFT = 28 // in.h:333:1: + IN_LOOPBACKNET = 127 // in.h:369:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:649:1: + IPCTL_DEFTTL = 3 // in.h:637:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:645:1: + IPCTL_FASTFORWARDING = 14 // in.h:650:1: + IPCTL_FORWARDING = 1 // in.h:635:1: + IPCTL_GIF_TTL = 16 // in.h:652:1: + IPCTL_INTRQDROPS = 11 // in.h:647:1: + IPCTL_INTRQMAXLEN = 10 // in.h:646:1: + IPCTL_KEEPFAITH = 15 // in.h:651:1: + IPCTL_MAXID = 17 // in.h:653:1: + IPCTL_RTEXPIRE = 5 // in.h:641:1: + IPCTL_RTMAXCACHE = 7 // in.h:643:1: + IPCTL_RTMINEXPIRE = 6 // in.h:642:1: + IPCTL_SENDREDIRECTS = 2 // in.h:636:1: + IPCTL_SOURCEROUTE = 8 // in.h:644:1: + IPCTL_STATS = 12 // in.h:648:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:286:1: + IPPORT_HILASTAUTO = 65535 // in.h:287:1: + IPPORT_RESERVED = 1024 // in.h:279:1: + IPPORT_RESERVEDSTART = 600 // in.h:295:1: + IPPORT_USERRESERVED = 5000 // in.h:281:1: + IPPROTO_3PC = 34 // in.h:139:1: + IPPROTO_ADFS = 68 // in.h:173:1: + IPPROTO_AH = 51 // in.h:158:1: + IPPROTO_AHIP = 61 // in.h:166:1: + IPPROTO_APES = 99 // in.h:204:1: + IPPROTO_ARGUS = 13 // in.h:116:1: + IPPROTO_AX25 = 93 // in.h:198:1: + IPPROTO_BHA = 49 // in.h:156:1: + IPPROTO_BLT = 30 // in.h:135:1: + IPPROTO_BRSATMON = 76 // in.h:181:1: + IPPROTO_CFTP = 62 // in.h:167:1: + IPPROTO_CHAOS = 16 // in.h:119:1: + IPPROTO_CMTP = 38 // in.h:143:1: + IPPROTO_CPHB = 73 // in.h:178:1: + IPPROTO_CPNX = 72 // in.h:177:1: + IPPROTO_DDP = 37 // in.h:142:1: + IPPROTO_DGP = 86 // in.h:191:1: + IPPROTO_DIVERT = 254 // in.h:213:1: + IPPROTO_DONE = 257 // in.h:221:1: + IPPROTO_DSTOPTS = 60 // in.h:165:1: + IPPROTO_EGP = 8 // in.h:111:1: + IPPROTO_EMCON = 14 // in.h:117:1: + IPPROTO_ENCAP = 98 // in.h:203:1: + IPPROTO_EON = 80 // in.h:185:1: + IPPROTO_ESP = 50 // in.h:157:1: + IPPROTO_ETHERIP = 97 // in.h:202:1: + IPPROTO_FRAGMENT = 44 // in.h:151:1: + IPPROTO_GGP = 3 // in.h:104:1: + IPPROTO_GMTP = 100 // in.h:205:1: + IPPROTO_GRE = 47 // in.h:154:1: + IPPROTO_HELLO = 63 // in.h:168:1: + IPPROTO_HMP = 20 // in.h:125:1: + IPPROTO_HOPOPTS = 0 // in.h:99:1: + IPPROTO_ICMP = 1 // in.h:101:1: + IPPROTO_ICMPV6 = 58 // in.h:163:1: + IPPROTO_IDP = 22 // in.h:127:1: + IPPROTO_IDPR = 35 // in.h:140:1: + IPPROTO_IDRP = 45 // in.h:152:1: + IPPROTO_IGMP = 2 // in.h:103:1: + IPPROTO_IGP = 85 // in.h:190:1: + IPPROTO_IGRP = 88 // in.h:193:1: + IPPROTO_IL = 40 // in.h:145:1: + IPPROTO_INLSP = 52 // in.h:159:1: + IPPROTO_INP = 32 // in.h:137:1: + IPPROTO_IP = 0 // in.h:97:1: + IPPROTO_IPCOMP = 108 // in.h:208:1: + IPPROTO_IPCV = 71 // in.h:176:1: + IPPROTO_IPEIP = 94 // in.h:199:1: + IPPROTO_IPIP = 4 // in.h:106:1: + IPPROTO_IPPC = 67 // in.h:172:1: + IPPROTO_IPV4 = 4 // in.h:105:1: + IPPROTO_IPV6 = 41 // in.h:147:1: + IPPROTO_IRTP = 28 // in.h:133:1: + IPPROTO_KRYPTOLAN = 65 // in.h:170:1: + IPPROTO_LARP = 91 // in.h:196:1: + IPPROTO_LEAF1 = 25 // in.h:130:1: + IPPROTO_LEAF2 = 26 // in.h:131:1: + IPPROTO_MAX = 256 // in.h:218:1: + IPPROTO_MAXID = 52 // in.h:629:1: + IPPROTO_MEAS = 19 // in.h:124:1: + IPPROTO_MHRP = 48 // in.h:155:1: + IPPROTO_MICP = 95 // in.h:200:1: + IPPROTO_MTP = 92 // in.h:197:1: + IPPROTO_MUX = 18 // in.h:123:1: + IPPROTO_ND = 77 // in.h:182:1: + IPPROTO_NHRP = 54 // in.h:161:1: + IPPROTO_NONE = 59 // in.h:164:1: + IPPROTO_NSP = 31 // in.h:136:1: + IPPROTO_NVPII = 11 // in.h:114:1: + IPPROTO_OSPFIGP = 89 // in.h:194:1: + IPPROTO_PGM = 113 // in.h:209:1: + IPPROTO_PIGP = 9 // in.h:112:1: + IPPROTO_PIM = 103 // in.h:207:1: + IPPROTO_PRM = 21 // in.h:126:1: + IPPROTO_PUP = 12 // in.h:115:1: + IPPROTO_PVP = 75 // in.h:180:1: + IPPROTO_RAW = 255 // in.h:215:1: + IPPROTO_RCCMON = 10 // in.h:113:1: + IPPROTO_RDP = 27 // in.h:132:1: + IPPROTO_ROUTING = 43 // in.h:150:1: + IPPROTO_RSVP = 46 // in.h:153:1: + IPPROTO_RVD = 66 // in.h:171:1: + IPPROTO_SATEXPAK = 64 // in.h:169:1: + IPPROTO_SATMON = 69 // in.h:174:1: + IPPROTO_SCCSP = 96 // in.h:201:1: + IPPROTO_SCTP = 132 // in.h:210:1: + IPPROTO_SDRP = 42 // in.h:149:1: + IPPROTO_SEP = 33 // in.h:138:1: + IPPROTO_SRPC = 90 // in.h:195:1: + IPPROTO_ST = 7 // in.h:110:1: + IPPROTO_SVMTP = 82 // in.h:187:1: + IPPROTO_SWIPE = 53 // in.h:160:1: + IPPROTO_TCF = 87 // in.h:192:1: + IPPROTO_TCP = 6 // in.h:108:1: + IPPROTO_TP = 29 // in.h:134:1: + IPPROTO_TPXX = 39 // in.h:144:1: + IPPROTO_TRUNK1 = 23 // in.h:128:1: + IPPROTO_TRUNK2 = 24 // in.h:129:1: + IPPROTO_TTP = 84 // in.h:189:1: + IPPROTO_UDP = 17 // in.h:121:1: + IPPROTO_VINES = 83 // in.h:188:1: + IPPROTO_VISA = 70 // in.h:175:1: + IPPROTO_VMTP = 81 // in.h:186:1: + IPPROTO_WBEXPAK = 79 // in.h:184:1: + IPPROTO_WBMON = 78 // in.h:183:1: + IPPROTO_WSN = 74 // in.h:179:1: + IPPROTO_XNET = 15 // in.h:118:1: + IPPROTO_XTP = 36 // in.h:141:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:580:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:605:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:585:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:602:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:584:1: + IPV6CTL_DEFHLIM = 3 // in6.h:569:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:586:1: + IPV6CTL_FORWARDING = 1 // in6.h:567:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:573:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:587:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:583:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:588:1: + IPV6CTL_KEEPFAITH = 13 // in6.h:581:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:582:1: + IPV6CTL_MAXDYNROUTES = 49 // in6.h:614:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:577:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:608:1: + IPV6CTL_MAXID = 51 // in6.h:619:1: + IPV6CTL_MAXIFDEFROUTERS = 48 // in6.h:613:1: + IPV6CTL_MAXIFPREFIXES = 47 // in6.h:612:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:609:1: + IPV6CTL_MRTPROTO = 8 // in6.h:576:1: + IPV6CTL_MRTSTATS = 7 // in6.h:575:1: + IPV6CTL_NEIGHBORGCTHRESH = 46 // in6.h:611:1: + IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:604:1: + IPV6CTL_RIP6STATS = 36 // in6.h:603:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:590:1: + IPV6CTL_RTEXPIRE = 25 // in6.h:595:1: + IPV6CTL_RTMAXCACHE = 27 // in6.h:597:1: + IPV6CTL_RTMINEXPIRE = 26 // in6.h:596:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:568:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:578:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:579:1: + IPV6CTL_STATS = 6 // in6.h:574:1: + IPV6CTL_TEMPPLTIME = 33 // in6.h:600:1: + IPV6CTL_TEMPVLTIME = 34 // in6.h:601:1: + IPV6CTL_USETEMPADDR = 32 // in6.h:599:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:606:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:589:1: + IPV6CTL_V6ONLY = 24 // in6.h:594:1: + IPV6PORT_ANONMAX = 65535 // in6.h:143:1: + IPV6PORT_ANONMIN = 49152 // in6.h:142:1: + IPV6PORT_RESERVED = 1024 // in6.h:141:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:145:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:144:1: + IPV6PROTO_MAXID = 104 // in6.h:562:1: + IPV6_2292DSTOPTS = 23 // in6.h:385:1: + IPV6_2292HOPLIMIT = 20 // in6.h:382:1: + IPV6_2292HOPOPTS = 22 // in6.h:384:1: + IPV6_2292NEXTHOP = 21 // in6.h:383:1: + IPV6_2292PKTINFO = 19 // in6.h:381:1: + IPV6_2292PKTOPTIONS = 25 // in6.h:389:1: + IPV6_2292RTHDR = 24 // in6.h:386:1: + IPV6_BINDV6ONLY = 27 // in6.h:405:1: + IPV6_BOUND_IF = 125 // in6.h:494:1: + IPV6_CHECKSUM = 26 // in6.h:401:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:506:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:507:1: + IPV6_FAITH = 29 // in6.h:411:1: + IPV6_FW_ADD = 30 // in6.h:414:1: + IPV6_FW_DEL = 31 // in6.h:415:1: + IPV6_FW_FLUSH = 32 // in6.h:416:1: + IPV6_FW_GET = 34 // in6.h:418:1: + IPV6_FW_ZERO = 33 // in6.h:417:1: + IPV6_IPSEC_POLICY = 28 // in6.h:409:1: + IPV6_JOIN_GROUP = 12 // in6.h:375:1: + IPV6_LEAVE_GROUP = 13 // in6.h:376:1: + IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:521:1: + IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:515:1: + IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:522:1: + IPV6_MIN_MEMBERSHIPS = 31 // in6.h:514:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:373:1: + IPV6_MULTICAST_IF = 9 // in6.h:372:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:374:1: + IPV6_PORTRANGE = 14 // in6.h:379:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:552:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:553:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:554:1: + IPV6_RECVTCLASS = 35 // in6.h:426:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:499:1: + IPV6_RTHDR_STRICT = 1 // in6.h:500:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:501:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:369:1: + IPV6_TCLASS = 36 // in6.h:427:1: + IPV6_UNICAST_HOPS = 4 // in6.h:371:1: + IPV6_V6ONLY = 27 // in6.h:403:1: + IP_ADD_MEMBERSHIP = 12 // in.h:418:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:464:1: + IP_BLOCK_SOURCE = 72 // in.h:466:1: + IP_BOUND_IF = 25 // in.h:434:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:485:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:484:1: + IP_DROP_MEMBERSHIP = 13 // in.h:419:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:455:1: + IP_DUMMYNET_DEL = 61 // in.h:456:1: + IP_DUMMYNET_FLUSH = 62 // in.h:457:1: + IP_DUMMYNET_GET = 64 // in.h:458:1: + IP_FAITH = 22 // in.h:429:1: + IP_FW_ADD = 40 // in.h:439:1: + IP_FW_DEL = 41 // in.h:440:1: + IP_FW_FLUSH = 42 // in.h:441:1: + IP_FW_GET = 44 // in.h:443:1: + IP_FW_RESETLOG = 45 // in.h:444:1: + IP_FW_ZERO = 43 // in.h:442:1: + IP_HDRINCL = 2 // in.h:408:1: + IP_IPSEC_POLICY = 21 // in.h:428:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:499:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:493:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:501:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:500:1: + IP_MIN_MEMBERSHIPS = 31 // in.h:492:1: + IP_MSFILTER = 74 // in.h:470:1: + IP_MULTICAST_IF = 9 // in.h:415:1: + IP_MULTICAST_IFINDEX = 66 // in.h:461:1: + IP_MULTICAST_LOOP = 11 // in.h:417:1: + IP_MULTICAST_TTL = 10 // in.h:416:1: + IP_MULTICAST_VIF = 14 // in.h:420:1: + IP_NAT__XXX = 55 // in.h:452:1: + IP_OLD_FW_ADD = 50 // in.h:447:1: + IP_OLD_FW_DEL = 51 // in.h:448:1: + IP_OLD_FW_FLUSH = 52 // in.h:449:1: + IP_OLD_FW_GET = 54 // in.h:451:1: + IP_OLD_FW_RESETLOG = 56 // in.h:453:1: + IP_OLD_FW_ZERO = 53 // in.h:450:1: + IP_OPTIONS = 1 // in.h:407:1: + IP_PKTINFO = 26 // in.h:435:1: + IP_PORTRANGE = 19 // in.h:425:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:593:1: + IP_PORTRANGE_HIGH = 1 // in.h:594:1: + IP_PORTRANGE_LOW = 2 // in.h:595:1: + IP_RECVDSTADDR = 7 // in.h:413:1: + IP_RECVIF = 20 // in.h:426:1: + IP_RECVOPTS = 5 // in.h:411:1: + IP_RECVPKTINFO = 26 // in.h:436:1: + IP_RECVRETOPTS = 6 // in.h:412:1: + IP_RECVTOS = 27 // in.h:437:1: + IP_RECVTTL = 24 // in.h:433:1: + IP_RETOPTS = 8 // in.h:414:1: + IP_RSVP_OFF = 16 // in.h:422:1: + IP_RSVP_ON = 15 // in.h:421:1: + IP_RSVP_VIF_OFF = 18 // in.h:424:1: + IP_RSVP_VIF_ON = 17 // in.h:423:1: + IP_STRIPHDR = 23 // in.h:431:1: + IP_TOS = 3 // in.h:409:1: + IP_TRAFFIC_MGT_BACKGROUND = 65 // in.h:460:1: + IP_TTL = 4 // in.h:410:1: + IP_UNBLOCK_SOURCE = 73 // in.h:467:1: + KEV_DL_ADDMULTI = 7 // net_kev.h:61:1: + KEV_DL_AWDL_RESTRICTED = 26 // net_kev.h:80:1: + KEV_DL_AWDL_UNRESTRICTED = 27 // net_kev.h:81:1: + KEV_DL_DELMULTI = 8 // net_kev.h:62:1: + KEV_DL_IFCAP_CHANGED = 19 // net_kev.h:73:1: + KEV_DL_IFDELEGATE_CHANGED = 25 // net_kev.h:79:1: + KEV_DL_IF_ATTACHED = 9 // net_kev.h:63:1: + KEV_DL_IF_DETACHED = 11 // net_kev.h:65:1: + KEV_DL_IF_DETACHING = 10 // net_kev.h:64:1: + KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 // net_kev.h:72:1: + KEV_DL_ISSUES = 24 // net_kev.h:78:1: + KEV_DL_LINK_ADDRESS_CHANGED = 16 // net_kev.h:70:1: + KEV_DL_LINK_OFF = 12 // net_kev.h:66:1: + KEV_DL_LINK_ON = 13 // net_kev.h:67:1: + KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 // net_kev.h:74:1: + KEV_DL_LOW_POWER_MODE_CHANGED = 30 // net_kev.h:84:1: + KEV_DL_MASTER_ELECTED = 23 // net_kev.h:77:1: + KEV_DL_NODE_ABSENCE = 22 // net_kev.h:76:1: + KEV_DL_NODE_PRESENCE = 21 // net_kev.h:75:1: + KEV_DL_PROTO_ATTACHED = 14 // net_kev.h:68:1: + KEV_DL_PROTO_DETACHED = 15 // net_kev.h:69:1: + KEV_DL_QOS_MODE_CHANGED = 29 // net_kev.h:83:1: + KEV_DL_RRC_STATE_CHANGED = 28 // net_kev.h:82:1: + KEV_DL_SIFFLAGS = 1 // net_kev.h:55:1: + KEV_DL_SIFGENERIC = 6 // net_kev.h:60:1: + KEV_DL_SIFMEDIA = 5 // net_kev.h:59:1: + KEV_DL_SIFMETRICS = 2 // net_kev.h:56:1: + KEV_DL_SIFMTU = 3 // net_kev.h:57:1: + KEV_DL_SIFPHYS = 4 // net_kev.h:58:1: + KEV_DL_SUBCLASS = 2 // net_kev.h:50:1: + KEV_DL_WAKEFLAGS_CHANGED = 17 // net_kev.h:71:1: + KEV_INET6_ADDR_DELETED = 3 // net_kev.h:91:1: + KEV_INET6_CHANGED_ADDR = 2 // net_kev.h:90:1: + KEV_INET6_DEFROUTER = 6 // net_kev.h:94:1: + KEV_INET6_NEW_LL_ADDR = 4 // net_kev.h:92:1: + KEV_INET6_NEW_RTADV_ADDR = 5 // net_kev.h:93:1: + KEV_INET6_NEW_USER_ADDR = 1 // net_kev.h:89:1: + KEV_INET6_REQUEST_NAT64_PREFIX = 7 // net_kev.h:95:1: + KEV_INET6_SUBCLASS = 6 // net_kev.h:87:1: + KEV_INET_ADDR_DELETED = 3 // net_kev.h:39:1: + KEV_INET_ARPCOLLISION = 7 // net_kev.h:43:1: + KEV_INET_ARPRTRALIVE = 10 // net_kev.h:48:1: + KEV_INET_ARPRTRFAILURE = 9 // net_kev.h:47:1: + KEV_INET_CHANGED_ADDR = 2 // net_kev.h:38:1: + KEV_INET_NEW_ADDR = 1 // net_kev.h:37:1: + KEV_INET_PORTINUSE = 8 // net_kev.h:45:1: + KEV_INET_SIFBRDADDR = 5 // net_kev.h:41:1: + KEV_INET_SIFDSTADDR = 4 // net_kev.h:40:1: + KEV_INET_SIFNETMASK = 6 // net_kev.h:42:1: + KEV_INET_SUBCLASS = 1 // net_kev.h:35:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MCAST_BLOCK_SOURCE = 84 // in.h:477:1: + MCAST_EXCLUDE = 2 // in.h:587:1: + MCAST_INCLUDE = 1 // in.h:586:1: + MCAST_JOIN_GROUP = 80 // in.h:473:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:475:1: + MCAST_LEAVE_GROUP = 81 // in.h:474:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:476:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:478:1: + MCAST_UNDEFINED = 0 // in.h:585:1: + MSG_CTRUNC = 0x20 // socket.h:563:1: + MSG_DONTROUTE = 0x4 // socket.h:560:1: + MSG_DONTWAIT = 0x80 // socket.h:566:1: + MSG_EOF = 0x100 // socket.h:567:1: + MSG_EOR = 0x8 // socket.h:561:1: + MSG_FLUSH = 0x400 // socket.h:572:1: + MSG_HAVEMORE = 0x2000 // socket.h:575:1: + MSG_HOLD = 0x800 // socket.h:573:1: + MSG_NEEDSA = 0x10000 // socket.h:578:1: + MSG_OOB = 0x1 // socket.h:558:1: + MSG_PEEK = 0x2 // socket.h:559:1: + MSG_RCVMORE = 0x4000 // socket.h:576:1: + MSG_SEND = 0x1000 // socket.h:574:1: + MSG_TRUNC = 0x10 // socket.h:562:1: + MSG_WAITALL = 0x40 // socket.h:564:1: + MSG_WAITSTREAM = 0x200 // socket.h:570:1: + NBBY = 8 // types.h:186:1: + NETSVC_MRKNG_LVL_L2 = 1 // socket.h:283:1: + NETSVC_MRKNG_LVL_L3L2_ALL = 2 // socket.h:284:1: + NETSVC_MRKNG_LVL_L3L2_BK = 3 // socket.h:285:1: + NETSVC_MRKNG_UNKNOWN = 0 // socket.h:282:1: + NET_MAXID = 40 // socket.h:506:1: + NET_RT_DUMP = 1 // socket.h:519:1: + NET_RT_DUMP2 = 7 // socket.h:525:1: + NET_RT_FLAGS = 2 // socket.h:520:1: + NET_RT_FLAGS_PRIV = 10 // socket.h:530:1: + NET_RT_IFLIST = 3 // socket.h:521:1: + NET_RT_IFLIST2 = 6 // socket.h:524:1: + NET_RT_MAXID = 11 // socket.h:531:1: + NET_RT_STAT = 4 // socket.h:522:1: + NET_RT_TRASH = 5 // socket.h:523:1: + NET_SERVICE_TYPE_AV = 6 // socket.h:276:1: + NET_SERVICE_TYPE_BE = 0 // socket.h:270:1: + NET_SERVICE_TYPE_BK = 1 // socket.h:271:1: + NET_SERVICE_TYPE_OAM = 7 // socket.h:277:1: + NET_SERVICE_TYPE_RD = 8 // socket.h:278:1: + NET_SERVICE_TYPE_RV = 5 // socket.h:275:1: + NET_SERVICE_TYPE_SIG = 2 // socket.h:272:1: + NET_SERVICE_TYPE_VI = 3 // socket.h:273:1: + NET_SERVICE_TYPE_VO = 4 // socket.h:274:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + PF_APPLETALK = 16 // socket.h:469:1: + PF_CCITT = 10 // socket.h:463:1: + PF_CHAOS = 5 // socket.h:457:1: + PF_CNT = 21 // socket.h:474:1: + PF_COIP = 20 // socket.h:473:1: + PF_DATAKIT = 9 // socket.h:462:1: + PF_DECnet = 12 // socket.h:465:1: + PF_DLI = 13 // socket.h:466:1: + PF_ECMA = 8 // socket.h:461:1: + PF_HYLINK = 15 // socket.h:468:1: + PF_IMPLINK = 3 // socket.h:455:1: + PF_INET = 2 // socket.h:454:1: + PF_INET6 = 30 // socket.h:482:1: + PF_IPX = 23 // socket.h:476:1: + PF_ISDN = 28 // socket.h:480:1: + PF_ISO = 7 // socket.h:459:1: + PF_KEY = 29 // socket.h:481:1: + PF_LAT = 14 // socket.h:467:1: + PF_LINK = 18 // socket.h:471:1: + PF_LOCAL = 1 // socket.h:452:1: + PF_MAX = 40 // socket.h:489:1: + PF_NATM = 31 // socket.h:483:1: + PF_NDRV = 27 // socket.h:479:1: + PF_NETBIOS = 33 // socket.h:485:1: + PF_NS = 6 // socket.h:458:1: + PF_OSI = 7 // socket.h:460:1: + PF_PIP = 25 // socket.h:478:1: + PF_PPP = 34 // socket.h:486:1: + PF_PUP = 4 // socket.h:456:1: + PF_RESERVED_36 = 36 // socket.h:487:1: + PF_ROUTE = 17 // socket.h:470:1: + PF_RTIP = 22 // socket.h:477:1: + PF_SIP = 24 // socket.h:475:1: + PF_SNA = 11 // socket.h:464:1: + PF_SYSTEM = 32 // socket.h:484:1: + PF_UNIX = 1 // socket.h:453:1: + PF_UNSPEC = 0 // socket.h:451:1: + PF_UTUN = 38 // socket.h:488:1: + PF_XTP = 19 // socket.h:472:1: + PTRDIFF_MAX = 9223372036854775807 // stdint.h:652:1: + PTRDIFF_MIN = -9223372036854775808 // stdint.h:651:1: + RSIZE_MAX = 9223372036854775807 // stdint.h:658:1: + SAE_ASSOCID_ANY = 0 // socket.h:290:1: + SAE_CONNID_ANY = 0 // socket.h:294:1: + SCM_CREDS = 0x03 // socket.h:661:1: + SCM_RIGHTS = 0x01 // socket.h:658:1: + SCM_TIMESTAMP = 0x02 // socket.h:660:1: + SCM_TIMESTAMP_MONOTONIC = 0x04 // socket.h:662:1: + SHUT_RD = 0 // socket.h:670:1: + SHUT_RDWR = 2 // socket.h:672:1: + SHUT_WR = 1 // socket.h:671:1: + SIG_ATOMIC_MAX = 2147483647 // stdint.h:668:1: + SIG_ATOMIC_MIN = -2147483648 // stdint.h:667:1: + SIN6_LEN = 0 // in6.h:167:1: + SIZE_MAX = 18446744073709551615 // stdint.h:653:1: + SOCK_DGRAM = 2 // socket.h:112:1: + SOCK_MAXADDRLEN = 255 // socket.h:414:1: + SOCK_RAW = 3 // socket.h:113:1: + SOCK_RDM = 4 // socket.h:115:1: + SOCK_SEQPACKET = 5 // socket.h:117:1: + SOCK_STREAM = 1 // socket.h:111:1: + SOL_SOCKET = 0xffff // socket.h:348:1: + SOMAXCONN = 128 // socket.h:540:1: + SONPX_SETOPTSHUT = 0x000000001 // socket.h:338:1: + SO_ACCEPTCONN = 0x0002 // socket.h:123:1: + SO_BROADCAST = 0x0020 // socket.h:127:1: + SO_DEBUG = 0x0001 // socket.h:122:1: + SO_DONTROUTE = 0x0010 // socket.h:126:1: + SO_DONTTRUNC = 0x2000 // socket.h:142:1: + SO_ERROR = 0x1007 // socket.h:160:1: + SO_KEEPALIVE = 0x0008 // socket.h:125:1: + SO_LABEL = 0x1010 // socket.h:163:1: + SO_LINGER = 0x0080 // socket.h:130:1: + SO_LINGER_SEC = 0x1080 // socket.h:176:1: + SO_NETSVC_MARKING_LEVEL = 0x1119 // socket.h:185:1: + SO_NET_SERVICE_TYPE = 0x1116 // socket.h:182:1: + SO_NKE = 0x1021 // socket.h:167:1: + SO_NOADDRERR = 0x1023 // socket.h:169:1: + SO_NOSIGPIPE = 0x1022 // socket.h:168:1: + SO_NOTIFYCONFLICT = 0x1026 // socket.h:173:1: + SO_NP_EXTENSIONS = 0x1083 // socket.h:178:1: + SO_NREAD = 0x1020 // socket.h:166:1: + SO_NUMRCVPKT = 0x1112 // socket.h:181:1: + SO_NWRITE = 0x1024 // socket.h:170:1: + SO_OOBINLINE = 0x0100 // socket.h:134:1: + SO_PEERLABEL = 0x1011 // socket.h:164:1: + SO_RANDOMPORT = 0x1082 // socket.h:177:1: + SO_RCVBUF = 0x1002 // socket.h:155:1: + SO_RCVLOWAT = 0x1004 // socket.h:157:1: + SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_REUSEADDR = 0x0004 // socket.h:124:1: + SO_REUSEPORT = 0x0200 // socket.h:136:1: + SO_REUSESHAREUID = 0x1025 // socket.h:171:1: + SO_SNDBUF = 0x1001 // socket.h:154:1: + SO_SNDLOWAT = 0x1003 // socket.h:156:1: + SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_TIMESTAMP = 0x0400 // socket.h:137:1: + SO_TIMESTAMP_MONOTONIC = 0x0800 // socket.h:138:1: + SO_TYPE = 0x1008 // socket.h:161:1: + SO_UPCALLCLOSEWAIT = 0x1027 // socket.h:174:1: + SO_USELOOPBACK = 0x0040 // socket.h:129:1: + SO_WANTMORE = 0x4000 // socket.h:144:1: + SO_WANTOOBFLAG = 0x8000 // socket.h:145:1: + UINT16_MAX = 65535 // stdint.h:601:1: + UINT32_MAX = 4294967295 // stdint.h:557:1: + UINT64_MAX = 18446744073709551615 // stdint.h:463:1: + UINT8_MAX = 255 // stdint.h:623:1: + UINTMAX_MAX = 18446744073709551615 // stdint.h:664:1: + UINTPTR_MAX = 18446744073709551615 // stdint.h:650:1: + UINT_FAST16_MAX = 65535 // stdint.h:616:1: + UINT_FAST32_MAX = 4294967295 // stdint.h:575:1: + UINT_FAST64_MAX = 18446744073709551615 // stdint.h:484:1: + UINT_FAST8_MAX = 255 // stdint.h:635:1: + UINT_LEAST16_MAX = 65535 // stdint.h:613:1: + UINT_LEAST32_MAX = 4294967295 // stdint.h:572:1: + UINT_LEAST64_MAX = 18446744073709551615 // stdint.h:481:1: + UINT_LEAST8_MAX = 255 // stdint.h:632:1: + WCHAR_MAX = 2147483647 // stdint.h:678:1: + WCHAR_MIN = -2147483648 // stdint.h:682:1: + WINT_MAX = 2147483647 // stdint.h:674:1: + WINT_MIN = -2147483648 // stdint.h:673:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_I386__PARAM_H_ = 0 // _param.h:30:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // stdint.h:251:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NETINET6_IN6_H_ = 0 // in6.h:99:1: + X_NETINET_IN_H_ = 0 // in.h:65:1: + X_NET_NETKEV_H_ = 0 // net_kev.h:30:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SA_FAMILY_T = 0 // _sa_family_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SOCKLEN_T = 0 // _socklen_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SS_MAXSIZE = 128 // socket.h:429:1: + X_STRUCT_IOVEC = 0 // _iovec_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SOCKET_H_ = 0 // socket.h:73:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // stdint.h:257:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: + Pseudo_AF_HDRCMPLT = 35 // socket.h:396:1: + Pseudo_AF_KEY = 29 // socket.h:388:1: + Pseudo_AF_PIP = 25 // socket.h:384:1: + Pseudo_AF_RTIP = 22 // socket.h:381:1: + Pseudo_AF_XTP = 19 // socket.h:378:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go b/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go index 070fa047c8..08eeb70a72 100644 --- a/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go +++ b/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netinet/in/in_freebsd_386.go -pkgname in', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netinet/in/in_openbsd_386.go -pkgname in', DO NOT EDIT. package in @@ -15,396 +15,275 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // _endian.h:70:1: - BYTE_ORDER = 1234 // _endian.h:72:1: - ICMP6_FILTER = 18 // in6.h:420:1: - ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 // in6.h:638:1: - INET6_ADDRSTRLEN = 46 // in6.h:112:1: - INET_ADDRSTRLEN = 16 // in.h:130:1: - IN_CLASSA_HOST = 0x00ffffff // in.h:357:1: - IN_CLASSA_MAX = 128 // in.h:358:1: - IN_CLASSA_NET = 0xff000000 // in.h:355:1: - IN_CLASSA_NSHIFT = 24 // in.h:356:1: - IN_CLASSB_HOST = 0x0000ffff // in.h:363:1: - IN_CLASSB_MAX = 65536 // in.h:364:1: - IN_CLASSB_NET = 0xffff0000 // in.h:361:1: - IN_CLASSB_NSHIFT = 16 // in.h:362:1: - IN_CLASSC_HOST = 0x000000ff // in.h:369:1: - IN_CLASSC_NET = 0xffffff00 // in.h:367:1: - IN_CLASSC_NSHIFT = 8 // in.h:368:1: - IN_CLASSD_HOST = 0x0fffffff // in.h:379:1: - IN_CLASSD_NET = 0xf0000000 // in.h:377:1: - IN_CLASSD_NSHIFT = 28 // in.h:378:1: - IN_HISTORICAL_NETS = 0 // in.h:351:1: - IN_LOOPBACKNET = 127 // in.h:412:1: - IN_NETMASK_DEFAULT = 0xffffff00 // in.h:372:1: - IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:646:1: - IPCTL_DEFTTL = 3 // in.h:634:1: - IPCTL_DIRECTEDBROADCAST = 9 // in.h:642:1: - IPCTL_FASTFORWARDING = 14 // in.h:647:1: - IPCTL_FORWARDING = 1 // in.h:632:1: - IPCTL_GIF_TTL = 16 // in.h:649:1: - IPCTL_INTRDQDROPS = 18 // in.h:651:1: - IPCTL_INTRDQMAXLEN = 17 // in.h:650:1: - IPCTL_INTRQDROPS = 11 // in.h:644:1: - IPCTL_INTRQMAXLEN = 10 // in.h:643:1: - IPCTL_SENDREDIRECTS = 2 // in.h:633:1: - IPCTL_SOURCEROUTE = 8 // in.h:641:1: - IPCTL_STATS = 12 // in.h:645:1: - IPPORT_EPHEMERALFIRST = 10000 // in.h:325:1: - IPPORT_EPHEMERALLAST = 65535 // in.h:326:1: - IPPORT_HIFIRSTAUTO = 49152 // in.h:331:1: - IPPORT_HILASTAUTO = 65535 // in.h:332:1: - IPPORT_MAX = 65535 // in.h:342:1: - IPPORT_RESERVED = 1024 // in.h:320:1: - IPPORT_RESERVEDSTART = 600 // in.h:340:1: - IPPROTO_3PC = 34 // in.h:173:1: - IPPROTO_ADFS = 68 // in.h:206:1: - IPPROTO_AH = 51 // in.h:189:1: - IPPROTO_AHIP = 61 // in.h:199:1: - IPPROTO_APES = 99 // in.h:237:1: - IPPROTO_ARGUS = 13 // in.h:153:1: - IPPROTO_AX25 = 93 // in.h:231:1: - IPPROTO_BHA = 49 // in.h:187:1: - IPPROTO_BLT = 30 // in.h:169:1: - IPPROTO_BRSATMON = 76 // in.h:214:1: - IPPROTO_CARP = 112 // in.h:247:1: - IPPROTO_CFTP = 62 // in.h:200:1: - IPPROTO_CHAOS = 16 // in.h:156:1: - IPPROTO_CMTP = 38 // in.h:177:1: - IPPROTO_CPHB = 73 // in.h:211:1: - IPPROTO_CPNX = 72 // in.h:210:1: - IPPROTO_DCCP = 33 // in.h:172:1: - IPPROTO_DDP = 37 // in.h:176:1: - IPPROTO_DGP = 86 // in.h:224:1: - IPPROTO_DIVERT = 258 // in.h:262:1: - IPPROTO_DONE = 257 // in.h:259:1: - IPPROTO_DSTOPTS = 60 // in.h:198:1: - IPPROTO_EGP = 8 // in.h:148:1: - IPPROTO_EMCON = 14 // in.h:154:1: - IPPROTO_ENCAP = 98 // in.h:236:1: - IPPROTO_EON = 80 // in.h:218:1: - IPPROTO_ESP = 50 // in.h:188:1: - IPPROTO_ETHERIP = 97 // in.h:235:1: - IPPROTO_FRAGMENT = 44 // in.h:182:1: - IPPROTO_GGP = 3 // in.h:144:1: - IPPROTO_GMTP = 100 // in.h:238:1: - IPPROTO_GRE = 47 // in.h:185:1: - IPPROTO_HELLO = 63 // in.h:201:1: - IPPROTO_HIP = 139 // in.h:243:1: - IPPROTO_HMP = 20 // in.h:159:1: - IPPROTO_HOPOPTS = 0 // in.h:142:1: - IPPROTO_ICMP = 1 // in.h:44:1: - IPPROTO_ICMPV6 = 58 // in.h:196:1: - IPPROTO_IDP = 22 // in.h:161:1: - IPPROTO_IDPR = 35 // in.h:174:1: - IPPROTO_IDRP = 45 // in.h:183:1: - IPPROTO_IGMP = 2 // in.h:143:1: - IPPROTO_IGP = 85 // in.h:223:1: - IPPROTO_IGRP = 88 // in.h:226:1: - IPPROTO_IL = 40 // in.h:179:1: - IPPROTO_INLSP = 52 // in.h:190:1: - IPPROTO_INP = 32 // in.h:171:1: - IPPROTO_IP = 0 // in.h:43:1: - IPPROTO_IPCOMP = 108 // in.h:239:1: - IPPROTO_IPCV = 71 // in.h:209:1: - IPPROTO_IPEIP = 94 // in.h:232:1: - IPPROTO_IPIP = 4 // in.h:146:1: - IPPROTO_IPPC = 67 // in.h:205:1: - IPPROTO_IPV4 = 4 // in.h:145:1: - IPPROTO_IPV6 = 41 // in.h:128:1: - IPPROTO_IRTP = 28 // in.h:167:1: - IPPROTO_KRYPTOLAN = 65 // in.h:203:1: - IPPROTO_LARP = 91 // in.h:229:1: - IPPROTO_LEAF1 = 25 // in.h:164:1: - IPPROTO_LEAF2 = 26 // in.h:165:1: - IPPROTO_MAX = 256 // in.h:256:1: - IPPROTO_MEAS = 19 // in.h:158:1: - IPPROTO_MH = 135 // in.h:241:1: - IPPROTO_MHRP = 48 // in.h:186:1: - IPPROTO_MICP = 95 // in.h:233:1: - IPPROTO_MOBILE = 55 // in.h:193:1: - IPPROTO_MPLS = 137 // in.h:249:1: - IPPROTO_MTP = 92 // in.h:230:1: - IPPROTO_MUX = 18 // in.h:157:1: - IPPROTO_ND = 77 // in.h:215:1: - IPPROTO_NHRP = 54 // in.h:192:1: - IPPROTO_NONE = 59 // in.h:197:1: - IPPROTO_NSP = 31 // in.h:170:1: - IPPROTO_NVPII = 11 // in.h:151:1: - IPPROTO_OLD_DIVERT = 254 // in.h:255:1: - IPPROTO_OSPFIGP = 89 // in.h:227:1: - IPPROTO_PFSYNC = 240 // in.h:250:1: - IPPROTO_PGM = 113 // in.h:248:1: - IPPROTO_PIGP = 9 // in.h:149:1: - IPPROTO_PIM = 103 // in.h:246:1: - IPPROTO_PRM = 21 // in.h:160:1: - IPPROTO_PUP = 12 // in.h:152:1: - IPPROTO_PVP = 75 // in.h:213:1: - IPPROTO_RAW = 255 // in.h:129:1: - IPPROTO_RCCMON = 10 // in.h:150:1: - IPPROTO_RDP = 27 // in.h:166:1: - IPPROTO_RESERVED_253 = 253 // in.h:251:1: - IPPROTO_RESERVED_254 = 254 // in.h:252:1: - IPPROTO_ROUTING = 43 // in.h:181:1: - IPPROTO_RSVP = 46 // in.h:184:1: - IPPROTO_RVD = 66 // in.h:204:1: - IPPROTO_SATEXPAK = 64 // in.h:202:1: - IPPROTO_SATMON = 69 // in.h:207:1: - IPPROTO_SCCSP = 96 // in.h:234:1: - IPPROTO_SCTP = 132 // in.h:240:1: - IPPROTO_SDRP = 42 // in.h:180:1: - IPPROTO_SEND = 259 // in.h:263:1: - IPPROTO_SHIM6 = 140 // in.h:244:1: - IPPROTO_SKIP = 57 // in.h:195:1: - IPPROTO_SPACER = 32767 // in.h:269:1: - IPPROTO_SRPC = 90 // in.h:228:1: - IPPROTO_ST = 7 // in.h:147:1: - IPPROTO_SVMTP = 82 // in.h:220:1: - IPPROTO_SWIPE = 53 // in.h:191:1: - IPPROTO_TCF = 87 // in.h:225:1: - IPPROTO_TCP = 6 // in.h:45:1: - IPPROTO_TLSP = 56 // in.h:194:1: - IPPROTO_TP = 29 // in.h:168:1: - IPPROTO_TPXX = 39 // in.h:178:1: - IPPROTO_TRUNK1 = 23 // in.h:162:1: - IPPROTO_TRUNK2 = 24 // in.h:163:1: - IPPROTO_TTP = 84 // in.h:222:1: - IPPROTO_UDP = 17 // in.h:46:1: - IPPROTO_UDPLITE = 136 // in.h:242:1: - IPPROTO_VINES = 83 // in.h:221:1: - IPPROTO_VISA = 70 // in.h:208:1: - IPPROTO_VMTP = 81 // in.h:219:1: - IPPROTO_WBEXPAK = 79 // in.h:217:1: - IPPROTO_WBMON = 78 // in.h:216:1: - IPPROTO_WSN = 74 // in.h:212:1: - IPPROTO_XNET = 15 // in.h:155:1: - IPPROTO_XTP = 36 // in.h:175:1: - IPV6CTL_ACCEPT_RTADV = 12 // in6.h:599:1: - IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:624:1: - IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:604:1: - IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:621:1: - IPV6CTL_DAD_COUNT = 16 // in6.h:603:1: - IPV6CTL_DEFHLIM = 3 // in6.h:588:1: - IPV6CTL_DEFMCASTHLIM = 18 // in6.h:605:1: - IPV6CTL_FORWARDING = 1 // in6.h:586:1: - IPV6CTL_FORWSRCRT = 5 // in6.h:592:1: - IPV6CTL_GIF_HLIM = 19 // in6.h:606:1: - IPV6CTL_HDRNESTLIMIT = 15 // in6.h:602:1: - IPV6CTL_INTRDQMAXLEN = 52 // in6.h:645:1: - IPV6CTL_INTRQMAXLEN = 51 // in6.h:644:1: - IPV6CTL_KAME_VERSION = 20 // in6.h:607:1: - IPV6CTL_LOG_INTERVAL = 14 // in6.h:601:1: - IPV6CTL_MAXFRAGBUCKETSIZE = 54 // in6.h:648:1: - IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:596:1: - IPV6CTL_MAXFRAGS = 41 // in6.h:627:1: - IPV6CTL_MAXFRAGSPERPACKET = 53 // in6.h:647:1: - IPV6CTL_MAXID = 55 // in6.h:649:1: - IPV6CTL_MCAST_PMTU = 44 // in6.h:632:1: - IPV6CTL_MRTPROTO = 8 // in6.h:595:1: - IPV6CTL_MRTSTATS = 7 // in6.h:594:1: - IPV6CTL_NORBIT_RAIF = 49 // in6.h:640:1: - IPV6CTL_NO_RADR = 48 // in6.h:639:1: - IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:623:1: - IPV6CTL_RFC6204W3 = 50 // in6.h:642:1: - IPV6CTL_RIP6STATS = 36 // in6.h:622:1: - IPV6CTL_RR_PRUNE = 22 // in6.h:609:1: - IPV6CTL_SENDREDIRECTS = 2 // in6.h:587:1: - IPV6CTL_SOURCECHECK = 10 // in6.h:597:1: - IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:598:1: - IPV6CTL_STATS = 6 // in6.h:593:1: - IPV6CTL_STEALTH = 45 // in6.h:636:1: - IPV6CTL_TEMPPLTIME = 33 // in6.h:619:1: - IPV6CTL_TEMPVLTIME = 34 // in6.h:620:1: - IPV6CTL_USETEMPADDR = 32 // in6.h:618:1: - IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:625:1: - IPV6CTL_USE_DEPRECATED = 21 // in6.h:608:1: - IPV6CTL_V6ONLY = 24 // in6.h:613:1: - IPV6PORT_ANONMAX = 65535 // in6.h:89:1: - IPV6PORT_ANONMIN = 49152 // in6.h:88:1: - IPV6PORT_RESERVED = 1024 // in6.h:87:1: - IPV6PORT_RESERVEDMAX = 1023 // in6.h:91:1: - IPV6PORT_RESERVEDMIN = 600 // in6.h:90:1: - IPV6PROTO_MAXID = 104 // in6.h:581:1: - IPV6_AUTOFLOWLABEL = 59 // in6.h:484:1: - IPV6_BINDANY = 64 // in6.h:493:1: - IPV6_BINDMULTI = 65 // in6.h:495:1: - IPV6_BINDV6ONLY = 27 // in6.h:435:1: - IPV6_CHECKSUM = 26 // in6.h:432:1: - IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:527:1: - IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:528:1: - IPV6_DONTFRAG = 62 // in6.h:487:1: - IPV6_DSTOPTS = 50 // in6.h:475:1: - IPV6_FLOWID = 67 // in6.h:497:1: - IPV6_FLOWTYPE = 68 // in6.h:498:1: - IPV6_FW_ADD = 30 // in6.h:441:1: - IPV6_FW_DEL = 31 // in6.h:442:1: - IPV6_FW_FLUSH = 32 // in6.h:443:1: - IPV6_FW_GET = 34 // in6.h:445:1: - IPV6_FW_ZERO = 33 // in6.h:444:1: - IPV6_HOPLIMIT = 47 // in6.h:472:1: - IPV6_HOPOPTS = 49 // in6.h:474:1: - IPV6_IPSEC_POLICY = 28 // in6.h:438:1: - IPV6_JOIN_GROUP = 12 // in6.h:417:1: - IPV6_LEAVE_GROUP = 13 // in6.h:418:1: - IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:539:1: - IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:533:1: - IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:540:1: - IPV6_MSFILTER = 74 // in6.h:510:1: - IPV6_MULTICAST_HOPS = 10 // in6.h:415:1: - IPV6_MULTICAST_IF = 9 // in6.h:414:1: - IPV6_MULTICAST_LOOP = 11 // in6.h:416:1: - IPV6_NEXTHOP = 48 // in6.h:473:1: - IPV6_ORIGDSTADDR = 72 // in6.h:503:1: - IPV6_PATHMTU = 44 // in6.h:463:1: - IPV6_PKTINFO = 46 // in6.h:471:1: - IPV6_PORTRANGE = 14 // in6.h:419:1: - IPV6_PORTRANGE_DEFAULT = 0 // in6.h:570:1: - IPV6_PORTRANGE_HIGH = 1 // in6.h:571:1: - IPV6_PORTRANGE_LOW = 2 // in6.h:572:1: - IPV6_PREFER_TEMPADDR = 63 // in6.h:489:1: - IPV6_RECVDSTOPTS = 40 // in6.h:455:1: - IPV6_RECVFLOWID = 70 // in6.h:500:1: - IPV6_RECVHOPLIMIT = 37 // in6.h:452:1: - IPV6_RECVHOPOPTS = 39 // in6.h:454:1: - IPV6_RECVORIGDSTADDR = 72 // in6.h:504:1: - IPV6_RECVPATHMTU = 43 // in6.h:461:1: - IPV6_RECVPKTINFO = 36 // in6.h:451:1: - IPV6_RECVRSSBUCKETID = 71 // in6.h:501:1: - IPV6_RECVRTHDR = 38 // in6.h:453:1: - IPV6_RECVTCLASS = 57 // in6.h:482:1: - IPV6_RSSBUCKETID = 69 // in6.h:499:1: - IPV6_RSS_LISTEN_BUCKET = 66 // in6.h:496:1: - IPV6_RTHDR = 51 // in6.h:476:1: - IPV6_RTHDRDSTOPTS = 35 // in6.h:449:1: - IPV6_RTHDR_LOOSE = 0 // in6.h:520:1: - IPV6_RTHDR_STRICT = 1 // in6.h:521:1: - IPV6_RTHDR_TYPE_0 = 0 // in6.h:522:1: - IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:412:1: - IPV6_TCLASS = 61 // in6.h:486:1: - IPV6_UNICAST_HOPS = 4 // in6.h:413:1: - IPV6_USE_MIN_MTU = 42 // in6.h:460:1: - IPV6_V6ONLY = 27 // in6.h:433:1: - IPV6_VLAN_PCP = 75 // in6.h:515:1: - IP_ADD_MEMBERSHIP = 12 // in.h:434:1: - IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:490:1: - IP_BINDANY = 24 // in.h:447:1: - IP_BINDMULTI = 25 // in.h:448:1: - IP_BLOCK_SOURCE = 72 // in.h:492:1: - IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:521:1: - IP_DEFAULT_MULTICAST_TTL = 1 // in.h:520:1: - IP_DONTFRAG = 67 // in.h:486:1: - IP_DROP_MEMBERSHIP = 13 // in.h:435:1: - IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:491:1: - IP_DUMMYNET3 = 49 // in.h:465:1: - IP_DUMMYNET_CONFIGURE = 60 // in.h:479:1: - IP_DUMMYNET_DEL = 61 // in.h:480:1: - IP_DUMMYNET_FLUSH = 62 // in.h:481:1: - IP_DUMMYNET_GET = 64 // in.h:482:1: - IP_FLOWID = 90 // in.h:511:1: - IP_FLOWTYPE = 91 // in.h:512:1: - IP_FW3 = 48 // in.h:464:1: - IP_FW_ADD = 50 // in.h:467:1: - IP_FW_DEL = 51 // in.h:468:1: - IP_FW_FLUSH = 52 // in.h:469:1: - IP_FW_GET = 54 // in.h:471:1: - IP_FW_NAT_CFG = 56 // in.h:474:1: - IP_FW_NAT_DEL = 57 // in.h:475:1: - IP_FW_NAT_GET_CONFIG = 58 // in.h:476:1: - IP_FW_NAT_GET_LOG = 59 // in.h:477:1: - IP_FW_RESETLOG = 55 // in.h:472:1: - IP_FW_TABLE_ADD = 40 // in.h:458:1: - IP_FW_TABLE_DEL = 41 // in.h:459:1: - IP_FW_TABLE_FLUSH = 42 // in.h:460:1: - IP_FW_TABLE_GETSIZE = 43 // in.h:461:1: - IP_FW_TABLE_LIST = 44 // in.h:462:1: - IP_FW_ZERO = 53 // in.h:470:1: - IP_HDRINCL = 2 // in.h:422:1: - IP_IPSEC_POLICY = 21 // in.h:444:1: - IP_MAX_GROUP_SRC_FILTER = 512 // in.h:532:1: - IP_MAX_MEMBERSHIPS = 4095 // in.h:526:1: - IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:534:1: - IP_MAX_SOCK_SRC_FILTER = 128 // in.h:533:1: - IP_MINTTL = 66 // in.h:485:1: - IP_MSFILTER = 74 // in.h:496:1: - IP_MULTICAST_IF = 9 // in.h:430:1: - IP_MULTICAST_LOOP = 11 // in.h:433:1: - IP_MULTICAST_TTL = 10 // in.h:432:1: - IP_MULTICAST_VIF = 14 // in.h:436:1: - IP_ONESBCAST = 23 // in.h:446:1: - IP_OPTIONS = 1 // in.h:421:1: - IP_ORIGDSTADDR = 27 // in.h:450:1: - IP_PORTRANGE = 19 // in.h:441:1: - IP_PORTRANGE_DEFAULT = 0 // in.h:625:1: - IP_PORTRANGE_HIGH = 1 // in.h:626:1: - IP_PORTRANGE_LOW = 2 // in.h:627:1: - IP_RECVDSTADDR = 7 // in.h:427:1: - IP_RECVFLOWID = 93 // in.h:514:1: - IP_RECVIF = 20 // in.h:442:1: - IP_RECVOPTS = 5 // in.h:425:1: - IP_RECVORIGDSTADDR = 27 // in.h:451:1: - IP_RECVRETOPTS = 6 // in.h:426:1: - IP_RECVRSSBUCKETID = 94 // in.h:515:1: - IP_RECVTOS = 68 // in.h:487:1: - IP_RECVTTL = 65 // in.h:484:1: - IP_RETOPTS = 8 // in.h:429:1: - IP_RSSBUCKETID = 92 // in.h:513:1: - IP_RSS_LISTEN_BUCKET = 26 // in.h:449:1: - IP_RSVP_OFF = 16 // in.h:438:1: - IP_RSVP_ON = 15 // in.h:437:1: - IP_RSVP_VIF_OFF = 18 // in.h:440:1: - IP_RSVP_VIF_ON = 17 // in.h:439:1: - IP_SENDSRCADDR = 7 // in.h:428:1: - IP_TOS = 3 // in.h:423:1: - IP_TTL = 4 // in.h:424:1: - IP_UNBLOCK_SOURCE = 73 // in.h:493:1: - IP_VLAN_PCP = 75 // in.h:499:1: - LITTLE_ENDIAN = 1234 // _endian.h:69:1: - MCAST_BLOCK_SOURCE = 84 // in.h:507:1: - MCAST_EXCLUDE = 2 // in.h:619:1: - MCAST_INCLUDE = 1 // in.h:618:1: - MCAST_JOIN_GROUP = 80 // in.h:503:1: - MCAST_JOIN_SOURCE_GROUP = 82 // in.h:505:1: - MCAST_LEAVE_GROUP = 81 // in.h:504:1: - MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:506:1: - MCAST_UNBLOCK_SOURCE = 85 // in.h:508:1: - MCAST_UNDEFINED = 0 // in.h:617:1: - PDP_ENDIAN = 3412 // _endian.h:71:1: - SIN6_LEN = 0 // in6.h:122:1: - X_BIG_ENDIAN = 4321 // _endian.h:47:1: - X_BYTEORDER_FUNC_DEFINED = 0 // in.h:118:1: - X_BYTEORDER_PROTOTYPED = 0 // in.h:108:1: - X_BYTE_ORDER = 1234 // _endian.h:40:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_IN_ADDR_T_DECLARED = 0 // in.h:68:1: - X_IN_PORT_T_DECLARED = 0 // in.h:73:1: - X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_NETINET6_IN6_H_ = 0 // in6.h:71:1: - X_NETINET_IN_H_ = 0 // in.h:36:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PDP_ENDIAN = 3412 // _endian.h:48:1: - X_QUAD_HIGHWORD = 1 // _endian.h:55:1: - X_QUAD_LOWWORD = 0 // _endian.h:56:1: - X_SA_FAMILY_T_DECLARED = 0 // in.h:78:1: - X_SIZE_T_DECLARED = 0 // in6.h:701:1: - X_SOCKLEN_T_DECLARED = 0 // in.h:91:1: - X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: - X_STRUCT_IN_ADDR_DECLARED = 0 // in.h:86:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: - X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_UINT16_T_DECLARED = 0 // in.h:58:1: - X_UINT32_T_DECLARED = 0 // in.h:63:1: - X_UINT8_T_DECLARED = 0 // in.h:53:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + ICMP6_FILTER = 18 // in6.h:304:1: + INET6_ADDRSTRLEN = 46 // in6.h:97:1: + INET_ADDRSTRLEN = 16 // in.h:382:1: + IN_CLASSA_MAX = 128 // in.h:195:1: + IN_CLASSA_NSHIFT = 24 // in.h:193:1: + IN_CLASSB_MAX = 65536 // in.h:202:1: + IN_CLASSB_NSHIFT = 16 // in.h:200:1: + IN_CLASSC_NSHIFT = 8 // in.h:207:1: + IN_CLASSD_NSHIFT = 28 // in.h:214:1: + IN_LOOPBACKNET = 127 // in.h:253:1: + IN_RFC3021_NSHIFT = 31 // in.h:219:1: + IPCTL_ARPDOWN = 40 // in.h:698:1: + IPCTL_ARPQUEUE = 41 // in.h:699:1: + IPCTL_ARPQUEUED = 36 // in.h:694:1: + IPCTL_ARPTIMEOUT = 39 // in.h:697:1: + IPCTL_DEFTTL = 3 // in.h:662:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:664:1: + IPCTL_ENCDEBUG = 12 // in.h:670:1: + IPCTL_FORWARDING = 1 // in.h:660:1: + IPCTL_IFQUEUE = 30 // in.h:688:1: + IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1: + IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1: + IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1: + IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1: + IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1: + IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1: + IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1: + IPCTL_IPSEC_BYTES = 20 // in.h:678:1: + IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1: + IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1: + IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1: + IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1: + IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1: + IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1: + IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1: + IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1: + IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1: + IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1: + IPCTL_IPSEC_STATS = 13 // in.h:671:1: + IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1: + IPCTL_MAXID = 42 // in.h:700:1: + IPCTL_MFORWARDING = 31 // in.h:689:1: + IPCTL_MRTMFC = 37 // in.h:695:1: + IPCTL_MRTPROTO = 34 // in.h:692:1: + IPCTL_MRTSTATS = 35 // in.h:693:1: + IPCTL_MRTVIF = 38 // in.h:696:1: + IPCTL_MTUDISC = 27 // in.h:685:1: + IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1: + IPCTL_MULTIPATH = 32 // in.h:690:1: + IPCTL_SENDREDIRECTS = 2 // in.h:661:1: + IPCTL_SOURCEROUTE = 5 // in.h:663:1: + IPCTL_STATS = 33 // in.h:691:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1: + IPPORT_HILASTAUTO = 65535 // in.h:160:1: + IPPORT_RESERVED = 1024 // in.h:153:1: + IPPORT_USERRESERVED = 49151 // in.h:154:1: + IPPROTO_AH = 51 // in.h:89:1: + IPPROTO_CARP = 112 // in.h:99:1: + IPPROTO_DIVERT = 258 // in.h:109:1: + IPPROTO_DONE = 257 // in.h:173:1: + IPPROTO_DSTOPTS = 60 // in.h:93:1: + IPPROTO_EGP = 8 // in.h:78:1: + IPPROTO_ENCAP = 98 // in.h:96:1: + IPPROTO_EON = 80 // in.h:94:1: + IPPROTO_ESP = 50 // in.h:88:1: + IPPROTO_ETHERIP = 97 // in.h:95:1: + IPPROTO_FRAGMENT = 44 // in.h:85:1: + IPPROTO_GGP = 3 // in.h:74:1: + IPPROTO_GRE = 47 // in.h:87:1: + IPPROTO_HOPOPTS = 0 // in.h:71:1: + IPPROTO_ICMP = 1 // in.h:72:1: + IPPROTO_ICMPV6 = 58 // in.h:91:1: + IPPROTO_IDP = 22 // in.h:81:1: + IPPROTO_IGMP = 2 // in.h:73:1: + IPPROTO_IP = 0 // in.h:70:1: + IPPROTO_IPCOMP = 108 // in.h:98:1: + IPPROTO_IPIP = 4 // in.h:75:1: + IPPROTO_IPV4 = 4 // in.h:76:1: + IPPROTO_IPV6 = 41 // in.h:83:1: + IPPROTO_MAX = 256 // in.h:106:1: + IPPROTO_MAXID = 259 // in.h:393:1: + IPPROTO_MOBILE = 55 // in.h:90:1: + IPPROTO_MPLS = 137 // in.h:102:1: + IPPROTO_NONE = 59 // in.h:92:1: + IPPROTO_PFSYNC = 240 // in.h:103:1: + IPPROTO_PIM = 103 // in.h:97:1: + IPPROTO_PUP = 12 // in.h:79:1: + IPPROTO_RAW = 255 // in.h:104:1: + IPPROTO_ROUTING = 43 // in.h:84:1: + IPPROTO_RSVP = 46 // in.h:86:1: + IPPROTO_SCTP = 132 // in.h:100:1: + IPPROTO_TCP = 6 // in.h:77:1: + IPPROTO_TP = 29 // in.h:82:1: + IPPROTO_UDP = 17 // in.h:80:1: + IPPROTO_UDPLITE = 136 // in.h:101:1: + IPSEC6_OUTSA = 56 // in6.h:337:1: + IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1: + IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1: + IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1: + IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1: + IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1: + IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1: + IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1: + IPSEC_LEVEL_NONE = 0x00 // in.h:329:1: + IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1: + IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1: + IPSEC_LEVEL_USE = 0x02 // in.h:331:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:578:1: + IPV6CTL_DAD_PENDING = 49 // in6.h:589:1: + IPV6CTL_DEFHLIM = 3 // in6.h:567:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1: + IPV6CTL_FORWARDING = 1 // in6.h:565:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:568:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1: + IPV6CTL_IFQUEUE = 51 // in6.h:591:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1: + IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:583:1: + IPV6CTL_MAXID = 55 // in6.h:595:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1: + IPV6CTL_MFORWARDING = 42 // in6.h:584:1: + IPV6CTL_MRTMFC = 53 // in6.h:593:1: + IPV6CTL_MRTMIF = 52 // in6.h:592:1: + IPV6CTL_MRTPROTO = 8 // in6.h:571:1: + IPV6CTL_MRTSTATS = 7 // in6.h:570:1: + IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1: + IPV6CTL_MULTIPATH = 43 // in6.h:585:1: + IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1: + IPV6CTL_SOIIKEY = 54 // in6.h:594:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:573:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1: + IPV6CTL_STATS = 6 // in6.h:569:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1: + IPV6PROTO_MAXID = 259 // in6.h:470:1: + IPV6_AUTH_LEVEL = 53 // in6.h:333:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1: + IPV6_CHECKSUM = 26 // in6.h:307:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1: + IPV6_DONTFRAG = 62 // in6.h:345:1: + IPV6_DSTOPTS = 50 // in6.h:330:1: + IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1: + IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1: + IPV6_HOPLIMIT = 47 // in6.h:327:1: + IPV6_HOPOPTS = 49 // in6.h:329:1: + IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1: + IPV6_JOIN_GROUP = 12 // in6.h:300:1: + IPV6_LEAVE_GROUP = 13 // in6.h:301:1: + IPV6_MINHOPCOUNT = 65 // in6.h:349:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:298:1: + IPV6_MULTICAST_IF = 9 // in6.h:297:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:299:1: + IPV6_NEXTHOP = 48 // in6.h:328:1: + IPV6_PATHMTU = 44 // in6.h:322:1: + IPV6_PIPEX = 63 // in6.h:346:1: + IPV6_PKTINFO = 46 // in6.h:326:1: + IPV6_PORTRANGE = 14 // in6.h:302:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:395:1: + IPV6_RECVDSTOPTS = 40 // in6.h:317:1: + IPV6_RECVDSTPORT = 64 // in6.h:348:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:314:1: + IPV6_RECVHOPOPTS = 39 // in6.h:316:1: + IPV6_RECVPATHMTU = 43 // in6.h:320:1: + IPV6_RECVPKTINFO = 36 // in6.h:313:1: + IPV6_RECVRTHDR = 38 // in6.h:315:1: + IPV6_RECVTCLASS = 57 // in6.h:339:1: + IPV6_RTABLE = 0x1021 // in6.h:351:1: + IPV6_RTHDR = 51 // in6.h:331:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:354:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1: + IPV6_TCLASS = 61 // in6.h:344:1: + IPV6_UNICAST_HOPS = 4 // in6.h:296:1: + IPV6_USE_MIN_MTU = 42 // in6.h:319:1: + IPV6_V6ONLY = 27 // in6.h:308:1: + IP_ADD_MEMBERSHIP = 12 // in.h:297:1: + IP_AUTH_LEVEL = 20 // in.h:300:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1: + IP_DROP_MEMBERSHIP = 13 // in.h:298:1: + IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1: + IP_ESP_TRANS_LEVEL = 21 // in.h:301:1: + IP_HDRINCL = 2 // in.h:287:1: + IP_IPCOMP_LEVEL = 29 // in.h:309:1: + IP_IPDEFTTL = 37 // in.h:317:1: + IP_IPSECFLOWINFO = 36 // in.h:316:1: + IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1: + IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1: + IP_IPSEC_LOCAL_ID = 23 // in.h:303:1: + IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1: + IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1: + IP_IPSEC_REMOTE_ID = 24 // in.h:304:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1: + IP_MINTTL = 32 // in.h:312:1: + IP_MIN_MEMBERSHIPS = 15 // in.h:353:1: + IP_MULTICAST_IF = 9 // in.h:294:1: + IP_MULTICAST_LOOP = 11 // in.h:296:1: + IP_MULTICAST_TTL = 10 // in.h:295:1: + IP_OPTIONS = 1 // in.h:286:1: + IP_PIPEX = 34 // in.h:314:1: + IP_PORTRANGE = 19 // in.h:299:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:374:1: + IP_PORTRANGE_HIGH = 1 // in.h:375:1: + IP_PORTRANGE_LOW = 2 // in.h:376:1: + IP_RECVDSTADDR = 7 // in.h:292:1: + IP_RECVDSTPORT = 33 // in.h:313:1: + IP_RECVIF = 30 // in.h:310:1: + IP_RECVOPTS = 5 // in.h:290:1: + IP_RECVRETOPTS = 6 // in.h:291:1: + IP_RECVRTABLE = 35 // in.h:315:1: + IP_RECVTTL = 31 // in.h:311:1: + IP_RETOPTS = 8 // in.h:293:1: + IP_RTABLE = 0x1021 // in.h:321:1: + IP_SENDSRCADDR = 7 // in.h:318:1: + IP_TOS = 3 // in.h:288:1: + IP_TTL = 4 // in.h:289:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SIN6_LEN = 0 // in6.h:104:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IN_ADDR_DECLARED = 0 // in.h:163:1: + X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NETINET6_IN6_H_ = 0 // in6.h:69:1: + X_NETINET_IN_H_ = 0 // in.h:39:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -416,9 +295,9 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $ +// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ + // Copyright (c) 1982, 1986, 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -445,13 +324,13 @@ type X__float128 = float64 /* :47:21 */ // 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. -// -// @(#)in.h 8.3 (Berkeley) 1/3/94 -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -482,63 +361,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -567,118 +422,85 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1982, 1986, 1991, 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 @@ -688,11 +510,14 @@ type X__float128 = float64 /* :47:21 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -701,11 +526,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -736,19 +561,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -758,40 +576,35 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -816,164 +629,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - -type X__uint64_t = uint64 /* _types.h:68:28 */ - -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. - -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1987, 1991 Regents of the University of California. -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -983,30 +644,27 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // 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. 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. -// -// @(#)endian.h 7.8 (Berkeley) 4/3/91 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1990, 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 @@ -1016,11 +674,14 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -1029,13 +690,13 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1987, 1991 Regents of the University of California. -// All rights reserved. +// Copyright (c) 1990, 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 @@ -1060,111 +721,239 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// BSD Compatiblity +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// Definitions for byte order, according to byte significance from low -// address to high. +// Tell sys/endian.h we have MD variants of the swap macros. -// Define the order of 32-bit words in 64-bit words. +// Note that these macros evaluate their arguments several times. -// Deprecated variants that don't have enough underscores to be useful in more -// strict namespaces. +// Public names -// bswap primitives, based on compiler builtins +// These are specified to be function-like macros to match the spec -// Protocols common to RFC 1700, POSIX, and X/Open. +// POSIX names -type Uint8_t = X__uint8_t /* in.h:52:20 */ +// original BSD names -type Uint16_t = X__uint16_t /* in.h:57:21 */ +// these were exposed here before -type Uint32_t = X__uint32_t /* in.h:62:21 */ +// ancient stuff -type In_addr_t = Uint32_t /* in.h:67:19 */ +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -type In_port_t = Uint16_t /* in.h:72:19 */ +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -type Sa_family_t = X__sa_family_t /* in.h:77:24 */ +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -// Internet address (a structure for historical reasons). -type In_addr = struct{ Fs_addr In_addr_t } /* in.h:83:1 */ +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type Socklen_t = X__socklen_t /* in.h:90:21 */ +type Int8_t = X__int8_t /* types.h:75:19 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 -// 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. -// 3. 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. -// -// @(#)socket.h 8.4 (Berkeley) 2/21/94 -// $FreeBSD$ +type Uint8_t = X__uint8_t /* types.h:80:20 */ -// RFC 2553: protocol-independent placeholder for socket addresses +type Int16_t = X__int16_t /* types.h:85:20 */ -type Sockaddr_storage = struct { - Fss_len uint8 - Fss_family Sa_family_t - F__ss_pad1 [6]int8 - F__ss_align X__int64_t - F__ss_pad2 [112]int8 -} /* _sockaddr_storage.h:48:1 */ +type Uint16_t = X__uint16_t /* types.h:90:21 */ -// Socket address, internet style. -type Sockaddr_in = struct { - Fsin_len Uint8_t - Fsin_family Sa_family_t - Fsin_port In_port_t - Fsin_addr struct{ Fs_addr In_addr_t } - Fsin_zero [8]int8 -} /* in.h:97:1 */ +type Int32_t = X__int32_t /* types.h:95:20 */ -// Constants and structures defined by the internet system, -// Per RFC 790, September 1981, and numerous additions. +type Uint32_t = X__uint32_t /* types.h:100:21 */ -// Protocols (RFC 1700) -// 101-254: Partly Unassigned -// 255: Reserved -// BSD Private, local use, namespace incursion, no longer used +type Int64_t = X__int64_t /* types.h:105:20 */ -// last return value of *_input(), meaning "all job for this pkt is done". +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ -// Only used internally, so can be outside the range of valid IP protocols. +type Off_t = X__off_t /* types.h:193:18 */ -// Defined to avoid confusion. The master value is defined by -// PROTO_SPACER in sys/protosw.h. +// Major, minor numbers, dev_t's. +// is pulled in by + +type Sa_family_t = X__sa_family_t /* in.h:58:23 */ // sockaddr address family type + +type In_addr_t = X__in_addr_t /* in.h:63:21 */ // base type for internet address +type In_port_t = X__in_port_t /* in.h:64:21 */ // IP port type + +// Protocols + +// Only used internally, so it can be outside the range of valid IP protocols + +// From FreeBSD: +// // Local port number conventions: // // When a user does a bind(2) or connect(2) with a port number of zero, // a non-conflicting local port address is chosen. -// The default range is IPPORT_HIFIRSTAUTO through -// IPPORT_HILASTAUTO, although that is settable by sysctl. +// The default range is IPPORT_RESERVED through +// IPPORT_USERRESERVED, although that is settable by sysctl. // // A user may set the IPPROTO_IP option IP_PORTRANGE to change this // default assignment range. @@ -1181,156 +970,96 @@ type Sockaddr_in = struct { // if you trust the remote host to restrict these ports. // // The default range of ports and the high range can be changed by -// sysctl(3). (net.inet.ip.portrange.{hi,low,}{first,last}) +// sysctl(3). (net.inet.ip.port{hi}{first,last}) // // Changing those values has bad security implications if you are -// using a stateless firewall that is allowing packets outside of that +// using a a stateless firewall that is allowing packets outside of that // range in order to allow transparent outgoing connections. // // Such a firewall configuration will generally depend on the use of these // default values. If you change them, you may find your Security // Administrator looking for you with a heavy object. -// -// For a slightly more orthodox text view on this: -// -// ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers -// -// port numbers are divided into three ranges: -// -// 0 - 1023 Well Known Ports -// 1024 - 49151 Registered Ports -// 49152 - 65535 Dynamic and/or Private Ports -// // Ports < IPPORT_RESERVED are reserved for -// privileged processes (e.g. root). (IP_PORTRANGE_LOW) - -// Default local port range, used by IP_PORTRANGE_DEFAULT +// privileged processes (e.g. root). +// Ports > IPPORT_USERRESERVED are reserved +// for servers, not necessarily privileged. -// Dynamic port range, used by IP_PORTRANGE_HIGH. +// Default local port range to use by setting IP_PORTRANGE_HIGH -// Scanning for a free reserved port return a value below IPPORT_RESERVED, -// but higher than IPPORT_RESERVEDSTART. Traditionally the start value was -// 512, but that conflicts with some well-known-services that firewalls may -// have a fit if we use. +// IP Version 4 Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:167:1 */ -// Historical definitions of bits in internet address integers -// (pre-CIDR). Class A/B/C are long obsolete, and now deprecated. -// Hide these definitions from the kernel unless IN_HISTORICAL_NETS -// is defined. Provide the historical definitions to user level for now. - -// Options for use with [gs]etsockopt at the IP level. -// First word of comment is data type; bool is stored in int. -// for IPSEC -// unused; was IP_FAITH - -// Options for controlling the firewall and dummynet. -// Historical options (from 40 to 64) will eventually be -// replaced by only two options, IP_FW3 and IP_DUMMYNET3. +// last return value of *_input(), meaning "all job for this pkt is done". -// IPv4 Source Filter Multicast API [RFC3678] +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. -// The following option is private; do not use it from user applications. +// These ones aren't really net and host fields, but routing needn't know. -// The following option deals with the 802.1Q Ethernet Priority Code Point -// -1 use interface default +// IP Version 4 socket address. +type Sockaddr_in = struct { + Fsin_len U_int8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]Int8_t +} /* in.h:258:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst 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]Int8_t +} /* in.h:273:1 */ -// Protocol Independent Multicast API [RFC3678] +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// source address to use -// Flow and RSS definitions +// Security levels - IPsec, not IPSO // Defaults and limits for options - -// Limit for IPv4 multicast memberships - -// Default resource limits for IPv4 multicast source filtering. -// These may be modified by sysctl. +// The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS +// and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS, +// and is reallocated when needed, sized according to a power-of-two increment. // Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. type Ip_mreq = struct { Fimr_multiaddr struct{ Fs_addr In_addr_t } Fimr_interface struct{ Fs_addr In_addr_t } -} /* in.h:539:1 */ +} /* in.h:359:1 */ -// Modified argument structure for IP_MULTICAST_IF, obtained from Linux. -// This is used to specify an interface index for multicast sends, as -// the IPv4 legacy APIs do not support this (unless IP_SENDIF is available). 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:549:1 */ - -// Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] -type Ip_mreq_source = struct { - Fimr_multiaddr struct{ Fs_addr In_addr_t } - Fimr_sourceaddr struct{ Fs_addr In_addr_t } - Fimr_interface struct{ Fs_addr In_addr_t } -} /* in.h:558:1 */ - -// Argument structures for Protocol-Independent Multicast Source -// Filter APIs. [RFC3678] -type Group_req = struct { - Fgr_interface Uint32_t - Fgr_group struct { - Fss_len uint8 - Fss_family Sa_family_t - F__ss_pad1 [6]int8 - F__ss_align X__int64_t - F__ss_pad2 [112]int8 - } -} /* in.h:568:1 */ - -type Group_source_req = struct { - Fgsr_interface Uint32_t - Fgsr_group struct { - Fss_len uint8 - Fss_family Sa_family_t - F__ss_pad1 [6]int8 - F__ss_align X__int64_t - F__ss_pad2 [112]int8 - } - Fgsr_source struct { - Fss_len uint8 - Fss_family Sa_family_t - F__ss_pad1 [6]int8 - F__ss_align X__int64_t - F__ss_pad2 [112]int8 - } -} /* in.h:573:1 */ - -// The following structure is private; do not use it from user applications. -// It is used to communicate IP_MSFILTER/IPV6_MSFILTER information between -// the RFC 3678 libc functions and the kernel. -type X__msfilterreq = struct { - Fmsfr_ifindex Uint32_t - Fmsfr_fmode Uint32_t - Fmsfr_nsrcs Uint32_t - Fmsfr_group struct { - Fss_len uint8 - Fss_family Sa_family_t - F__ss_pad1 [6]int8 - F__ss_align X__int64_t - F__ss_pad2 [112]int8 - } - Fmsfr_srcs uintptr -} /* in.h:586:1 */ - -// Filter modes; also used to represent per-socket filter mode internally. +} /* in.h:364:1 */ // Argument for IP_PORTRANGE: // - which range to search when port is unspecified at bind() or connect() -// Identifiers for IP sysctl nodes -// IPCTL_RTEXPIRE 5 deprecated -// IPCTL_RTMINEXPIRE 6 deprecated -// IPCTL_RTMAXCACHE 7 deprecated -// 15, unused, was: IPCTL_KEEPFAITH +// Buffer lengths for strings containing printable IP addresses -// INET6 stuff -// - -// SPDX-License-Identifier: BSD-3-Clause +// Definitions for inet sysctl operations. // +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects + +// INET6 stuff +// $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + // Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. // All rights reserved. // @@ -1357,10 +1086,7 @@ type X__msfilterreq = struct { // 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. -// -// $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ -// - // Copyright (c) 1982, 1986, 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -1389,129 +1115,126 @@ type X__msfilterreq = struct { // SUCH DAMAGE. // // @(#)in.h 8.3 (Berkeley) 1/3/94 -// $FreeBSD$ // Identification of the network protocol stack -// for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE +// for *BSD-current/release: http://www.kame.net/dev/cvsweb2.cgi/kame/COVERAGE // has the table of implementation/integration differences. -// IPv6 port allocation rules should mirror the IPv4 rules and are controlled -// by the net.inet.ip.portrange sysctl tree. The following defines exist -// for compatibility with userland applications that need them. - // IPv6 address type In6_addr = struct { F__u6_addr struct { F__ccgo_pad1 [0]uint32 - F__u6_addr8 [16]Uint8_t + F__u6_addr8 [16]U_int8_t } -} /* in6.h:97:1 */ - -// XXX missing POSIX.1-2001 macro IPPROTO_IPV6. +} /* in6.h:81:1 */ // Socket address for IPv6 - type Sockaddr_in6 = struct { - Fsin6_len Uint8_t + Fsin6_len U_int8_t Fsin6_family Sa_family_t Fsin6_port In_port_t - Fsin6_flowinfo Uint32_t + Fsin6_flowinfo U_int32_t Fsin6_addr struct { F__u6_addr struct { F__ccgo_pad1 [0]uint32 - F__u6_addr8 [16]Uint8_t + F__u6_addr8 [16]U_int8_t } } - Fsin6_scope_id Uint32_t -} /* in6.h:125:1 */ + Fsin6_scope_id U_int32_t +} /* in6.h:106:1 */ +// IPv6 route structure type Route_in6 = struct { - Fro_nh uintptr - Fro_lle uintptr - Fro_prepend uintptr - Fro_plen Uint16_t - Fro_flags Uint16_t - Fro_mtu Uint16_t - Fspare Uint16_t + Fro_rt uintptr + Fro_tableid U_long Fro_dst struct { - Fsin6_len Uint8_t + Fsin6_len U_int8_t Fsin6_family Sa_family_t Fsin6_port In_port_t - Fsin6_flowinfo Uint32_t + Fsin6_flowinfo U_int32_t Fsin6_addr struct { F__u6_addr struct { F__ccgo_pad1 [0]uint32 - F__u6_addr8 [16]Uint8_t + F__u6_addr8 [16]U_int8_t } } - Fsin6_scope_id Uint32_t + Fsin6_scope_id U_int32_t } -} /* in6.h:379:1 */ +} /* in6.h:150:1 */ -// Options for use with [gs]etsockopt at the IPV6 level. -// First word of comment is data type; bool is stored in int. -// no hdrincl -// RFC2292 options +// Definition of some useful macros to handle IP6 addresses -// 29; unused; was IPV6_FAITH +// Macros started with IPV6_ADDR is KAME local -// new socket options introduced in RFC3542 +// Unspecified -// more new socket options introduced in RFC3542 +// Loopback -// The following option is private; do not use it from user applications. -// It is deliberately defined to the same value as IP_MSFILTER. +// IPv4 compatible -// The following option deals with the 802.1Q Ethernet Priority Code Point -// -1 use interface default +// Mapped -// to define items, should talk with KAME guys first, for *BSD compatibility +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). -// Defaults and limits for options +// Multicast + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. + +// new socket options introduced in RFC3542 + +// More new socket options introduced in RFC3542 -// Limit for IPv6 multicast memberships +// to define items, should talk with KAME guys first, for *BSD compatibility -// Default resource limits for IPv6 multicast source filtering. -// These may be modified by sysctl. +// Defaults and limits for options // Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. type Ipv6_mreq = struct { Fipv6mr_multiaddr struct { F__u6_addr struct { F__ccgo_pad1 [0]uint32 - F__u6_addr8 [16]Uint8_t + F__u6_addr8 [16]U_int8_t } } Fipv6mr_interface uint32 -} /* in6.h:545:1 */ +} /* in6.h:366:1 */ -// IPV6_PKTINFO: Packet information(RFC2292 sec 5) +// IPV6_PKTINFO: Packet information(RFC3542 sec 6) type In6_pktinfo = struct { Fipi6_addr struct { F__u6_addr struct { F__ccgo_pad1 [0]uint32 - F__u6_addr8 [16]Uint8_t + F__u6_addr8 [16]U_int8_t } } Fipi6_ifindex uint32 -} /* in6.h:553:1 */ +} /* in6.h:374:1 */ // Control structure for IPV6_RECVPATHMTU socket option. +// XXX Not allowed here by POSIX, but required by RFC 3542, so go +// XXX with the code on the pavement. type Ip6_mtuinfo = struct { Fip6m_addr struct { - Fsin6_len Uint8_t + Fsin6_len U_int8_t Fsin6_family Sa_family_t Fsin6_port In_port_t - Fsin6_flowinfo Uint32_t + Fsin6_flowinfo U_int32_t Fsin6_addr struct { F__u6_addr struct { F__ccgo_pad1 [0]uint32 - F__u6_addr8 [16]Uint8_t + F__u6_addr8 [16]U_int8_t } } - Fsin6_scope_id Uint32_t + Fsin6_scope_id U_int32_t } - Fip6m_mtu Uint32_t -} /* in6.h:561:1 */ + Fip6m_mtu U_int32_t +} /* in6.h:384:1 */ + +// Argument for IPV6_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +type Socklen_t = X__socklen_t /* in6.h:401:21 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go b/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go index 85bba3d7e6..2775e0b7b3 100644 --- a/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go @@ -244,8 +244,8 @@ const ( SIN6_LEN = 0 // in6.h:104:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -261,29 +261,29 @@ const ( X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: X_NETINET6_IN6_H_ = 0 // in6.h:69:1: X_NETINET_IN_H_ = 0 // in.h:39:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -499,7 +499,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -669,7 +669,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -829,18 +829,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -922,27 +921,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go b/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go index 85bba3d7e6..75631e43f5 100644 --- a/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go +++ b/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o netinet/in/in_openbsd_amd64.go -pkgname in', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o netinet/in/in_openbsd_arm64.go -pkgname in', DO NOT EDIT. package in @@ -243,9 +243,9 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: SIN6_LEN = 0 // in6.h:104:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -255,35 +255,35 @@ const ( X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_NETINET6_IN6_H_ = 0 // in6.h:69:1: X_NETINET_IN_H_ = 0 // in.h:39:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -372,10 +372,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -499,7 +496,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -669,7 +666,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -701,8 +698,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -744,66 +740,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -829,18 +827,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -922,27 +919,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/poll/capi_darwin_amd64.go b/vendor/modernc.org/libc/poll/capi_darwin_amd64.go index d2930fc066..b7cb991dcb 100644 --- a/vendor/modernc.org/libc/poll/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/poll/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname poll', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o poll/poll_darwin_amd64.go -pkgname poll', DO NOT EDIT. package poll diff --git a/vendor/modernc.org/libc/poll/capi_openbsd_386.go b/vendor/modernc.org/libc/poll/capi_openbsd_386.go index 89c924b10d..1262c8a582 100644 --- a/vendor/modernc.org/libc/poll/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/poll/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o poll/poll_freebsd_386.go -pkgname poll', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o poll/poll_openbsd_386.go -pkgname poll', DO NOT EDIT. package poll diff --git a/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go b/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go index 19d95da03d..38c55e4a35 100644 --- a/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o poll/poll_openbsd_amd64.go -pkgname poll', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o poll/poll_openbsd_arm64.go -pkgname poll', DO NOT EDIT. package poll diff --git a/vendor/modernc.org/libc/poll/poll_darwin_amd64.go b/vendor/modernc.org/libc/poll/poll_darwin_amd64.go index c05a90c2ea..6800d8191d 100644 --- a/vendor/modernc.org/libc/poll/poll_darwin_amd64.go +++ b/vendor/modernc.org/libc/poll/poll_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname poll', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o poll/poll_darwin_amd64.go -pkgname poll', DO NOT EDIT. package poll @@ -15,31 +15,31 @@ var _ atomic.Value var _ unsafe.Pointer const ( - POLLATTRIB = 0x0400 - POLLERR = 0x0008 - POLLEXTEND = 0x0200 - POLLHUP = 0x0010 - POLLIN = 0x0001 - POLLNLINK = 0x0800 - POLLNVAL = 0x0020 - POLLOUT = 0x0004 - POLLPRI = 0x0002 - POLLRDBAND = 0x0080 - POLLRDNORM = 0x0040 - POLLSTANDARD = 511 - POLLWRBAND = 0x0100 - POLLWRITE = 0x1000 - POLLWRNORM = 4 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS_POLL_H_ = 0 + POLLATTRIB = 0x0400 // poll.h:81:1: + POLLERR = 0x0008 // poll.h:89:1: + POLLEXTEND = 0x0200 // poll.h:80:1: + POLLHUP = 0x0010 // poll.h:90:1: + POLLIN = 0x0001 // poll.h:68:1: + POLLNLINK = 0x0800 // poll.h:82:1: + POLLNVAL = 0x0020 // poll.h:91:1: + POLLOUT = 0x0004 // poll.h:70:1: + POLLPRI = 0x0002 // poll.h:69:1: + POLLRDBAND = 0x0080 // poll.h:73:1: + POLLRDNORM = 0x0040 // poll.h:71:1: + POLLSTANDARD = 511 // poll.h:93:1: + POLLWRBAND = 0x0100 // poll.h:74:1: + POLLWRITE = 0x1000 // poll.h:83:1: + POLLWRNORM = 4 // poll.h:72:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_LP64 = 1 // :1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS_POLL_H_ = 0 // poll.h:58:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/poll/poll_openbsd_386.go b/vendor/modernc.org/libc/poll/poll_openbsd_386.go index 57b8c0ff1b..3bc6aa06d2 100644 --- a/vendor/modernc.org/libc/poll/poll_openbsd_386.go +++ b/vendor/modernc.org/libc/poll/poll_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o poll/poll_freebsd_386.go -pkgname poll', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o poll/poll_openbsd_386.go -pkgname poll', DO NOT EDIT. package poll @@ -15,38 +15,32 @@ var _ atomic.Value var _ unsafe.Pointer const ( - INFTIM = -1 // poll.h:94:1: - POLLERR = 0x0008 // poll.h:80:1: - POLLHUP = 0x0010 // poll.h:81:1: - POLLIN = 0x0001 // poll.h:63:1: - POLLINIGNEOF = 0x2000 // poll.h:73:1: - POLLNVAL = 0x0020 // poll.h:82:1: - POLLOUT = 0x0004 // poll.h:65:1: - POLLPRI = 0x0002 // poll.h:64:1: - POLLRDBAND = 0x0080 // poll.h:68:1: - POLLRDNORM = 0x0040 // poll.h:66:1: - POLLSTANDARD = 511 // poll.h:86:1: - POLLWRBAND = 0x0100 // poll.h:69:1: - POLLWRNORM = 4 // poll.h:67:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_SIGSET_T_DECLARED = 0 // poll.h:107:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_POLL_H_ = 0 // poll.h:34:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + INFTIM = -1 // poll.h:54:1: + POLLERR = 0x0008 // poll.h:42:1: + POLLHUP = 0x0010 // poll.h:43:1: + POLLIN = 0x0001 // poll.h:39:1: + POLLNORM = 64 // poll.h:46:1: + POLLNVAL = 0x0020 // poll.h:44:1: + POLLOUT = 0x0004 // poll.h:41:1: + POLLPRI = 0x0002 // poll.h:40:1: + POLLRDBAND = 0x0080 // poll.h:48:1: + POLLRDNORM = 0x0040 // poll.h:45:1: + POLLWRBAND = 0x0100 // poll.h:49:1: + POLLWRNORM = 4 // poll.h:47:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_SIGSET_T_DEFINED_ = 0 // poll.h:63:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_POLL_H_ = 0 // poll.h:29:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMESPEC_DECLARED = 0 // poll.h:73:1: + X_TIME_T_DEFINED_ = 0 // poll.h:68:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -58,10 +52,15 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-3-Clause +// $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ + +// Written by Theo de Raadt, Public Domain // -// Copyright (c) 1997 Peter Wemm +// Typical poll() implementations expect poll.h to be in /usr/include. +// However this is not a convenient place for the real definitions. +// $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ + +// Copyright (c) 1996 Theo de Raadt // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -72,26 +71,62 @@ type X__float128 = float64 /* :47:21 */ // 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 BY THE AUTHOR 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 AUTHOR 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. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:31:9 */ + +// $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ + +// Written by Theo de Raadt, Public Domain // -// $FreeBSD$ +// Typical poll() implementations expect poll.h to be in /usr/include. +// However this is not a convenient place for the real definitions. +// $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1996 Theo de Raadt +// 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +type Pollfd_t = Pollfd /* poll.h:35:3 */ + +type Nfds_t = uint32 /* poll.h:37:22 */ + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -122,63 +157,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. - -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Compiler memory barriers, specific to gcc and clang. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -207,180 +218,80 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// This file is intended to be compatible with the traditional poll.h. - -type Nfds_t = uint32 /* poll.h:42:22 */ - -// This structure is passed as an array to poll(2). -type Pollfd = struct { - Ffd int32 - Fevents int16 - Frevents int16 -} /* poll.h:47:1 */ - -// Requestable events. If poll(2) finds any of these set, they are -// copied to revents on return. -// XXX Note that FreeBSD doesn't make much distinction between POLLPRI -// and POLLRDBAND since none of the file types have distinct priority -// bands - and only some have an urgent "mode". -// XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV -// POLLIN includes all of normal, band and urgent data. Most poll handlers -// on FreeBSD only treat it as "normal" data. - -// General FreeBSD extension (currently only supported for sockets): - -// These events are set if they occur regardless of whether they were -// requested. - -// Request that poll() wait forever. -// XXX in SYSV, this is defined in stropts.h, which is not included -// by poll.h. - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -405,17 +316,11 @@ type Pollfd = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -427,48 +332,6 @@ type Pollfd = struct { // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. -// -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ - -// - -// This file is in the public domain. -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. // 3. 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. @@ -485,398 +348,123 @@ type Pollfd = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ type X__uint64_t = uint64 /* _types.h:68:28 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint32 F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ - -// compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +} /* _types.h:75:3 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +type Sigset_t = uint32 /* poll.h:64:22 */ -type Time_t = X__time_t /* _timespec.h:42:18 */ +type Time_t = X__time_t /* poll.h:69:18 */ type Timespec = struct { Ftv_sec Time_t Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ - -type Sigset_t = X__sigset_t /* poll.h:108:20 */ +} /* poll.h:74:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go b/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go index eac426f0dc..08792553c3 100644 --- a/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go +++ b/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go @@ -40,7 +40,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:35:1: X_TIMESPEC_DECLARED = 0 // poll.h:73:1: X_TIME_T_DEFINED_ = 0 // poll.h:68:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -295,7 +295,7 @@ type Nfds_t = uint32 /* poll.h:37:22 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -455,18 +455,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Sigset_t = uint32 /* poll.h:64:22 */ diff --git a/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go b/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go index eac426f0dc..53ba770a51 100644 --- a/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go +++ b/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o poll/poll_openbsd_amd64.go -pkgname poll', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o poll/poll_openbsd_arm64.go -pkgname poll', DO NOT EDIT. package poll @@ -29,18 +29,18 @@ const ( POLLWRNORM = 4 // poll.h:47:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_RET_PROTECTOR = 1 // :2:1: X_SIGSET_T_DEFINED_ = 0 // poll.h:63:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_POLL_H_ = 0 // poll.h:29:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: X_TIMESPEC_DECLARED = 0 // poll.h:73:1: X_TIME_T_DEFINED_ = 0 // poll.h:68:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -168,10 +168,7 @@ type Nfds_t = uint32 /* poll.h:37:22 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -295,7 +292,7 @@ type Nfds_t = uint32 /* poll.h:37:22 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -327,8 +324,7 @@ type Nfds_t = uint32 /* poll.h:37:22 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -370,66 +366,68 @@ type Nfds_t = uint32 /* poll.h:37:22 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -455,18 +453,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Sigset_t = uint32 /* poll.h:64:22 */ diff --git a/vendor/modernc.org/libc/probes.go b/vendor/modernc.org/libc/probes.go new file mode 100644 index 0000000000..b92cfa1b9a --- /dev/null +++ b/vendor/modernc.org/libc/probes.go @@ -0,0 +1,169 @@ +// Copyright 2022 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 ( + "bytes" + "fmt" + "math" + "runtime/debug" + "sort" + "strings" + "sync" + "sync/atomic" + + "github.com/dustin/go-humanize" +) + +type PerfCounter struct { + a []int32 + labels []string + + enabled bool +} + +func NewPerfCounter(labels []string) *PerfCounter { + return &PerfCounter{ + a: make([]int32, len(labels)), + labels: labels, + enabled: true, + } +} + +func (c *PerfCounter) Disable() { c.enabled = false } +func (c *PerfCounter) Enable() { c.enabled = true } + +func (c *PerfCounter) Clear() { + for i := range c.a { + c.a[i] = 0 + } +} + +func (c *PerfCounter) Inc(n int) { + if c.enabled { + atomic.AddInt32(&c.a[n], 1) + } +} + +func (c *PerfCounter) IncN(n, m int) { + if c.enabled { + atomic.AddInt32(&c.a[n], int32(m)) + } +} + +func (c *PerfCounter) String() string { + sv := c.enabled + + defer func() { c.enabled = sv }() + + c.enabled = false + + var a []string + for i, v := range c.a { + if v != 0 { + a = append(a, fmt.Sprintf("%q: %s", c.labels[i], h(v))) + } + } + return fmt.Sprint(a) +} + +func h(v interface{}) string { + switch x := v.(type) { + case int: + return humanize.Comma(int64(x)) + case int32: + return humanize.Comma(int64(x)) + case int64: + return humanize.Comma(x) + case uint32: + return humanize.Comma(int64(x)) + case uint64: + if x <= math.MaxInt64 { + return humanize.Comma(int64(x)) + } + + return "-" + humanize.Comma(-int64(x)) + } + return fmt.Sprint(v) +} + +type StackCapture struct { + sync.Mutex + m map[string]int + + depth int + + enabled bool +} + +func NewStackCapture(depth int) *StackCapture { + return &StackCapture{ + m: map[string]int{}, + depth: depth, + enabled: true, + } +} + +func (c *StackCapture) Disable() { c.enabled = false } +func (c *StackCapture) Enable() { c.enabled = true } + +func (c *StackCapture) Clear() { + c.Lock() + + defer c.Unlock() + c.m = map[string]int{} +} + +var ( + stackCapturePrefix = []byte("\n\t") +) + +func (c *StackCapture) Record() { + if !c.enabled { + return + } + + b := debug.Stack() + var s strings.Builder +out: + for i := 0; len(b) > 0 && i < c.depth+2; i++ { + l := bytes.Index(b, stackCapturePrefix) + if l < 0 { + break out + } + + b = b[l+len(stackCapturePrefix):] + h := bytes.IndexByte(b, '\n') + if h < 0 { + h = len(b) + } + if i > 1 { + fmt.Fprintf(&s, "\n\t%s", b[:h]) + } + b = b[h:] + } + c.Lock() + + defer c.Unlock() + + c.m[s.String()]++ +} + +func (c *StackCapture) String() string { + c.Lock() + + defer c.Unlock() + + var b strings.Builder + var a []string + for k := range c.m { + a = append(a, k) + } + sort.Slice(a, func(i, j int) bool { return c.m[a[i]] < c.m[a[j]] }) + for _, k := range a { + fmt.Fprintf(&b, "%d%s\n", c.m[k], k) + } + return b.String() +} diff --git a/vendor/modernc.org/libc/pthread.go b/vendor/modernc.org/libc/pthread.go index 565086ecd7..06792905c2 100644 --- a/vendor/modernc.org/libc/pthread.go +++ b/vendor/modernc.org/libc/pthread.go @@ -87,6 +87,14 @@ func (d *pthreadData) init(t *TLS, detached bool) { threads[t.ID] = t } +func (d *pthreadData) close(t *TLS) { + threadsMu.Lock() + + defer threadsMu.Unlock() + + delete(threads, t.ID) +} + // int pthread_attr_destroy(pthread_attr_t *attr); func Xpthread_attr_destroy(t *TLS, pAttr uintptr) int32 { return 0 diff --git a/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go b/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go index ac443ae540..ca2b6e016e 100644 --- a/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_darwin_amd64.go -pkgname pthread', DO NOT EDIT. package pthread diff --git a/vendor/modernc.org/libc/pthread/capi_openbsd_386.go b/vendor/modernc.org/libc/pthread/capi_openbsd_386.go index 24ebdc0ae0..f7e08f03d8 100644 --- a/vendor/modernc.org/libc/pthread/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/pthread/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pthread/pthread_freebsd_386.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_openbsd_386.go -pkgname pthread', DO NOT EDIT. package pthread diff --git a/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go b/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go index 44a2dd06f4..3e10d42fbd 100644 --- a/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pthread/pthread_openbsd_amd64.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_openbsd_arm64.go -pkgname pthread', DO NOT EDIT. package pthread diff --git a/vendor/modernc.org/libc/pthread/capi_windows_386.go b/vendor/modernc.org/libc/pthread/capi_windows_386.go index eb0511cc6e..282502d000 100644 --- a/vendor/modernc.org/libc/pthread/capi_windows_386.go +++ b/vendor/modernc.org/libc/pthread/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_windows_386.go -pkgname pthread', DO NOT EDIT. package pthread diff --git a/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go b/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go index ad34564fa1..526039e349 100644 --- a/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_darwin_amd64.go -pkgname pthread', DO NOT EDIT. package pthread @@ -15,87 +15,87 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLOCKS_PER_SEC = 1000000 - PTHREAD_CANCEL_ASYNCHRONOUS = 0x00 - PTHREAD_CANCEL_DEFERRED = 0x02 - PTHREAD_CANCEL_DISABLE = 0x00 - PTHREAD_CANCEL_ENABLE = 0x01 - PTHREAD_CREATE_DETACHED = 2 - PTHREAD_CREATE_JOINABLE = 1 - PTHREAD_EXPLICIT_SCHED = 2 - PTHREAD_INHERIT_SCHED = 1 - PTHREAD_MUTEX_DEFAULT = 0 - PTHREAD_MUTEX_ERRORCHECK = 1 - PTHREAD_MUTEX_NORMAL = 0 - PTHREAD_MUTEX_POLICY_FAIRSHARE_NP = 1 - PTHREAD_MUTEX_POLICY_FIRSTFIT_NP = 3 - PTHREAD_MUTEX_RECURSIVE = 2 - PTHREAD_PRIO_INHERIT = 1 - PTHREAD_PRIO_NONE = 0 - PTHREAD_PRIO_PROTECT = 2 - PTHREAD_PROCESS_PRIVATE = 2 - PTHREAD_PROCESS_SHARED = 1 - PTHREAD_SCOPE_PROCESS = 2 - PTHREAD_SCOPE_SYSTEM = 1 - QOS_MIN_RELATIVE_PRIORITY = -15 - SCHED_FIFO = 4 - SCHED_OTHER = 1 - SCHED_RR = 2 - TIME_UTC = 1 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MACH_PORT_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_SIG_init = 0x3CB0B1BB - X_PTHREAD_COND_T = 0 - X_PTHREAD_ERRORCHECK_MUTEX_SIG_init = 0x32AAABA1 - X_PTHREAD_FIRSTFIT_MUTEX_SIG_init = 0x32AAABA3 - X_PTHREAD_H = 0 - X_PTHREAD_IMPL_H_ = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_SIG_init = 0x32AAABA7 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_SIG_init = 0x30B1BCBA - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_QOS_H = 0 - X_PTHREAD_RECURSIVE_MUTEX_SIG_init = 0x32AAABA2 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_SIG_init = 0x2DA8B3B4 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_SCHED_H_ = 0 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_SYS_QOS_H = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_H_ = 0 - X_TIME_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + CLOCKS_PER_SEC = 1000000 // time.h:90:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 0x00 // pthread.h:147:1: + PTHREAD_CANCEL_DEFERRED = 0x02 // pthread.h:146:1: + PTHREAD_CANCEL_DISABLE = 0x00 // pthread.h:145:1: + PTHREAD_CANCEL_ENABLE = 0x01 // pthread.h:144:1: + PTHREAD_CREATE_DETACHED = 2 // pthread.h:139:1: + PTHREAD_CREATE_JOINABLE = 1 // pthread.h:138:1: + PTHREAD_EXPLICIT_SCHED = 2 // pthread.h:142:1: + PTHREAD_INHERIT_SCHED = 1 // pthread.h:141:1: + PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:172:1: + PTHREAD_MUTEX_ERRORCHECK = 1 // pthread.h:170:1: + PTHREAD_MUTEX_NORMAL = 0 // pthread.h:169:1: + PTHREAD_MUTEX_POLICY_FAIRSHARE_NP = 1 // pthread.h:177:1: + PTHREAD_MUTEX_POLICY_FIRSTFIT_NP = 3 // pthread.h:178:1: + PTHREAD_MUTEX_RECURSIVE = 2 // pthread.h:171:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:163:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:162:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:164:1: + PTHREAD_PROCESS_PRIVATE = 2 // pthread.h:157:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:156:1: + PTHREAD_SCOPE_PROCESS = 2 // pthread.h:154:1: + PTHREAD_SCOPE_SYSTEM = 1 // pthread.h:153:1: + QOS_MIN_RELATIVE_PRIORITY = -15 // qos.h:153:1: + SCHED_FIFO = 4 // pthread_impl.h:55:1: + SCHED_OTHER = 1 // pthread_impl.h:54:1: + SCHED_RR = 2 // pthread_impl.h:56:1: + TIME_UTC = 1 // time.h:197:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MACH_PORT_T = 0 // _mach_port_t.h:48:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_SIG_init = 0x3CB0B1BB // pthread_impl.h:47:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_ERRORCHECK_MUTEX_SIG_init = 0x32AAABA1 // pthread_impl.h:43:1: + X_PTHREAD_FIRSTFIT_MUTEX_SIG_init = 0x32AAABA3 // pthread_impl.h:45:1: + X_PTHREAD_H = 0 // pthread.h:53:1: + X_PTHREAD_IMPL_H_ = 0 // pthread_impl.h:25:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_SIG_init = 0x32AAABA7 // pthread_impl.h:41:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_SIG_init = 0x30B1BCBA // pthread_impl.h:48:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_QOS_H = 0 // qos.h:25:1: + X_PTHREAD_RECURSIVE_MUTEX_SIG_init = 0x32AAABA2 // pthread_impl.h:44:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_SIG_init = 0x2DA8B3B4 // pthread_impl.h:49:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_SCHED_H_ = 0 // sched.h:25:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS_QOS_H = 0 // qos.h:25:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_H_ = 0 // time.h:64:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) // Copyright (c) 2013-2014 Apple Inc. All rights reserved. diff --git a/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go b/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go index deb4b46954..23eb095504 100644 --- a/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go @@ -2036,6 +2036,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go b/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go index 4a140d4487..067d66f896 100644 --- a/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go +++ b/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go @@ -2009,6 +2009,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go b/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go index 2101e46bec..f9b8c6ec54 100644 --- a/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go +++ b/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pthread/pthread_freebsd_386.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_openbsd_386.go -pkgname pthread', DO NOT EDIT. package pthread @@ -15,119 +15,320 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLK_TCK = 128 // time.h:56:1: - CLOCKS_PER_SEC = 128 // time.h:60:1: - CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: - CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: - CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: - CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: - CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: - CLOCK_PROF = 2 // _clock_id.h:64:1: - CLOCK_REALTIME = 0 // _clock_id.h:60:1: - CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: - CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: - CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: - CLOCK_SECOND = 13 // _clock_id.h:80:1: - CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: - CLOCK_UPTIME = 5 // _clock_id.h:74:1: - CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: - CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: - CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: - PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:58:1: - PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:85:1: - PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:84:1: - PTHREAD_CANCEL_DISABLE = 1 // pthread.h:83:1: - PTHREAD_CANCEL_ENABLE = 0 // pthread.h:82:1: - PTHREAD_CREATE_DETACHED = 1 // pthread.h:68:1: - PTHREAD_CREATE_JOINABLE = 0 // pthread.h:69:1: - PTHREAD_DESTRUCTOR_ITERATIONS = 4 // pthread.h:54:1: - PTHREAD_DETACHED = 0x1 // pthread.h:63:1: - PTHREAD_DONE_INIT = 1 // pthread.h:92:1: - PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:71:1: - PTHREAD_INHERIT_SCHED = 0x4 // pthread.h:65:1: - PTHREAD_KEYS_MAX = 256 // pthread.h:55:1: - PTHREAD_MUTEX_ROBUST = 1 // pthread.h:141:1: - PTHREAD_MUTEX_STALLED = 0 // pthread.h:140:1: - PTHREAD_NEEDS_INIT = 0 // pthread.h:91:1: - PTHREAD_NOFLOAT = 0x8 // pthread.h:66:1: - PTHREAD_PRIO_INHERIT = 1 // pthread.h:117:1: - PTHREAD_PRIO_NONE = 0 // pthread.h:116:1: - PTHREAD_PRIO_PROTECT = 2 // pthread.h:118:1: - PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:76:1: - PTHREAD_PROCESS_SHARED = 1 // pthread.h:77:1: - PTHREAD_SCOPE_PROCESS = 0 // pthread.h:70:1: - PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:64:1: - PTHREAD_STACK_MIN = 2048 // pthread.h:56:1: - PTHREAD_THREADS_MAX = 4294967295 // pthread.h:57:1: - SCHED_FIFO = 1 // sched.h:236:1: - SCHED_OTHER = 2 // sched.h:237:1: - SCHED_RR = 3 // sched.h:238:1: - TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: - TIMER_RELTIME = 0x0 // _clock_id.h:98:1: - TIME_UTC = 1 // time.h:188:1: - X_CLOCKID_T_DECLARED = 0 // time.h:83:1: - X_CLOCK_T_DECLARED = 0 // time.h:64:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PID_T_DECLARED = 0 // sched.h:254:1: - X_PTHREAD_H_ = 0 // pthread.h:38:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_SCHED_H_ = 0 // sched.h:65:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // time.h:74:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // time.h:88:1: - X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + ARG_MAX = 524288 // syslimits.h:38:1: + BC_BASE_MAX = 2147483647 // syslimits.h:51:1: + BC_DIM_MAX = 65535 // syslimits.h:52:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: + BC_STRING_MAX = 2147483647 // syslimits.h:54:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BUS_ADRALN = 1 // siginfo.h:83:1: + BUS_ADRERR = 2 // siginfo.h:84:1: + BUS_OBJERR = 3 // siginfo.h:85:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CHAR_BIT = 8 // limits.h:36:1: + CHAR_MAX = 0x7f // limits.h:46:1: + CHAR_MIN = -128 // limits.h:47:1: + CHILD_MAX = 80 // syslimits.h:39:1: + CLD_CONTINUED = 6 // siginfo.h:105:1: + CLD_DUMPED = 3 // siginfo.h:102:1: + CLD_EXITED = 1 // siginfo.h:100:1: + CLD_KILLED = 2 // siginfo.h:101:1: + CLD_STOPPED = 5 // siginfo.h:104:1: + CLD_TRAPPED = 4 // siginfo.h:103:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + EMT_TAGOVF = 1 // siginfo.h:66:1: + EXPR_NEST_MAX = 32 // syslimits.h:56:1: + FD_SETSIZE = 1024 // select.h:62:1: + FPE_FLTDIV = 3 // siginfo.h:71:1: + FPE_FLTINV = 7 // siginfo.h:75:1: + FPE_FLTOVF = 4 // siginfo.h:72:1: + FPE_FLTRES = 6 // siginfo.h:74:1: + FPE_FLTSUB = 8 // siginfo.h:76:1: + FPE_FLTUND = 5 // siginfo.h:73:1: + FPE_INTDIV = 1 // siginfo.h:69:1: + FPE_INTOVF = 2 // siginfo.h:70:1: + GID_MAX = 4294967295 // limits.h:84:1: + HOST_NAME_MAX = 255 // syslimits.h:76:1: + ILL_BADSTK = 8 // siginfo.h:63:1: + ILL_COPROC = 7 // siginfo.h:62:1: + ILL_ILLADR = 3 // siginfo.h:58:1: + ILL_ILLOPC = 1 // siginfo.h:56:1: + ILL_ILLOPN = 2 // siginfo.h:57:1: + ILL_ILLTRP = 4 // siginfo.h:59:1: + ILL_PRVOPC = 5 // siginfo.h:60:1: + ILL_PRVREG = 6 // siginfo.h:61:1: + INT_MAX = 0x7fffffff // limits.h:57:1: + INT_MIN = -2147483648 // limits.h:58:1: + IOV_MAX = 1024 // syslimits.h:64:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LINE_MAX = 2048 // syslimits.h:57:1: + LINK_MAX = 32767 // syslimits.h:40:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: + LLONG_MIN = -9223372036854775808 // limits.h:78:1: + LOGIN_NAME_MAX = 32 // syslimits.h:72:1: + LONG_BIT = 32 // limits.h:91:1: + LONG_MAX = 0x7fffffff // limits.h:69:1: + LONG_MIN = -2147483648 // limits.h:70:1: + MAX_CANON = 255 // syslimits.h:41:1: + MAX_INPUT = 255 // syslimits.h:42:1: + MB_LEN_MAX = 4 // limits.h:50:1: + MINSIGSTKSZ = 12288 // signal.h:183:1: + NAME_MAX = 255 // syslimits.h:43:1: + NBBY = 8 // select.h:111:1: + NGROUPS_MAX = 16 // syslimits.h:44:1: + NL_ARGMAX = 9 // limits.h:89:1: + NL_LANGMAX = 14 // limits.h:90:1: + NL_MSGMAX = 32767 // limits.h:91:1: + NL_SETMAX = 255 // limits.h:92:1: + NL_TEXTMAX = 255 // limits.h:93:1: + NSIG = 33 // signal.h:48:1: + NSIGBUS = 3 // siginfo.h:86:1: + NSIGCLD = 6 // siginfo.h:106:1: + NSIGEMT = 1 // siginfo.h:67:1: + NSIGFPE = 8 // siginfo.h:77:1: + NSIGILL = 8 // siginfo.h:64:1: + NSIGSEGV = 2 // siginfo.h:81:1: + NSIGTRAP = 2 // siginfo.h:95:1: + NZERO = 20 // syslimits.h:65:1: + OPEN_MAX = 64 // syslimits.h:45:1: + PATH_MAX = 1024 // syslimits.h:46:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + PIPE_BUF = 512 // syslimits.h:47:1: + PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:88:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:82:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:81:1: + PTHREAD_CANCEL_DISABLE = 1 // pthread.h:80:1: + PTHREAD_CANCEL_ENABLE = 0 // pthread.h:79:1: + PTHREAD_CREATE_DETACHED = 1 // pthread.h:65:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:66:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // pthread.h:52:1: + PTHREAD_DETACHED = 0x1 // pthread.h:60:1: + PTHREAD_DONE_INIT = 1 // pthread.h:147:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:68:1: + PTHREAD_INHERIT_SCHED = 0x4 // pthread.h:62:1: + PTHREAD_KEYS_MAX = 256 // pthread.h:53:1: + PTHREAD_NEEDS_INIT = 0 // pthread.h:146:1: + PTHREAD_NOFLOAT = 0x8 // pthread.h:63:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:162:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:161:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:163:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:73:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:74:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:67:1: + PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:61:1: + PTHREAD_STACK_MIN = 4096 // pthread.h:54:1: + PTHREAD_THREADS_MAX = 4294967295 // pthread.h:55:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:48:1: + QUAD_MIN = -9223372036854775808 // limits.h:49:1: + RE_DUP_MAX = 255 // syslimits.h:59:1: + SA_NOCLDSTOP = 0x0008 // signal.h:132:1: + SA_NOCLDWAIT = 0x0020 // signal.h:130:1: + SA_NODEFER = 0x0010 // signal.h:129:1: + SA_ONSTACK = 0x0001 // signal.h:126:1: + SA_RESETHAND = 0x0004 // signal.h:128:1: + SA_RESTART = 0x0002 // signal.h:127:1: + SA_SIGINFO = 0x0040 // signal.h:134:1: + SCHAR_MAX = 0x7f // limits.h:38:1: + SCHAR_MIN = -128 // limits.h:39:1: + SCHED_FIFO = 1 // sched.h:47:1: + SCHED_OTHER = 2 // sched.h:48:1: + SCHED_RR = 3 // sched.h:49:1: + SEGV_ACCERR = 2 // siginfo.h:80:1: + SEGV_MAPERR = 1 // siginfo.h:79:1: + SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: + SHRT_MAX = 0x7fff // limits.h:53:1: + SHRT_MIN = -32768 // limits.h:54:1: + SIGABRT = 6 // signal.h:56:1: + SIGALRM = 14 // signal.h:67:1: + SIGBUS = 10 // signal.h:63:1: + SIGCHLD = 20 // signal.h:73:1: + SIGCONT = 19 // signal.h:72:1: + SIGEMT = 7 // signal.h:59:1: + SIGFPE = 8 // signal.h:61:1: + SIGHUP = 1 // signal.h:51:1: + SIGILL = 4 // signal.h:54:1: + SIGINFO = 29 // signal.h:85:1: + SIGINT = 2 // signal.h:52:1: + SIGIO = 23 // signal.h:77:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:62:1: + SIGPIPE = 13 // signal.h:66:1: + SIGPROF = 27 // signal.h:82:1: + SIGQUIT = 3 // signal.h:53:1: + SIGSEGV = 11 // signal.h:64:1: + SIGSTKSZ = 28672 // signal.h:185:1: + SIGSTOP = 17 // signal.h:70:1: + SIGSYS = 12 // signal.h:65:1: + SIGTERM = 15 // signal.h:68:1: + SIGTHR = 32 // signal.h:90:1: + SIGTRAP = 5 // signal.h:55:1: + SIGTSTP = 18 // signal.h:71:1: + SIGTTIN = 21 // signal.h:74:1: + SIGTTOU = 22 // signal.h:75:1: + SIGURG = 16 // signal.h:69:1: + SIGUSR1 = 30 // signal.h:87:1: + SIGUSR2 = 31 // signal.h:88:1: + SIGVTALRM = 26 // signal.h:81:1: + SIGWINCH = 28 // signal.h:84:1: + SIGXCPU = 24 // signal.h:79:1: + SIGXFSZ = 25 // signal.h:80:1: + SIG_BLOCK = 1 // signal.h:140:1: + SIG_SETMASK = 3 // signal.h:142:1: + SIG_UNBLOCK = 2 // signal.h:141:1: + SIZE_T_MAX = 4294967295 // limits.h:45:1: + SI_LWP = -1 // siginfo.h:47:1: + SI_MAXSZ = 128 // siginfo.h:127:1: + SI_NOINFO = 32767 // siginfo.h:45:1: + SI_QUEUE = -2 // siginfo.h:48:1: + SI_TIMER = -3 // siginfo.h:49:1: + SI_USER = 0 // siginfo.h:46:1: + SSIZE_MAX = 2147483647 // limits.h:41:1: + SS_DISABLE = 0x0004 // signal.h:182:1: + SS_ONSTACK = 0x0001 // signal.h:181:1: + SV_INTERRUPT = 2 // signal.h:158:1: + SV_ONSTACK = 1 // signal.h:157:1: + SV_RESETHAND = 4 // signal.h:159:1: + SYMLINK_MAX = 1024 // syslimits.h:48:1: + SYMLOOP_MAX = 32 // syslimits.h:49:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + TRAP_BRKPT = 1 // siginfo.h:93:1: + TRAP_TRACE = 2 // siginfo.h:94:1: + TTY_NAME_MAX = 260 // syslimits.h:71:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 4294967295 // limits.h:83:1: + UINT_MAX = 0xffffffff // limits.h:56:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: + ULONG_MAX = 0xffffffff // limits.h:68:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:47:1: + USHRT_MAX = 0xffff // limits.h:52:1: + WORD_BIT = 32 // limits.h:93:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NSIG = 33 // signal.h:45:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: + X_POSIX_LINK_MAX = 8 // limits.h:43:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: + X_POSIX_MAX_CANON = 255 // limits.h:44:1: + X_POSIX_MAX_INPUT = 255 // limits.h:45:1: + X_POSIX_NAME_MAX = 14 // limits.h:46:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: + X_POSIX_OPEN_MAX = 20 // limits.h:63:1: + X_POSIX_PATH_MAX = 256 // limits.h:47:1: + X_POSIX_PIPE_BUF = 512 // limits.h:48:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: + X_POSIX_STREAM_MAX = 8 // limits.h:53:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: + X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: + X_PTHREAD_H_ = 0 // pthread.h:38:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SCHED_H_ = 0 // sched.h:40:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_LIMITS_H_ = 0 // limits.h:27:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGINFO_H = 0 // siginfo.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_XOPEN_IOV_MAX = 16 // limits.h:106:1: + X_XOPEN_NAME_MAX = 255 // limits.h:107:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) -// Run-time invariant values: - -// Flags for threads and thread attributes. - -// Values for process shared/private attributes. - -// Flags for cancelling threads - // Flags for once initialization. // Static once initialization values. // Static initialization values. -// Default attribute arguments (draft 4, deprecated). - -// Mutex types (Single UNIX Specification, Version 2, 1997). -// -// Note that a mutex attribute with one of the following types: -// -// PTHREAD_MUTEX_NORMAL -// PTHREAD_MUTEX_RECURSIVE -// -// will deviate from POSIX specified semantics. -const ( /* pthread.h:130:1: */ - PTHREAD_MUTEX_ERRORCHECK = 1 // Default POSIX mutex - PTHREAD_MUTEX_RECURSIVE = 2 // Recursive mutex - PTHREAD_MUTEX_NORMAL = 3 // No error checking - PTHREAD_MUTEX_ADAPTIVE_NP = 4 // Adaptive mutex, spins briefly before blocking on lock - PTHREAD_MUTEX_TYPE_MAX = 5 +// Mutex types. +const ( /* pthread.h:168:1: */ + PTHREAD_MUTEX_ERRORCHECK = 1 // Error checking mutex + PTHREAD_MUTEX_RECURSIVE = 2 // Recursive mutex + PTHREAD_MUTEX_NORMAL = 3 // No error checking + PTHREAD_MUTEX_STRICT_NP = 4 // Strict error checking + PTHREAD_MUTEX_TYPE_MAX = 5 ) type Ptrdiff_t = int32 /* :3:26 */ @@ -138,47 +339,90 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ +// $OpenBSD: pthread.h,v 1.4 2018/03/05 01:15:26 deraadt Exp $ -// Additional type definitions: +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell +// All rights reserved. // -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ +// 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``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 CHRIS PROVENZANO 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. +// +// $FreeBSD: pthread.h,v 1.13 1999/07/31 08:36:07 rse Exp $ -// - -// This file is in the public domain. -// $FreeBSD$ +// Header files. +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1982, 1986, 1991, 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. // -// Copyright (c) 1988, 1993 +// 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. +// 3. 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + +// Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -203,28 +447,235 @@ type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// max value for an unsigned long long +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, 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. +// 3. 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. +// +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Minimum signal stack size. +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// This file is in the public domain. -// $FreeBSD$ +// Copyright (c) 1997 Niklas Hallqvist. 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -236,11 +687,7 @@ type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -256,18 +703,12 @@ type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -294,64 +735,288 @@ type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// Tell sys/endian.h we have MD variants of the swap macros. -type X__int64_t = int64 /* _types.h:66:20 */ +// Note that these macros evaluate their arguments several times. -type X__uint64_t = uint64 /* _types.h:68:28 */ +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ + +// Copyright (c) 1982, 1986, 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. +// 3. 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. +// +// @(#)time.h 8.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// 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. +// 3. 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. +// +// @(#)select.h 8.2 (Berkeley) 1/4/94 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// Copyright (c) 1982, 1986, 1991, 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 @@ -383,18 +1048,70 @@ type X___wchar_t = int32 /* _types.h:141:14 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ -// sigset_t macros. +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ -// - -// SPDX-License-Identifier: BSD-3-Clause +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ + +// Copyright (c) 1989 The Regents of the University of California. +// All rights reserved. // -// Copyright (c) 1982, 1986, 1989, 1991, 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 @@ -425,18 +1142,16 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. +// @(#)time.h 5.12 (Berkeley) 3/9/91 -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 1996, 1997 -// HD Associates, Inc. All rights reserved. +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -446,18 +1161,14 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by HD Associates, Inc -// and Jukka Antero Ukkonen. -// 4. Neither the name of the author nor the names of any co-contributors +// 3. 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 HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND +// 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 HD ASSOCIATES OR CONTRIBUTORS BE LIABLE +// 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) @@ -465,49 +1176,120 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // 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. +// +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// Copyright (c) 2002-2008, Jeffrey Roberson -// All rights reserved. +// Copyright (c) 1990, 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 unmodified, this list of conditions, and the following -// disclaimer. +// 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. +// 3. 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 AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $ + +// Copyright (c) 1982, 1986, 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. +// 3. 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. // -// $FreeBSD$ +// 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. -// POSIX 1003.1b Process Scheduling +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits -// POSIX scheduling policies +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +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 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ -type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ +// $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $ +// $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $ -// POSIX scheduling declarations for userland. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1982, 1986, 1989, 1991, 1993 // The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. +// (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 @@ -533,14 +1315,13 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)signal.h 8.2 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1993 -// The Regents of the University of California. All rights reserved. +// $OpenBSD: signal.h,v 1.11 2016/05/10 18:39:45 deraadt Exp $ +// $NetBSD: signal.h,v 1.6 1996/01/08 13:51:43 mycroft Exp $ + +// Copyright (c) 1982, 1986, 1989, 1991 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 @@ -566,15 +1347,16 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// @(#)signal.h 7.16 (Berkeley) 3/17/91 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -584,11 +1366,14 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -597,11 +1382,70 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +type Sig_atomic_t = int32 /* signal.h:40:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +type Sigcontext = struct { + Fsc_gs int32 + Fsc_fs int32 + Fsc_es int32 + Fsc_ds int32 + Fsc_edi int32 + Fsc_esi int32 + Fsc_ebp int32 + Fsc_ebx int32 + Fsc_edx int32 + Fsc_ecx int32 + Fsc_eax int32 + Fsc_eip int32 + Fsc_cs int32 + Fsc_eflags int32 + Fsc_esp int32 + Fsc_ss int32 + Fsc_cookie int32 + Fsc_mask int32 + Fsc_trapno int32 + Fsc_err int32 + Fsc_fpstate uintptr +} /* signal.h:54:1 */ + +// Language spec says we must list exactly one parameter, even though we +// actually supply three. Ugh! + +// $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $ + +// Copyright (c) 1997 Theo de Raadt +// 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. // +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -632,18 +1476,24 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +type Sigval = struct{ Fsival_int int32 } /* siginfo.h:33:1 */ -// - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 +// Negative signal codes are reserved for future use for +// user generated signals. + +// The machine dependent signal codes (SIGILL, SIGFPE, +// SIGSEGV, and SIGBUS) + +// SIGTRAP signal codes + +// SIGCHLD signal codes + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ + +// Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -654,11 +1504,7 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -674,105 +1520,58 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// @(#)time.h 8.2 (Berkeley) 7/10/94 -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_code int32 + Fsi_errno int32 + F_data struct{ F_pad [29]int32 } +} /* siginfo.h:173:3 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_mask Sigset_t + Fsa_flags int32 +} /* signal.h:112:1 */ -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +// if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. -type Time_t = X__time_t /* _timespec.h:42:18 */ +// Flags for sigprocmask: -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ +type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:152:1 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* signal.h:176:9 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Stack_t = Sigaltstack /* signal.h:180:3 */ + +type Ucontext_t = Sigcontext /* signal.h:190:27 */ + +// $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ +// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ + +// Copyright (c) 1988 The Regents of the University of California. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -783,11 +1582,14 @@ type Timespec = struct { // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -796,20 +1598,16 @@ type Timespec = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)limits.h 5.9 (Berkeley) 4/3/91 -type Pid_t = X__pid_t /* sched.h:253:25 */ +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 1993 +// Copyright (c) 1991, 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. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -835,13 +1633,35 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause +// $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ +// Copyright (c) 2002 Marc Espie. +// +// 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. // +// THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT 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 OPENBSD +// PROJECT 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -872,43 +1692,51 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2003 Marcel Moolenaar +// Common definitions for limits.h. + +// Legacy +// $OpenBSD: limits.h,v 1.14 2015/04/30 13:42:08 millert Exp $ +// $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ + +// Copyright (c) 1988 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. +// 3. 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 AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// 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. // -// $FreeBSD$ +// @(#)limits.h 7.2 (Berkeley) 6/28/90 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -918,11 +1746,14 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -931,18 +1762,17 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 1993 +// max value for unsigned long long +// max value for a signed long long +// min value for a signed long long + +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ +// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ + +// Copyright (c) 1988, 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 @@ -968,43 +1798,17 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 - -// These macros are shared between time.h and sys/time.h. - -// Note: The values shown below as a comment for the __POSIX_VISIBLE values are -// the ones FreeBSD traditionally used based on our reading of the POSIX -// standards. However, glibc uses 199309 for all of them, even those many were -// not defined there. To remain bug compatible with glibc means more software -// that relied on the glibc behavior will compile easily on FreeBSD. -// -// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl -// port until it can be updated properly. It incorrectly assumes that this was a -// standard value. It will be moved back to the __BSD_VISIBLE section once the -// issue is corrected. - -// FreeBSD-specific clocks. +// @(#)syslimits.h 8.1 (Berkeley) 6/2/93 -// Linux compatible names. +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// Frequency of the clock ticks reported by times(). Deprecated - use -// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) - -// Frequency of the clock ticks reported by clock(). - -type Clock_t = X__clock_t /* time.h:63:19 */ - -// New in POSIX 1003.1b-1993. -type Clockid_t = X__clockid_t /* time.h:82:21 */ - -type Timer_t = X__timer_t /* time.h:87:19 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1993 +// Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -1029,18 +1833,15 @@ type Timer_t = X__timer_t /* time.h:87:19 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: sched.h,v 1.1 2017/10/15 23:40:33 guenther Exp $ + +// sched.h: POSIX 1003.1b Process Scheduling header // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. +// Copyright (c) 1996, 1997 +// HD Associates, Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -1050,14 +1851,18 @@ type Timer_t = X__timer_t /* time.h:87:19 */ // 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. Neither the name of the University nor the names of its contributors +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-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 +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 +// ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES 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) @@ -1066,14 +1871,18 @@ type Timer_t = X__timer_t /* time.h:87:19 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1993 +// Copyright (c) 1982, 1986, 1991, 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 @@ -1099,45 +1908,19 @@ type Timer_t = X__timer_t /* time.h:87:19 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ +// @(#)types.h 8.4 (Berkeley) 1/21/94 -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 - Ftm_gmtoff int32 - Ftm_zone uintptr -} /* time.h:101:1 */ +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011, 2012 The FreeBSD Foundation +// Copyright (c) 1989 The Regents of the University of California. // All rights reserved. // -// This software was developed by David Chisnall under sponsorship from -// the FreeBSD Foundation. +// (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 @@ -1147,11 +1930,14 @@ type Tm = struct { // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -1160,10 +1946,41 @@ type Tm = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// Scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:51:1 */ + +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* pthread.h:101:1 */ -type Locale_t = uintptr /* _time.h:36:25 */ +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* pthread.h:112:26 */ +type Pthread_attr_t = uintptr /* pthread.h:113:30 */ +type Pthread_mutex_t = uintptr /* pthread.h:114:39 */ +type Pthread_mutexattr_t = uintptr /* pthread.h:115:35 */ +type Pthread_cond_t = uintptr /* pthread.h:116:30 */ +type Pthread_condattr_t = uintptr /* pthread.h:117:34 */ +type Pthread_key_t = int32 /* pthread.h:118:16 */ +type Pthread_once_t = Pthread_once /* pthread.h:119:30 */ +type Pthread_rwlock_t = uintptr /* pthread.h:120:32 */ +type Pthread_rwlockattr_t = uintptr /* pthread.h:121:35 */ +type Pthread_barrier_t = uintptr /* pthread.h:122:33 */ +type Pthread_barrierattr_t = uintptr /* pthread.h:123:36 */ +type Pthread_spinlock_t = uintptr /* pthread.h:124:33 */ -type X_pthread_cleanup_info = struct{ Fpthread_cleanup_pad [8]X__uintptr_t } /* pthread.h:143:1 */ +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* pthread.h:132:14 */ +type Pthread_startroutine_t = uintptr /* pthread.h:133:14 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go b/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go index ae577d4c63..b03d39f161 100644 --- a/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go @@ -224,8 +224,8 @@ const ( WORD_BIT = 32 // limits.h:93:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -240,11 +240,12 @@ const ( X_MACHINE_LIMITS_H_ = 0 // limits.h:35:1: X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: X_NSIG = 33 // signal.h:45:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: @@ -286,8 +287,8 @@ const ( X_SCHED_H_ = 0 // sched.h:40:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -300,11 +301,11 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -312,7 +313,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:106:1: X_XOPEN_NAME_MAX = 255 // limits.h:107:1: X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) // Flags for once initialization. @@ -384,7 +385,7 @@ type X__float128 = float64 /* :47:21 */ // $FreeBSD: pthread.h,v 1.13 1999/07/31 08:36:07 rse Exp $ // Header files. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -681,7 +682,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -841,18 +842,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -934,31 +934,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -1022,7 +1021,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -1194,7 +1193,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -1514,7 +1513,7 @@ type Sigval = struct { // SIGCHLD signal codes -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -1801,7 +1800,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // max value for a signed long long // min value for a signed long long -// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ // Copyright (c) 1988, 1993 @@ -1905,7 +1904,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // SUCH DAMAGE. // -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - diff --git a/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go b/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go index ae577d4c63..36a3c595a5 100644 --- a/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go +++ b/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pthread/pthread_openbsd_amd64.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_openbsd_arm64.go -pkgname pthread', DO NOT EDIT. package pthread @@ -26,8 +26,8 @@ const ( BUS_OBJERR = 3 // siginfo.h:85:1: BYTE_ORDER = 1234 // endian.h:47:1: CHAR_BIT = 8 // limits.h:36:1: - CHAR_MAX = 0x7f // limits.h:46:1: - CHAR_MIN = -128 // limits.h:47:1: + CHAR_MAX = 0xff // limits.h:44:1: + CHAR_MIN = 0 // limits.h:43:1: CHILD_MAX = 80 // syslimits.h:39:1: CLD_CONTINUED = 6 // siginfo.h:105:1: CLD_DUMPED = 3 // siginfo.h:102:1: @@ -136,8 +136,8 @@ const ( PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:61:1: PTHREAD_STACK_MIN = 4096 // pthread.h:54:1: PTHREAD_THREADS_MAX = 18446744073709551615 // pthread.h:55:1: - QUAD_MAX = 0x7fffffffffffffff // limits.h:47:1: - QUAD_MIN = -9223372036854775808 // limits.h:48:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:51:1: + QUAD_MIN = -9223372036854775808 // limits.h:52:1: RE_DUP_MAX = 255 // syslimits.h:59:1: SA_NOCLDSTOP = 0x0008 // signal.h:132:1: SA_NOCLDWAIT = 0x0020 // signal.h:130:1: @@ -193,14 +193,15 @@ const ( SIG_BLOCK = 1 // signal.h:140:1: SIG_SETMASK = 3 // signal.h:142:1: SIG_UNBLOCK = 2 // signal.h:141:1: - SIZE_T_MAX = 18446744073709551615 // limits.h:44:1: + SIZE_MAX = 18446744073709551615 // limits.h:42:1: + SIZE_T_MAX = 18446744073709551615 // limits.h:48:1: SI_LWP = -1 // siginfo.h:47:1: SI_MAXSZ = 128 // siginfo.h:127:1: SI_NOINFO = 32767 // siginfo.h:45:1: SI_QUEUE = -2 // siginfo.h:48:1: SI_TIMER = -3 // siginfo.h:49:1: SI_USER = 0 // siginfo.h:46:1: - SSIZE_MAX = 9223372036854775807 // limits.h:40:1: + SSIZE_MAX = 9223372036854775807 // limits.h:44:1: SS_DISABLE = 0x0004 // signal.h:182:1: SS_ONSTACK = 0x0001 // signal.h:181:1: SV_INTERRUPT = 2 // signal.h:158:1: @@ -219,13 +220,13 @@ const ( UINT_MAX = 0xffffffff // limits.h:56:1: ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: ULONG_MAX = 0xffffffffffffffff // limits.h:61:1: - UQUAD_MAX = 0xffffffffffffffff // limits.h:46:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:50:1: USHRT_MAX = 0xffff // limits.h:52:1: WORD_BIT = 32 // limits.h:93:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -235,16 +236,17 @@ const ( X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE_LIMITS_H_ = 0 // limits.h:35:1: - X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:37:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_NSIG = 33 // signal.h:45:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: @@ -286,9 +288,9 @@ const ( X_SCHED_H_ = 0 // sched.h:40:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_LIMITS_H_ = 0 // limits.h:27:1: @@ -300,11 +302,11 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -312,7 +314,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:106:1: X_XOPEN_NAME_MAX = 255 // limits.h:107:1: X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) // Flags for once initialization. @@ -384,7 +386,7 @@ type X__float128 = float64 /* :47:21 */ // $FreeBSD: pthread.h,v 1.13 1999/07/31 08:36:07 rse Exp $ // Header files. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -457,10 +459,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -681,7 +680,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -713,8 +712,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -756,66 +754,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -841,18 +841,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -934,31 +933,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -1022,7 +1020,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -1194,7 +1192,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -1328,11 +1326,12 @@ type Tm = struct { // // @(#)signal.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: signal.h,v 1.9 2016/05/10 18:39:42 deraadt Exp $ -// $NetBSD: signal.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ - -// Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California. -// All rights reserved. +// $OpenBSD: signal.h,v 1.2 2017/03/12 17:57:12 kettenis Exp $ +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Ralph Campbell. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -1358,7 +1357,7 @@ type Tm = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 7.16 (Berkeley) 3/17/91 +// @(#)signal.h 8.1 (Berkeley) 6/10/93 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ @@ -1395,7 +1394,7 @@ type Tm = struct { // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -type Sig_atomic_t = int32 /* signal.h:40:13 */ +type Sig_atomic_t = int32 /* signal.h:41:13 */ // Information pushed on stack when a signal is delivered. // This is used by the kernel to restore state following @@ -1403,37 +1402,15 @@ type Sig_atomic_t = int32 /* signal.h:40:13 */ // to the handler to allow it to restore state properly if // a non-standard exit is performed. type Sigcontext = struct { - Fsc_rdi int64 - Fsc_rsi int64 - Fsc_rdx int64 - Fsc_rcx int64 - Fsc_r8 int64 - Fsc_r9 int64 - Fsc_r10 int64 - Fsc_r11 int64 - Fsc_r12 int64 - Fsc_r13 int64 - Fsc_r14 int64 - Fsc_r15 int64 - Fsc_rbp int64 - Fsc_rbx int64 - Fsc_rax int64 - Fsc_gs int64 - Fsc_fs int64 - Fsc_es int64 - Fsc_ds int64 - Fsc_trapno int64 - Fsc_err int64 - Fsc_rip int64 - Fsc_cs int64 - Fsc_rflags int64 - Fsc_rsp int64 - Fsc_ss int64 - Fsc_fpstate uintptr F__sc_unused int32 Fsc_mask int32 + Fsc_sp uint64 + Fsc_lr uint64 + Fsc_elr uint64 + Fsc_spsr uint64 + Fsc_x [30]uint64 Fsc_cookie int64 -} /* signal.h:54:1 */ +} /* signal.h:51:1 */ // Language spec says we must list exactly one parameter, even though we // actually supply three. Ugh! @@ -1514,7 +1491,7 @@ type Sigval = struct { // SIGCHLD signal codes -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -1727,7 +1704,8 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // Common definitions for limits.h. // Legacy -// $OpenBSD: limits.h,v 1.6 2015/04/30 13:42:08 millert Exp $ +// $OpenBSD: limits.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ +// $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ // Copyright (c) 1988 The Regents of the University of California. // All rights reserved. @@ -1756,7 +1734,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 7.2 (Berkeley) 6/28/90 +// from: @(#)limits.h 7.2 (Berkeley) 6/28/90 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ @@ -1801,7 +1779,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // max value for a signed long long // min value for a signed long long -// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ // Copyright (c) 1988, 1993 @@ -1905,7 +1883,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // SUCH DAMAGE. // -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - diff --git a/vendor/modernc.org/libc/pthread/pthread_windows_386.go b/vendor/modernc.org/libc/pthread/pthread_windows_386.go index 32f58f57e8..9ab6d3a3c4 100644 --- a/vendor/modernc.org/libc/pthread/pthread_windows_386.go +++ b/vendor/modernc.org/libc/pthread/pthread_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname pthread', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pthread/pthread_windows_386.go -pkgname pthread', DO NOT EDIT. package pthread @@ -15,325 +15,328 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CHAR_BIT = 8 - CHAR_MAX = 127 - CHAR_MIN = -128 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - E2BIG = 7 - EACCES = 13 - EADDRINUSE = 100 - EADDRNOTAVAIL = 101 - EAFNOSUPPORT = 102 - EAGAIN = 11 - EALREADY = 103 - EBADF = 9 - EBADMSG = 104 - EBUSY = 16 - ECANCELED = 105 - ECHILD = 10 - ECONNABORTED = 106 - ECONNREFUSED = 107 - ECONNRESET = 108 - EDEADLK = 36 - EDEADLOCK = 36 - EDESTADDRREQ = 109 - EDOM = 33 - EEXIST = 17 - EFAULT = 14 - EFBIG = 27 - EHOSTUNREACH = 110 - EIDRM = 111 - EILSEQ = 42 - EINPROGRESS = 112 - EINTR = 4 - EINVAL = 22 - EIO = 5 - EISCONN = 113 - EISDIR = 21 - ELOOP = 114 - EMFILE = 24 - EMLINK = 31 - EMSGSIZE = 115 - ENAMETOOLONG = 38 - ENETDOWN = 116 - ENETRESET = 117 - ENETUNREACH = 118 - ENFILE = 23 - ENOBUFS = 119 - ENODATA = 120 - ENODEV = 19 - ENOENT = 2 - ENOEXEC = 8 - ENOFILE = 2 - ENOLCK = 39 - ENOLINK = 121 - ENOMEM = 12 - ENOMSG = 122 - ENOPROTOOPT = 123 - ENOSPC = 28 - ENOSR = 124 - ENOSTR = 125 - ENOSYS = 40 - ENOTCONN = 126 - ENOTDIR = 20 - ENOTEMPTY = 41 - ENOTRECOVERABLE = 127 - ENOTSOCK = 128 - ENOTSUP = 129 - ENOTTY = 25 - ENXIO = 6 - EOPNOTSUPP = 130 - EOVERFLOW = 132 - EOWNERDEAD = 133 - EPERM = 1 - EPIPE = 32 - EPROTO = 134 - EPROTONOSUPPORT = 135 - EPROTOTYPE = 136 - ERANGE = 34 - EROFS = 30 - ESPIPE = 29 - ESRCH = 3 - ETIME = 137 - ETIMEDOUT = 138 - ETXTBSY = 139 - EWOULDBLOCK = 140 - EXDEV = 18 - INT_MAX = 2147483647 - INT_MIN = -2147483648 - LLONG_MAX = 9223372036854775807 - LLONG_MIN = -9223372036854775808 - LONG_LONG_MAX = 9223372036854775807 - LONG_LONG_MIN = -9223372036854775808 - LONG_MAX = 2147483647 - LONG_MIN = -2147483648 - MAX_READ_LOCKS = 2147483646 - MB_LEN_MAX = 5 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - NSIG = 23 - OLD_P_OVERLAY = 2 - PATH_MAX = 260 - PTHREAD_BARRIER_SERIAL_THREAD = 1 - PTHREAD_CANCEL_ASYNCHRONOUS = 0x02 - PTHREAD_CANCEL_DEFERRED = 0 - PTHREAD_CANCEL_DISABLE = 0 - PTHREAD_CANCEL_ENABLE = 0x01 - PTHREAD_CREATE_DETACHED = 0x04 - PTHREAD_CREATE_JOINABLE = 0 - PTHREAD_DEFAULT_ATTR = 1 - PTHREAD_DESTRUCTOR_ITERATIONS = 256 - PTHREAD_EXPLICIT_SCHED = 0 - PTHREAD_INHERIT_SCHED = 0x08 - PTHREAD_KEYS_MAX = 1048576 - PTHREAD_MUTEX_ADAPTIVE_NP = 0 - PTHREAD_MUTEX_DEFAULT = 0 - PTHREAD_MUTEX_ERRORCHECK = 1 - PTHREAD_MUTEX_ERRORCHECK_NP = 1 - PTHREAD_MUTEX_FAST_NP = 0 - PTHREAD_MUTEX_NORMAL = 0 - PTHREAD_MUTEX_PRIVATE = 0 - PTHREAD_MUTEX_RECURSIVE = 2 - PTHREAD_MUTEX_RECURSIVE_NP = 2 - PTHREAD_MUTEX_SHARED = 1 - PTHREAD_MUTEX_TIMED_NP = 0 - PTHREAD_ONCE_INIT = 0 - PTHREAD_PRIO_INHERIT = 8 - PTHREAD_PRIO_MULT = 32 - PTHREAD_PRIO_NONE = 0 - PTHREAD_PRIO_PROTECT = 16 - PTHREAD_PROCESS_PRIVATE = 0 - PTHREAD_PROCESS_SHARED = 1 - PTHREAD_SCOPE_PROCESS = 0 - PTHREAD_SCOPE_SYSTEM = 0x10 - PTHREAD_THREADS_MAX = 2019 - P_DETACH = 4 - P_NOWAIT = 1 - P_NOWAITO = 3 - P_OVERLAY = 2 - P_WAIT = 0 - RWLS_PER_THREAD = 8 - SCHAR_MAX = 127 - SCHAR_MIN = -128 - SCHED_FIFO = 1 - SCHED_MAX = 2 - SCHED_MIN = 0 - SCHED_OTHER = 0 - SCHED_RR = 2 - SEM_NSEMS_MAX = 1024 - SHRT_MAX = 32767 - SHRT_MIN = -32768 - SIGABRT = 22 - SIGABRT2 = 22 - SIGABRT_COMPAT = 6 - SIGBREAK = 21 - SIGFPE = 8 - SIGILL = 4 - SIGINT = 2 - SIGSEGV = 11 - SIGTERM = 15 - SIG_BLOCK = 0 - SIG_SETMASK = 2 - SIG_UNBLOCK = 1 - SIZE_MAX = 4294967295 - SSIZE_MAX = 2147483647 - STRUNCATE = 80 - UCHAR_MAX = 255 - UINT_MAX = 4294967295 - ULLONG_MAX = 18446744073709551615 - ULONG_LONG_MAX = 18446744073709551615 - ULONG_MAX = 4294967295 - UNALIGNED = 0 - USE___UUIDOF = 0 - USHRT_MAX = 65535 - WAIT_CHILD = 0 - WAIT_GRANDCHILD = 1 - WIN32 = 1 - WINNT = 1 - WINPTHREAD_API = 0 - WIN_PTHREADS_H = 0 - WIN_PTHREADS_PTHREAD_COMPAT_H = 0 - WIN_PTHREADS_SIGNAL_H = 0 - WIN_PTHREADS_UNISTD_H = 0 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ANSI_STDDEF_H = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_ERRNO_DEFINED = 0 - X_CRT_GETPID_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_SYSTEM_DEFINED = 0 - X_CRT_TERMINATE_DEFINED = 0 - X_CRT_WSYSTEM_DEFINED = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_GCC_LIMITS_H_ = 0 - X_GCC_MAX_ALIGN_T = 0 - X_GTHREAD_USE_MUTEX_INIT_FUNC = 1 - X_I16_MAX = 32767 - X_I16_MIN = -32768 - X_I32_MAX = 2147483647 - X_I32_MIN = -2147483648 - X_I64_MAX = 9223372036854775807 - X_I64_MIN = -9223372036854775808 - X_I8_MAX = 127 - X_I8_MIN = -128 - X_INC_CORECRT_STARTUP = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_ERRNO = 0 - X_INC_LIMITS = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_PROCESS = 0 - X_INC_SIGNAL = 0 - X_INC_STDDEF = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LIMITS_H___ = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_OLD_P_OVERLAY = 2 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_POSIX_BARRIERS = 200112 - X_POSIX_CLOCK_SELECTION = 200112 - X_POSIX_READER_WRITER_LOCKS = 200112 - X_POSIX_SEMAPHORES = 200112 - X_POSIX_SEM_NSEMS_MAX = 256 - X_POSIX_SPIN_LOCKS = 200112 - X_POSIX_THREADS = 200112 - X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 256 - X_POSIX_THREAD_KEYS_MAX = 1048576 - X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 - X_POSIX_TIMEOUTS = 200112 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_P_DETACH = 4 - X_P_NOWAIT = 1 - X_P_NOWAITO = 3 - X_P_OVERLAY = 2 - X_P_WAIT = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIG_ATOMIC_T_DEFINED = 0 - X_SIZE_T_DEFINED = 0 - X_SPAWNV_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_STDDEF_H = 0 - X_STDDEF_H_ = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMEB_DEFINED = 0 - X_TIMEB_H_ = 0 - X_TIMEB_H_S = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UI16_MAX = 0xffff - X_UI32_MAX = 0xffffffff - X_UI64_MAX = 0xffffffffffffffff - X_UI8_MAX = 0xff - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WAIT_CHILD = 0 - X_WAIT_GRANDCHILD = 1 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WEXEC_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WSPAWN_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + E2BIG = 7 // errno.h:31:1: + EACCES = 13 // errno.h:37:1: + EADDRINUSE = 100 // errno.h:86:1: + EADDRNOTAVAIL = 101 // errno.h:90:1: + EAFNOSUPPORT = 102 // errno.h:82:1: + EAGAIN = 11 // errno.h:35:1: + EALREADY = 103 // errno.h:106:1: + EBADF = 9 // errno.h:33:1: + EBADMSG = 104 // errno.h:182:1: + EBUSY = 16 // errno.h:39:1: + ECANCELED = 105 // errno.h:154:1: + ECHILD = 10 // errno.h:34:1: + ECONNABORTED = 106 // errno.h:102:1: + ECONNREFUSED = 107 // errno.h:110:1: + ECONNRESET = 108 // errno.h:114:1: + EDEADLK = 36 // errno.h:55:1: + EDEADLOCK = 36 // errno.h:71:1: + EDESTADDRREQ = 109 // errno.h:118:1: + EDOM = 33 // errno.h:54:1: + EEXIST = 17 // errno.h:40:1: + EFAULT = 14 // errno.h:38:1: + EFBIG = 27 // errno.h:48:1: + EHOSTUNREACH = 110 // errno.h:122:1: + EIDRM = 111 // errno.h:186:1: + EILSEQ = 42 // errno.h:66:1: + EINPROGRESS = 112 // errno.h:158:1: + EINTR = 4 // errno.h:28:1: + EINVAL = 22 // errno.h:64:1: + EIO = 5 // errno.h:29:1: + EISCONN = 113 // errno.h:94:1: + EISDIR = 21 // errno.h:44:1: + ELOOP = 114 // errno.h:227:1: + EMFILE = 24 // errno.h:46:1: + EMLINK = 31 // errno.h:52:1: + EMSGSIZE = 115 // errno.h:126:1: + ENAMETOOLONG = 38 // errno.h:56:1: + ENETDOWN = 116 // errno.h:130:1: + ENETRESET = 117 // errno.h:134:1: + ENETUNREACH = 118 // errno.h:138:1: + ENFILE = 23 // errno.h:45:1: + ENOBUFS = 119 // errno.h:98:1: + ENODATA = 120 // errno.h:190:1: + ENODEV = 19 // errno.h:42:1: + ENOENT = 2 // errno.h:25:1: + ENOEXEC = 8 // errno.h:32:1: + ENOFILE = 2 // errno.h:26:1: + ENOLCK = 39 // errno.h:57:1: + ENOLINK = 121 // errno.h:194:1: + ENOMEM = 12 // errno.h:36:1: + ENOMSG = 122 // errno.h:198:1: + ENOPROTOOPT = 123 // errno.h:142:1: + ENOSPC = 28 // errno.h:49:1: + ENOSR = 124 // errno.h:202:1: + ENOSTR = 125 // errno.h:206:1: + ENOSYS = 40 // errno.h:58:1: + ENOTCONN = 126 // errno.h:150:1: + ENOTDIR = 20 // errno.h:43:1: + ENOTEMPTY = 41 // errno.h:59:1: + ENOTRECOVERABLE = 127 // errno.h:210:1: + ENOTSOCK = 128 // errno.h:146:1: + ENOTSUP = 129 // errno.h:76:1: + ENOTTY = 25 // errno.h:47:1: + ENXIO = 6 // errno.h:30:1: + EOPNOTSUPP = 130 // errno.h:162:1: + EOVERFLOW = 132 // errno.h:235:1: + EOWNERDEAD = 133 // errno.h:170:1: + EPERM = 1 // errno.h:24:1: + EPIPE = 32 // errno.h:53:1: + EPROTO = 134 // errno.h:174:1: + EPROTONOSUPPORT = 135 // errno.h:178:1: + EPROTOTYPE = 136 // errno.h:231:1: + ERANGE = 34 // errno.h:65:1: + EROFS = 30 // errno.h:51:1: + ESPIPE = 29 // errno.h:50:1: + ESRCH = 3 // errno.h:27:1: + ETIME = 137 // errno.h:214:1: + ETIMEDOUT = 138 // errno.h:223:1: + ETXTBSY = 139 // errno.h:218:1: + EWOULDBLOCK = 140 // errno.h:166:1: + EXDEV = 18 // errno.h:41:1: + GENERIC_ERRORCHECK_INITIALIZER = -2 // pthread.h:279:1: + GENERIC_INITIALIZER = -1 // pthread.h:278:1: + GENERIC_NORMAL_INITIALIZER = -1 // pthread.h:281:1: + GENERIC_RECURSIVE_INITIALIZER = -3 // pthread.h:280:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1: + LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1: + LONG_MAX = 2147483647 // limits.h:131:1: + LONG_MIN = -2147483648 // limits.h:129:1: + MAX_READ_LOCKS = 2147483646 // pthread.h:168:1: + MB_LEN_MAX = 5 // limits.h:35:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + NSIG = 23 // signal.h:21:1: + OLD_P_OVERLAY = 2 // process.h:149:1: + PATH_MAX = 260 // limits.h:20:1: + PTHREAD_BARRIER_SERIAL_THREAD = 1 // pthread.h:165:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 0x02 // pthread.h:117:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:116:1: + PTHREAD_CANCEL_DISABLE = 0 // pthread.h:113:1: + PTHREAD_CANCEL_ENABLE = 0x01 // pthread.h:114:1: + PTHREAD_CREATE_DETACHED = 0x04 // pthread.h:120:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:119:1: + PTHREAD_DEFAULT_ATTR = 1 // pthread.h:128:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 256 // pthread.h:136:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:122:1: + PTHREAD_INHERIT_SCHED = 0x08 // pthread.h:123:1: + PTHREAD_KEYS_MAX = 1048576 // pthread.h:137:1: + PTHREAD_MUTEX_ADAPTIVE_NP = 0 // pthread.h:156:1: + PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:142:1: + PTHREAD_MUTEX_ERRORCHECK = 1 // pthread.h:275:1: + PTHREAD_MUTEX_ERRORCHECK_NP = 1 // pthread.h:157:1: + PTHREAD_MUTEX_FAST_NP = 0 // pthread.h:154:1: + PTHREAD_MUTEX_NORMAL = 0 // pthread.h:274:1: + PTHREAD_MUTEX_PRIVATE = 0 // pthread.h:145:1: + PTHREAD_MUTEX_RECURSIVE = 2 // pthread.h:276:1: + PTHREAD_MUTEX_RECURSIVE_NP = 2 // pthread.h:158:1: + PTHREAD_MUTEX_SHARED = 1 // pthread.h:144:1: + PTHREAD_MUTEX_TIMED_NP = 0 // pthread.h:155:1: + PTHREAD_ONCE_INIT = 0 // pthread.h:134:1: + PTHREAD_PRIO_INHERIT = 8 // pthread.h:148:1: + PTHREAD_PRIO_MULT = 32 // pthread.h:150:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:147:1: + PTHREAD_PRIO_PROTECT = 16 // pthread.h:149:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:152:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:151:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:125:1: + PTHREAD_SCOPE_SYSTEM = 0x10 // pthread.h:126:1: + PTHREAD_THREADS_MAX = 2019 // pthread.h:437:1: + P_DETACH = 4 // process.h:151:1: + P_NOWAIT = 1 // process.h:147:1: + P_NOWAITO = 3 // process.h:150:1: + P_OVERLAY = 2 // process.h:148:1: + P_WAIT = 0 // process.h:146:1: + RWLS_PER_THREAD = 8 // pthread.h:98:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SCHED_FIFO = 1 // pthread.h:234:1: + SCHED_MAX = 2 // pthread.h:237:1: + SCHED_MIN = 0 // pthread.h:236:1: + SCHED_OTHER = 0 // pthread.h:233:1: + SCHED_RR = 2 // pthread.h:235:1: + SEM_NSEMS_MAX = 1024 // pthread.h:443:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SIGABRT = 22 // signal.h:30:1: + SIGABRT2 = 22 // signal.h:31:1: + SIGABRT_COMPAT = 6 // signal.h:25:1: + SIGBREAK = 21 // signal.h:29:1: + SIGFPE = 8 // signal.h:26:1: + SIGILL = 4 // signal.h:24:1: + SIGINT = 2 // signal.h:23:1: + SIGSEGV = 11 // signal.h:27:1: + SIGTERM = 15 // signal.h:28:1: + SIG_BLOCK = 0 // pthread.h:419:1: + SIG_SETMASK = 2 // pthread.h:425:1: + SIG_UNBLOCK = 1 // pthread.h:422:1: + SIZE_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:86:1: + STRUNCATE = 80 // errno.h:67:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_LONG_MAX = 18446744073709551615 // limits.h:158:1: + ULONG_MAX = 4294967295 // limits.h:135:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + USHRT_MAX = 65535 // limits.h:113:1: + WAIT_CHILD = 0 // process.h:152:1: + WAIT_GRANDCHILD = 1 // process.h:153:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + WINPTHREAD_API = 0 // pthread.h:92:1: + WIN_PTHREADS_H = 0 // pthread.h:60:1: + WIN_PTHREADS_PTHREAD_COMPAT_H = 0 // pthread_compat.h:61:1: + WIN_PTHREADS_SIGNAL_H = 0 // pthread_signal.h:24:1: + WIN_PTHREADS_UNISTD_H = 0 // pthread_unistd.h:24:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ANSI_STDDEF_H = 0 // stddef.h:52:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_ERRNO_DEFINED = 0 // stddef.h:17:1: + X_CRT_GETPID_DEFINED = 0 // process.h:157:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_SYSTEM_DEFINED = 0 // process.h:91:1: + X_CRT_TERMINATE_DEFINED = 0 // process.h:41:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WSYSTEM_DEFINED = 0 // process.h:120:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_GCC_MAX_ALIGN_T = 0 // stddef.h:419:1: + X_GTHREAD_USE_MUTEX_INIT_FUNC = 1 // pthread.h:686:1: + X_I16_MAX = 32767 // limits.h:54:1: + X_I16_MIN = -32768 // limits.h:53:1: + X_I32_MAX = 2147483647 // limits.h:58:1: + X_I32_MIN = -2147483648 // limits.h:57:1: + X_I64_MAX = 9223372036854775807 // limits.h:71:1: + X_I64_MIN = -9223372036854775808 // limits.h:70:1: + X_I8_MAX = 127 // limits.h:50:1: + X_I8_MIN = -128 // limits.h:49:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CORECRT_STARTUP = 0 // corecrt_startup.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_ERRNO = 0 // errno.h:7:1: + X_INC_LIMITS = 0 // limits.h:9:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_PROCESS = 0 // process.h:7:1: + X_INC_SIGNAL = 0 // signal.h:7:1: + X_INC_STDDEF = 0 // stddef.h:10:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_OLD_P_OVERLAY = 2 // process.h:23:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_POSIX_BARRIERS = 200112 // pthread_unistd.h:130:1: + X_POSIX_CLOCK_SELECTION = 200112 // pthread_unistd.h:173:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // pthread_unistd.h:101:1: + X_POSIX_SEMAPHORES = 200112 // pthread_unistd.h:190:1: + X_POSIX_SEM_NSEMS_MAX = 256 // pthread.h:440:1: + X_POSIX_SPIN_LOCKS = 200112 // pthread_unistd.h:115:1: + X_POSIX_THREADS = 200112 // pthread_unistd.h:81:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 256 // pthread.h:431:1: + X_POSIX_THREAD_KEYS_MAX = 1048576 // pthread.h:434:1: + X_POSIX_TIMEOUTS = 200112 // pthread_unistd.h:145:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_P_DETACH = 4 // process.h:25:1: + X_P_NOWAIT = 1 // process.h:22:1: + X_P_NOWAITO = 3 // process.h:24:1: + X_P_OVERLAY = 2 // process.h:26:1: + X_P_WAIT = 0 // process.h:21:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 // errno.h:63:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIG_ATOMIC_T_DEFINED = 0 // signal.h:17:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPAWNV_DEFINED = 0 // process.h:83:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_STDDEF_H = 0 // stddef.h:49:1: + X_STDDEF_H_ = 0 // stddef.h:50:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMEB_DEFINED = 0 // timeb.h:51:1: + X_TIMEB_H_ = 0 // timeb.h:7:1: + X_TIMEB_H_S = 0 // timeb_s.h:8:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UI16_MAX = 0xffff // limits.h:55:1: + X_UI32_MAX = 0xffffffff // limits.h:59:1: + X_UI64_MAX = 0xffffffffffffffff // limits.h:72:1: + X_UI8_MAX = 0xff // limits.h:51:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WAIT_CHILD = 0 // process.h:28:1: + X_WAIT_GRANDCHILD = 1 // process.h:29:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WEXEC_DEFINED = 0 // process.h:96:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WSPAWN_DEFINED = 0 // process.h:108:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -423,6 +426,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -443,6 +451,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -483,26 +497,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -528,29 +544,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // ISO C Standard: 7.17 Common definitions @@ -615,9 +631,9 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ type Max_align_t = struct { F__max_align_ll int64 F__max_align_ld float64 -} /* stddef.h:426:3 */ +} /* stddef.h:427:3 */ -// Copyright (C) 1989-2018 Free Software Foundation, Inc. +// Copyright (C) 1989-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -723,7 +739,18 @@ type X_onexit_table_t = X_onexit_table_t1 /* corecrt_startup.h:28:3 */ type X_onexit_t = uintptr /* corecrt_startup.h:30:13 */ -// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// Includes a definition of _pid_t and pid_t +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + +type X_beginthread_proc_type = uintptr /* process.h:32:16 */ +type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */ + +type X_tls_callback_type = uintptr /* process.h:61:16 */ + +// Copyright (C) 1992-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -775,7 +802,7 @@ type X_onexit_t = uintptr /* corecrt_startup.h:30:13 */ // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. -// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -952,11 +979,11 @@ type Pthread_attr_t1 = struct { type Pthread_attr_t = Pthread_attr_t1 /* pthread.h:251:31 */ // synchronization objects -type Pthread_spinlock_t = uintptr /* pthread.h:268:14 */ -type Pthread_mutex_t = uintptr /* pthread.h:269:14 */ -type Pthread_cond_t = uintptr /* pthread.h:270:14 */ -type Pthread_rwlock_t = uintptr /* pthread.h:271:14 */ -type Pthread_barrier_t = uintptr /* pthread.h:272:14 */ +type Pthread_spinlock_t = Intptr_t /* pthread.h:268:18 */ +type Pthread_mutex_t = Intptr_t /* pthread.h:269:18 */ +type Pthread_cond_t = Intptr_t /* pthread.h:270:18 */ +type Pthread_rwlock_t = Intptr_t /* pthread.h:271:18 */ +type Pthread_barrier_t = uintptr /* pthread.h:272:14 */ type Clockid_t = int32 /* pthread.h:389:13 */ @@ -1077,23 +1104,6 @@ type Clockid_t = int32 /* pthread.h:389:13 */ // // are present. -// _SC_THREAD_SAFE_FUNCTIONS -// Affected functions are -// -// readdir_r(), -// getgrgid_r(), -// getgrnam_r(), -// getpwnam_r(), -// getpwuid_r(), -// flockfile(), -// ftrylockfile(), -// funlockfile(), -// getc_unlocked(), -// getchar_unlocked(), -// putc_unlocked(), -// putchar_unlocked(), -// strerror_r(), - // _SC_TIMEOUTS // The functions // diff --git a/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go b/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go index 38f65ad646..0d36fd3306 100644 --- a/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname pwd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pwd/pwd_darwin_amd64.go -pkgname pwd', DO NOT EDIT. package pwd diff --git a/vendor/modernc.org/libc/pwd/capi_openbsd_386.go b/vendor/modernc.org/libc/pwd/capi_openbsd_386.go index fffa0bf99d..8f0b1d629a 100644 --- a/vendor/modernc.org/libc/pwd/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/pwd/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pwd/pwd_freebsd_386.go -pkgname pwd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pwd/pwd_openbsd_386.go -pkgname pwd', DO NOT EDIT. package pwd diff --git a/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go b/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go index b1dddd2d73..fa21dfc9ea 100644 --- a/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pwd/pwd_openbsd_amd64.go -pkgname pwd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pwd/pwd_openbsd_arm64.go -pkgname pwd', DO NOT EDIT. package pwd diff --git a/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go b/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go index 5edc4ff27a..02c85dd251 100644 --- a/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go +++ b/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname pwd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pwd/pwd_darwin_amd64.go -pkgname pwd', DO NOT EDIT. package pwd @@ -15,49 +15,49 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_GID_T = 0 - X_LP64 = 1 - X_MASTERPASSWD = "master.passwd" - X_MP_DB = "pwd.db" - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PASSWD = "passwd" - X_PASSWORD_CHGNOW = -1 - X_PASSWORD_EFMT1 = 95 - X_PASSWORD_LEN = 128 - X_PASSWORD_NOCHG = 0x04 - X_PASSWORD_NOEXP = 0x08 - X_PASSWORD_NOGID = 0x02 - X_PASSWORD_NOUID = 0x01 - X_PASSWORD_WARNDAYS = 14 - X_PATH_MASTERPASSWD = "/etc/master.passwd" - X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" - X_PATH_MP_DB = "/etc/pwd.db" - X_PATH_PASSWD = "/etc/passwd" - X_PATH_PWD = "/etc" - X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" - X_PATH_SMP_DB = "/etc/spwd.db" - X_PWD_H_ = 0 - X_PW_KEYBYNAME = 49 - X_PW_KEYBYNUM = 50 - X_PW_KEYBYUID = 51 - X_SIZE_T = 0 - X_SMP_DB = "spwd.db" - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UID_T = 0 - X_UUID_STRING_T = 0 - X_UUID_T = 0 - X_UUID_UUID_H = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MASTERPASSWD = "master.passwd" // pwd.h:57:1: + X_MP_DB = "pwd.db" // pwd.h:60:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PASSWD = "passwd" // pwd.h:54:1: + X_PASSWORD_CHGNOW = -1 // pwd.h:80:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:70:1: + X_PASSWORD_LEN = 128 // pwd.h:72:1: + X_PASSWORD_NOCHG = 0x04 // pwd.h:76:1: + X_PASSWORD_NOEXP = 0x08 // pwd.h:77:1: + X_PASSWORD_NOGID = 0x02 // pwd.h:75:1: + X_PASSWORD_NOUID = 0x01 // pwd.h:74:1: + X_PASSWORD_WARNDAYS = 14 // pwd.h:79:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:55:1: + X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" // pwd.h:56:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:59:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:53:1: + X_PATH_PWD = "/etc" // pwd.h:52:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:64:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:61:1: + X_PWD_H_ = 0 // pwd.h:44:1: + X_PW_KEYBYNAME = 49 // pwd.h:66:1: + X_PW_KEYBYNUM = 50 // pwd.h:67:1: + X_PW_KEYBYUID = 51 // pwd.h:68:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SMP_DB = "spwd.db" // pwd.h:62:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UUID_STRING_T = 0 // uuid.h:42:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go b/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go index aab9a7dbcb..b414e45723 100644 --- a/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go +++ b/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pwd/pwd_freebsd_386.go -pkgname pwd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pwd/pwd_openbsd_386.go -pkgname pwd', DO NOT EDIT. package pwd @@ -15,55 +15,67 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_FILE_OFFSET_BITS = 64 // :25:1: - X_GID_T_DECLARED = 0 // pwd.h:48:1: - X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MASTERPASSWD = "master.passwd" // pwd.h:70:1: - X_MP_DB = "pwd.db" // pwd.h:73:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PASSWD = "passwd" // pwd.h:68:1: - X_PASSWORD_EFMT1 = 95 // pwd.h:110:1: - X_PASSWORD_LEN = 128 // pwd.h:112:1: - X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:69:1: - X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:72:1: - X_PATH_PASSWD = "/etc/passwd" // pwd.h:67:1: - X_PATH_PWD = "/etc" // pwd.h:66:1: - X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:77:1: - X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:74:1: - X_PWD_CURRENT_VERSION = 4 // pwd.h:108:1: - X_PWD_H_ = 0 // pwd.h:41:1: - X_PWF_CHANGE = 16 // pwd.h:134:1: - X_PWF_CLASS = 32 // pwd.h:135:1: - X_PWF_DIR = 128 // pwd.h:137:1: - X_PWF_EXPIRE = 512 // pwd.h:139:1: - X_PWF_FILES = 0x1000 // pwd.h:145:1: - X_PWF_GECOS = 64 // pwd.h:136:1: - X_PWF_GID = 8 // pwd.h:133:1: - X_PWF_HESIOD = 0x3000 // pwd.h:147:1: - X_PWF_NAME = 1 // pwd.h:130:1: - X_PWF_NIS = 0x2000 // pwd.h:146:1: - X_PWF_PASSWD = 2 // pwd.h:131:1: - X_PWF_SHELL = 256 // pwd.h:138:1: - X_PWF_SOURCE = 0x3000 // pwd.h:144:1: - X_PWF_UID = 4 // pwd.h:132:1: - X_PW_KEYBYNAME = 49 // pwd.h:97:1: - X_PW_KEYBYNUM = 50 // pwd.h:98:1: - X_PW_KEYBYUID = 51 // pwd.h:99:1: - X_PW_KEYYPBYNUM = 53 // pwd.h:101:1: - X_PW_KEYYPENABLED = 52 // pwd.h:100:1: - X_PW_VERSION_MASK = 240 // pwd.h:94:1: - X_SIZE_T_DECLARED = 0 // pwd.h:63:1: - X_SMP_DB = "spwd.db" // pwd.h:75:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIME_T_DECLARED = 0 // pwd.h:53:1: - X_UID_T_DECLARED = 0 // pwd.h:58:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:62:1: + X_PASSWORD_LEN = 128 // pwd.h:64:1: + X_PASSWORD_NOCHG = 0x04 // pwd.h:71:1: + X_PASSWORD_NOEXP = 0x08 // pwd.h:72:1: + X_PASSWORD_NOGID = 0x02 // pwd.h:70:1: + X_PASSWORD_NOUID = 0x01 // pwd.h:69:1: + X_PASSWORD_OMITV7 = 0x02 // pwd.h:76:1: + X_PASSWORD_SECUREONLY = 0x01 // pwd.h:75:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:48:1: + X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" // pwd.h:49:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:51:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:47:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:54:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:52:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_PWD_H_ = 0 // pwd.h:42:1: + X_PW_BUF_LEN = 1024 // pwd.h:67:1: + X_PW_KEYBYNAME = 49 // pwd.h:56:1: + X_PW_KEYBYNUM = 50 // pwd.h:57:1: + X_PW_KEYBYUID = 51 // pwd.h:58:1: + X_PW_NAME_LEN = 31 // pwd.h:65:1: + X_PW_YPTOKEN = "__YP!" // pwd.h:60:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -75,9 +87,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: pwd.h,v 1.26 2018/09/13 12:31:15 millert Exp $ +// $NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1989, 1993 // The Regents of the University of California. All rights reserved. // (c) UNIX System Laboratories, Inc. @@ -85,6 +98,7 @@ type X__float128 = float64 /* :47:21 */ // 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. +// Portions Copyright(C) 1995, 1996, Jason Downs. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -111,11 +125,48 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // @(#)pwd.h 8.2 (Berkeley) 1/21/94 -// $FreeBSD$ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1982, 1986, 1991, 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. +// 3. 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. // +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -146,63 +197,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. - -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Compiler memory barriers, specific to gcc and clang. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -231,118 +258,78 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. +// Delete pseudo-keywords wherever they are not available or needed. -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Structure implements a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function acquires an exclusive or shared lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function attempts to acquire an exclusive or shared lock. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function releases a lock. +// Default values. -// Function asserts that an exclusive or shared lock is held. - -// Function requires that an exclusive or shared lock is or is not held. - -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -353,23 +340,28 @@ type X__float128 = float64 /* :47:21 */ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-3-Clause +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -400,17 +392,40 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // -// Copyright (c) 2002 Mike Barcroft +// 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ + +// - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -422,11 +437,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -442,18 +453,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -480,178 +485,222 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// max value for an unsigned long long +// Tell sys/endian.h we have MD variants of the swap macros. -// Minimum signal stack size. +// Note that these macros evaluate their arguments several times. -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// Public names -type X__int64_t = int64 /* _types.h:66:20 */ +// These are specified to be function-like macros to match the spec -type X__uint64_t = uint64 /* _types.h:68:28 */ +// POSIX names -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +type Ssize_t = X__ssize_t /* types.h:178:19 */ -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +type Time_t = X__time_t /* types.h:183:18 */ -type Gid_t = X__gid_t /* pwd.h:47:18 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Time_t = X__time_t /* pwd.h:52:18 */ +type Off_t = X__off_t /* types.h:193:18 */ -type Uid_t = X__uid_t /* pwd.h:57:18 */ +// Major, minor numbers, dev_t's. -// Historically, the keys in _PATH_MP_DB/_PATH_SMP_DB had the format -// `1 octet tag | key', where the tag is one of the _PW_KEY* values -// listed below. These values happen to be ASCII digits. Starting -// with FreeBSD 5.1, the tag is now still a single octet, but the -// upper 4 bits are interpreted as a version. Pre-FreeBSD 5.1 format -// entries are version `3' -- this conveniently results in the same -// key values as before. The new, architecture-independent entries -// are version `4'. -// As it happens, some applications read the database directly. -// (Bad app, no cookie!) Thus, we leave the _PW_KEY* symbols at their -// old pre-FreeBSD 5.1 values so these apps still work. Consequently -// we have to muck around a bit more to get the correct, versioned -// tag, and that is what the _PW_VERSIONED macro is about. +// Should be MAXLOGNAME - 1 -// The database also contains a key to indicate the format version of -// the entries therein. There may be other, older versioned entries -// as well. +// Flags for pw_mkdb(3) type Passwd = struct { Fpw_name uintptr @@ -664,7 +713,6 @@ type Passwd = struct { Fpw_dir uintptr Fpw_shell uintptr Fpw_expire Time_t - Fpw_fields int32 -} /* pwd.h:114:1 */ +} /* pwd.h:80:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go b/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go index f8c823c62f..cacca58a6e 100644 --- a/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go +++ b/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go @@ -21,8 +21,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -34,7 +34,7 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PASSWORD_EFMT1 = 95 // pwd.h:62:1: X_PASSWORD_LEN = 128 // pwd.h:64:1: X_PASSWORD_NOCHG = 0x04 // pwd.h:71:1: @@ -50,7 +50,7 @@ const ( X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:54:1: X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:52:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_PWD_H_ = 0 // pwd.h:42:1: X_PW_BUF_LEN = 1024 // pwd.h:67:1: X_PW_KEYBYNAME = 49 // pwd.h:56:1: @@ -61,21 +61,21 @@ const ( X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -135,7 +135,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)pwd.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -432,7 +432,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -592,18 +592,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -685,27 +684,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go b/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go index f8c823c62f..2d96567b06 100644 --- a/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go +++ b/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o pwd/pwd_openbsd_amd64.go -pkgname pwd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o pwd/pwd_openbsd_arm64.go -pkgname pwd', DO NOT EDIT. package pwd @@ -20,9 +20,9 @@ const ( LITTLE_ENDIAN = 1234 // endian.h:44:1: PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -30,11 +30,11 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PASSWORD_EFMT1 = 95 // pwd.h:62:1: X_PASSWORD_LEN = 128 // pwd.h:64:1: X_PASSWORD_NOCHG = 0x04 // pwd.h:71:1: @@ -50,7 +50,7 @@ const ( X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:54:1: X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:52:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_PWD_H_ = 0 // pwd.h:42:1: X_PW_BUF_LEN = 1024 // pwd.h:67:1: X_PW_KEYBYNAME = 49 // pwd.h:56:1: @@ -61,21 +61,21 @@ const ( X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -135,7 +135,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)pwd.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -208,10 +208,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -432,7 +429,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -464,8 +461,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -507,66 +503,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -592,18 +590,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -685,27 +682,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/signal/capi_darwin_amd64.go b/vendor/modernc.org/libc/signal/capi_darwin_amd64.go index 841f5c7722..3c592ebd6a 100644 --- a/vendor/modernc.org/libc/signal/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/signal/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_darwin_amd64.go -pkgname signal', DO NOT EDIT. package signal diff --git a/vendor/modernc.org/libc/signal/capi_openbsd_386.go b/vendor/modernc.org/libc/signal/capi_openbsd_386.go index ddcee2eb53..88037c6f8e 100644 --- a/vendor/modernc.org/libc/signal/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/signal/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o signal/signal_freebsd_386.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_openbsd_386.go -pkgname signal', DO NOT EDIT. package signal diff --git a/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go b/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go index b76175f652..5ba65f06e0 100644 --- a/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o signal/signal_openbsd_amd64.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_openbsd_arm64.go -pkgname signal', DO NOT EDIT. package signal diff --git a/vendor/modernc.org/libc/signal/capi_windows_386.go b/vendor/modernc.org/libc/signal/capi_windows_386.go index d76512770f..b402e079ed 100644 --- a/vendor/modernc.org/libc/signal/capi_windows_386.go +++ b/vendor/modernc.org/libc/signal/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_windows_386.go -pkgname signal', DO NOT EDIT. package signal diff --git a/vendor/modernc.org/libc/signal/signal_darwin_amd64.go b/vendor/modernc.org/libc/signal/signal_darwin_amd64.go index e820a96bfa..2b6fd68702 100644 --- a/vendor/modernc.org/libc/signal/signal_darwin_amd64.go +++ b/vendor/modernc.org/libc/signal/signal_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_darwin_amd64.go -pkgname signal', DO NOT EDIT. package signal @@ -15,157 +15,157 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUS_ADRALN = 1 - BUS_ADRERR = 2 - BUS_NOOP = 0 - BUS_OBJERR = 3 - CLD_CONTINUED = 6 - CLD_DUMPED = 3 - CLD_EXITED = 1 - CLD_KILLED = 2 - CLD_NOOP = 0 - CLD_STOPPED = 5 - CLD_TRAPPED = 4 - FPE_FLTDIV = 1 - FPE_FLTINV = 5 - FPE_FLTOVF = 2 - FPE_FLTRES = 4 - FPE_FLTSUB = 6 - FPE_FLTUND = 3 - FPE_INTDIV = 7 - FPE_INTOVF = 8 - FPE_NOOP = 0 - FP_CHOP = 3 - FP_PREC_24B = 0 - FP_PREC_53B = 2 - FP_PREC_64B = 3 - FP_RND_DOWN = 1 - FP_RND_NEAR = 0 - FP_RND_UP = 2 - FP_STATE_BYTES = 512 - ILL_BADSTK = 8 - ILL_COPROC = 7 - ILL_ILLADR = 5 - ILL_ILLOPC = 1 - ILL_ILLOPN = 4 - ILL_ILLTRP = 2 - ILL_NOOP = 0 - ILL_PRVOPC = 3 - ILL_PRVREG = 6 - MINSIGSTKSZ = 32768 - NSIG = 32 - POLL_ERR = 4 - POLL_HUP = 6 - POLL_IN = 1 - POLL_MSG = 3 - POLL_OUT = 2 - POLL_PRI = 5 - SA_64REGSET = 0x0200 - SA_NOCLDSTOP = 0x0008 - SA_NOCLDWAIT = 0x0020 - SA_NODEFER = 0x0010 - SA_ONSTACK = 0x0001 - SA_RESETHAND = 0x0004 - SA_RESTART = 0x0002 - SA_SIGINFO = 0x0040 - SA_USERSPACE_MASK = 127 - SA_USERTRAMP = 0x0100 - SEGV_ACCERR = 2 - SEGV_MAPERR = 1 - SEGV_NOOP = 0 - SIGABRT = 6 - SIGALRM = 14 - SIGBUS = 10 - SIGCHLD = 20 - SIGCONT = 19 - SIGEMT = 7 - SIGEV_NONE = 0 - SIGEV_SIGNAL = 1 - SIGEV_THREAD = 3 - SIGFPE = 8 - SIGHUP = 1 - SIGILL = 4 - SIGINFO = 29 - SIGINT = 2 - SIGIO = 23 - SIGIOT = 6 - SIGKILL = 9 - SIGPIPE = 13 - SIGPROF = 27 - SIGQUIT = 3 - SIGSEGV = 11 - SIGSTKSZ = 131072 - SIGSTOP = 17 - SIGSYS = 12 - SIGTERM = 15 - SIGTRAP = 5 - SIGTSTP = 18 - SIGTTIN = 21 - SIGTTOU = 22 - SIGURG = 16 - SIGUSR1 = 30 - SIGUSR2 = 31 - SIGVTALRM = 26 - SIGWINCH = 28 - SIGXCPU = 24 - SIGXFSZ = 25 - SIG_BLOCK = 1 - SIG_SETMASK = 3 - SIG_UNBLOCK = 2 - SI_ASYNCIO = 0x10004 - SI_MESGQ = 0x10005 - SI_QUEUE = 0x10002 - SI_TIMER = 0x10003 - SI_USER = 0x10001 - SS_DISABLE = 0x0004 - SS_ONSTACK = 0x0001 - SV_INTERRUPT = 2 - SV_NOCLDSTOP = 8 - SV_NODEFER = 16 - SV_ONSTACK = 1 - SV_RESETHAND = 4 - SV_SIGINFO = 64 - TRAP_BRKPT = 1 - TRAP_TRACE = 2 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_SIGNAL_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_I386_SIGNAL_H_ = 1 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MACH_I386__STRUCTS_H_ = 0 - X_MACH_MACHINE__STRUCTS_H_ = 0 - X_MCONTEXT_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_T = 0 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_SYS_SIGNAL_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USER_SIGNAL_H = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + BUS_ADRALN = 1 // signal.h:241:1: + BUS_ADRERR = 2 // signal.h:242:1: + BUS_NOOP = 0 // signal.h:239:1: + BUS_OBJERR = 3 // signal.h:243:1: + CLD_CONTINUED = 6 // signal.h:258:1: + CLD_DUMPED = 3 // signal.h:255:1: + CLD_EXITED = 1 // signal.h:253:1: + CLD_KILLED = 2 // signal.h:254:1: + CLD_NOOP = 0 // signal.h:251:1: + CLD_STOPPED = 5 // signal.h:257:1: + CLD_TRAPPED = 4 // signal.h:256:1: + FPE_FLTDIV = 1 // signal.h:221:1: + FPE_FLTINV = 5 // signal.h:225:1: + FPE_FLTOVF = 2 // signal.h:222:1: + FPE_FLTRES = 4 // signal.h:224:1: + FPE_FLTSUB = 6 // signal.h:226:1: + FPE_FLTUND = 3 // signal.h:223:1: + FPE_INTDIV = 7 // signal.h:227:1: + FPE_INTOVF = 8 // signal.h:228:1: + FPE_NOOP = 0 // signal.h:219:1: + FP_CHOP = 3 // _structs.h:112:1: + FP_PREC_24B = 0 // _structs.h:103:1: + FP_PREC_53B = 2 // _structs.h:104:1: + FP_PREC_64B = 3 // _structs.h:105:1: + FP_RND_DOWN = 1 // _structs.h:110:1: + FP_RND_NEAR = 0 // _structs.h:109:1: + FP_RND_UP = 2 // _structs.h:111:1: + FP_STATE_BYTES = 512 // _structs.h:276:1: + ILL_BADSTK = 8 // signal.h:215:1: + ILL_COPROC = 7 // signal.h:214:1: + ILL_ILLADR = 5 // signal.h:212:1: + ILL_ILLOPC = 1 // signal.h:208:1: + ILL_ILLOPN = 4 // signal.h:211:1: + ILL_ILLTRP = 2 // signal.h:209:1: + ILL_NOOP = 0 // signal.h:206:1: + ILL_PRVOPC = 3 // signal.h:210:1: + ILL_PRVREG = 6 // signal.h:213:1: + MINSIGSTKSZ = 32768 // signal.h:340:1: + NSIG = 32 // signal.h:79:1: + POLL_ERR = 4 // signal.h:264:1: + POLL_HUP = 6 // signal.h:266:1: + POLL_IN = 1 // signal.h:261:1: + POLL_MSG = 3 // signal.h:263:1: + POLL_OUT = 2 // signal.h:262:1: + POLL_PRI = 5 // signal.h:265:1: + SA_64REGSET = 0x0200 // signal.h:308:1: + SA_NOCLDSTOP = 0x0008 // signal.h:301:1: + SA_NOCLDWAIT = 0x0020 // signal.h:303:1: + SA_NODEFER = 0x0010 // signal.h:302:1: + SA_ONSTACK = 0x0001 // signal.h:298:1: + SA_RESETHAND = 0x0004 // signal.h:300:1: + SA_RESTART = 0x0002 // signal.h:299:1: + SA_SIGINFO = 0x0040 // signal.h:304:1: + SA_USERSPACE_MASK = 127 // signal.h:314:1: + SA_USERTRAMP = 0x0100 // signal.h:306:1: + SEGV_ACCERR = 2 // signal.h:235:1: + SEGV_MAPERR = 1 // signal.h:234:1: + SEGV_NOOP = 0 // signal.h:232:1: + SIGABRT = 6 // signal.h:89:1: + SIGALRM = 14 // signal.h:102:1: + SIGBUS = 10 // signal.h:98:1: + SIGCHLD = 20 // signal.h:108:1: + SIGCONT = 19 // signal.h:107:1: + SIGEMT = 7 // signal.h:94:1: + SIGEV_NONE = 0 // signal.h:164:1: + SIGEV_SIGNAL = 1 // signal.h:165:1: + SIGEV_THREAD = 3 // signal.h:166:1: + SIGFPE = 8 // signal.h:96:1: + SIGHUP = 1 // signal.h:84:1: + SIGILL = 4 // signal.h:87:1: + SIGINFO = 29 // signal.h:120:1: + SIGINT = 2 // signal.h:85:1: + SIGIO = 23 // signal.h:112:1: + SIGIOT = 6 // signal.h:93:1: + SIGKILL = 9 // signal.h:97:1: + SIGPIPE = 13 // signal.h:101:1: + SIGPROF = 27 // signal.h:117:1: + SIGQUIT = 3 // signal.h:86:1: + SIGSEGV = 11 // signal.h:99:1: + SIGSTKSZ = 131072 // signal.h:341:1: + SIGSTOP = 17 // signal.h:105:1: + SIGSYS = 12 // signal.h:100:1: + SIGTERM = 15 // signal.h:103:1: + SIGTRAP = 5 // signal.h:88:1: + SIGTSTP = 18 // signal.h:106:1: + SIGTTIN = 21 // signal.h:109:1: + SIGTTOU = 22 // signal.h:110:1: + SIGURG = 16 // signal.h:104:1: + SIGUSR1 = 30 // signal.h:122:1: + SIGUSR2 = 31 // signal.h:123:1: + SIGVTALRM = 26 // signal.h:116:1: + SIGWINCH = 28 // signal.h:119:1: + SIGXCPU = 24 // signal.h:114:1: + SIGXFSZ = 25 // signal.h:115:1: + SIG_BLOCK = 1 // signal.h:319:1: + SIG_SETMASK = 3 // signal.h:321:1: + SIG_UNBLOCK = 2 // signal.h:320:1: + SI_ASYNCIO = 0x10004 // signal.h:327:1: + SI_MESGQ = 0x10005 // signal.h:328:1: + SI_QUEUE = 0x10002 // signal.h:325:1: + SI_TIMER = 0x10003 // signal.h:326:1: + SI_USER = 0x10001 // signal.h:324:1: + SS_DISABLE = 0x0004 // signal.h:339:1: + SS_ONSTACK = 0x0001 // signal.h:338:1: + SV_INTERRUPT = 2 // signal.h:355:1: + SV_NOCLDSTOP = 8 // signal.h:358:1: + SV_NODEFER = 16 // signal.h:357:1: + SV_ONSTACK = 1 // signal.h:354:1: + SV_RESETHAND = 4 // signal.h:356:1: + SV_SIGINFO = 64 // signal.h:359:1: + TRAP_BRKPT = 1 // signal.h:246:1: + TRAP_TRACE = 2 // signal.h:247:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_SIGNAL_H_ = 0 // signal.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_I386_SIGNAL_H_ = 1 // signal.h:34:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MACH_I386__STRUCTS_H_ = 0 // _structs.h:33:1: + X_MACH_MACHINE__STRUCTS_H_ = 0 // _structs.h:30:1: + X_MCONTEXT_T = 0 // _mcontext.h:202:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:70:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USER_SIGNAL_H = 0 // signal.h:59:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/signal/signal_openbsd_386.go b/vendor/modernc.org/libc/signal/signal_openbsd_386.go index fa9b0a7ae0..8b611349f9 100644 --- a/vendor/modernc.org/libc/signal/signal_openbsd_386.go +++ b/vendor/modernc.org/libc/signal/signal_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o signal/signal_freebsd_386.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_openbsd_386.go -pkgname signal', DO NOT EDIT. package signal @@ -15,156 +15,177 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUS_ADRALN = 1 // signal.h:315:1: - BUS_ADRERR = 2 // signal.h:316:1: - BUS_OBJERR = 3 // signal.h:317:1: - BUS_OOMERR = 100 // signal.h:318:1: - CLD_CONTINUED = 6 // signal.h:350:1: - CLD_DUMPED = 3 // signal.h:346:1: - CLD_EXITED = 1 // signal.h:343:1: - CLD_KILLED = 2 // signal.h:344:1: - CLD_STOPPED = 5 // signal.h:349:1: - CLD_TRAPPED = 4 // signal.h:348:1: - FPE_FLTDIV = 3 // signal.h:329:1: - FPE_FLTINV = 7 // signal.h:333:1: - FPE_FLTOVF = 4 // signal.h:330:1: - FPE_FLTRES = 6 // signal.h:332:1: - FPE_FLTSUB = 8 // signal.h:334:1: - FPE_FLTUND = 5 // signal.h:331:1: - FPE_INTDIV = 2 // signal.h:328:1: - FPE_INTOVF = 1 // signal.h:327:1: - ILL_BADSTK = 8 // signal.h:312:1: - ILL_COPROC = 7 // signal.h:311:1: - ILL_ILLADR = 3 // signal.h:307:1: - ILL_ILLOPC = 1 // signal.h:305:1: - ILL_ILLOPN = 2 // signal.h:306:1: - ILL_ILLTRP = 4 // signal.h:308:1: - ILL_PRVOPC = 5 // signal.h:309:1: - ILL_PRVREG = 6 // signal.h:310:1: - MINSIGSTKSZ = 2048 // signal.h:432:1: - NSIG = 32 // signal.h:399:1: - POLL_ERR = 4 // signal.h:356:1: - POLL_HUP = 6 // signal.h:358:1: - POLL_IN = 1 // signal.h:353:1: - POLL_MSG = 3 // signal.h:355:1: - POLL_OUT = 2 // signal.h:354:1: - POLL_PRI = 5 // signal.h:357:1: - SA_NOCLDSTOP = 0x0008 // signal.h:386:1: - SA_NOCLDWAIT = 0x0020 // signal.h:394:1: - SA_NODEFER = 0x0010 // signal.h:393:1: - SA_ONSTACK = 0x0001 // signal.h:390:1: - SA_RESETHAND = 0x0004 // signal.h:392:1: - SA_RESTART = 0x0002 // signal.h:391:1: - SA_SIGINFO = 0x0040 // signal.h:395:1: - SEGV_ACCERR = 2 // signal.h:322:1: - SEGV_MAPERR = 1 // signal.h:321:1: - SEGV_PKUERR = 100 // signal.h:324:1: - SIGABRT = 6 // signal.h:81:1: - SIGALRM = 14 // signal.h:99:1: - SIGBUS = 10 // signal.h:91:1: - SIGCHLD = 20 // signal.h:109:1: - SIGCONT = 19 // signal.h:108:1: - SIGEMT = 7 // signal.h:84:1: - SIGEV_KEVENT = 3 // signal.h:222:1: - SIGEV_NONE = 0 // signal.h:218:1: - SIGEV_SIGNAL = 1 // signal.h:219:1: - SIGEV_THREAD = 2 // signal.h:220:1: - SIGEV_THREAD_ID = 4 // signal.h:223:1: - SIGFPE = 8 // signal.h:86:1: - SIGHUP = 1 // signal.h:71:1: - SIGILL = 4 // signal.h:77:1: - SIGINFO = 29 // signal.h:124:1: - SIGINT = 2 // signal.h:73:1: - SIGIO = 23 // signal.h:114:1: - SIGIOT = 6 // signal.h:83:1: - SIGKILL = 9 // signal.h:88:1: - SIGLIBRT = 33 // signal.h:133:1: - SIGLWP = 32 // signal.h:132:1: - SIGPIPE = 13 // signal.h:98:1: - SIGPROF = 27 // signal.h:120:1: - SIGQUIT = 3 // signal.h:75:1: - SIGRTMAX = 126 // signal.h:137:1: - SIGRTMIN = 65 // signal.h:136:1: - SIGSEGV = 11 // signal.h:93:1: - SIGSTKSZ = 34816 // signal.h:433:1: - SIGSTOP = 17 // signal.h:106:1: - SIGSYS = 12 // signal.h:95:1: - SIGTERM = 15 // signal.h:101:1: - SIGTHR = 32 // signal.h:131:1: - SIGTRAP = 5 // signal.h:79:1: - SIGTSTP = 18 // signal.h:107:1: - SIGTTIN = 21 // signal.h:110:1: - SIGTTOU = 22 // signal.h:111:1: - SIGURG = 16 // signal.h:103:1: - SIGUSR1 = 30 // signal.h:127:1: - SIGUSR2 = 31 // signal.h:128:1: - SIGVTALRM = 26 // signal.h:119:1: - SIGWINCH = 28 // signal.h:123:1: - SIGXCPU = 24 // signal.h:117:1: - SIGXFSZ = 25 // signal.h:118:1: - SIG_BLOCK = 1 // signal.h:501:1: - SIG_SETMASK = 3 // signal.h:503:1: - SIG_UNBLOCK = 2 // signal.h:502:1: - SI_ASYNCIO = 0x10004 // signal.h:408:1: - SI_KERNEL = 0x10006 // signal.h:412:1: - SI_LWP = 0x10007 // signal.h:413:1: - SI_MESGQ = 0x10005 // signal.h:410:1: - SI_NOINFO = 0 // signal.h:403:1: - SI_QUEUE = 0x10002 // signal.h:405:1: - SI_TIMER = 0x10003 // signal.h:406:1: - SI_UNDEFINED = 0 // signal.h:416:1: - SI_USER = 0x10001 // signal.h:404:1: - SS_DISABLE = 0x0004 // signal.h:431:1: - SS_ONSTACK = 0x0001 // signal.h:430:1: - SV_INTERRUPT = 2 // signal.h:459:1: - SV_NOCLDSTOP = 8 // signal.h:462:1: - SV_NODEFER = 16 // signal.h:461:1: - SV_ONSTACK = 1 // signal.h:458:1: - SV_RESETHAND = 4 // signal.h:460:1: - SV_SIGINFO = 64 // signal.h:463:1: - TRAP_BRKPT = 1 // signal.h:337:1: - TRAP_CAP = 4 // signal.h:340:1: - TRAP_DTRACE = 3 // signal.h:339:1: - TRAP_TRACE = 2 // signal.h:338:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: - X_MACHINE_UCONTEXT_H_ = 0 // ucontext.h:34:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MC_FLAG_MASK = 7 // ucontext.h:42:1: - X_MC_FPFMT_387 = 0x10001 // ucontext.h:74:1: - X_MC_FPFMT_NODEV = 0x10000 // ucontext.h:73:1: - X_MC_FPFMT_XMM = 0x10002 // ucontext.h:75:1: - X_MC_FPOWNED_FPU = 0x20001 // ucontext.h:78:1: - X_MC_FPOWNED_NONE = 0x20000 // ucontext.h:77:1: - X_MC_FPOWNED_PCB = 0x20002 // ucontext.h:79:1: - X_MC_HASBASES = 0x2 // ucontext.h:40:1: - X_MC_HASFPXSTATE = 0x4 // ucontext.h:41:1: - X_MC_HASSEGS = 0x1 // ucontext.h:39:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PID_T_DECLARED = 0 // signal.h:61:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_SIGNAL_H_ = 0 // signal.h:36:1: - X_SIGSET_T_DECLARED = 0 // signal.h:165:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // signal.h:57:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_SYS__UCONTEXT_H_ = 0 // _ucontext.h:34:1: - X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - X_UID_T_DECLARED = 0 // signal.h:62:1: - X_X86_SIGNAL_H = 1 // signal.h:37:1: - X_X86_UCONTEXT_H_ = 0 // ucontext.h:35:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BUS_ADRALN = 1 // siginfo.h:83:1: + BUS_ADRERR = 2 // siginfo.h:84:1: + BUS_OBJERR = 3 // siginfo.h:85:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLD_CONTINUED = 6 // siginfo.h:105:1: + CLD_DUMPED = 3 // siginfo.h:102:1: + CLD_EXITED = 1 // siginfo.h:100:1: + CLD_KILLED = 2 // siginfo.h:101:1: + CLD_STOPPED = 5 // siginfo.h:104:1: + CLD_TRAPPED = 4 // siginfo.h:103:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + EMT_TAGOVF = 1 // siginfo.h:66:1: + FD_SETSIZE = 1024 // select.h:62:1: + FPE_FLTDIV = 3 // siginfo.h:71:1: + FPE_FLTINV = 7 // siginfo.h:75:1: + FPE_FLTOVF = 4 // siginfo.h:72:1: + FPE_FLTRES = 6 // siginfo.h:74:1: + FPE_FLTSUB = 8 // siginfo.h:76:1: + FPE_FLTUND = 5 // siginfo.h:73:1: + FPE_INTDIV = 1 // siginfo.h:69:1: + FPE_INTOVF = 2 // siginfo.h:70:1: + ILL_BADSTK = 8 // siginfo.h:63:1: + ILL_COPROC = 7 // siginfo.h:62:1: + ILL_ILLADR = 3 // siginfo.h:58:1: + ILL_ILLOPC = 1 // siginfo.h:56:1: + ILL_ILLOPN = 2 // siginfo.h:57:1: + ILL_ILLTRP = 4 // siginfo.h:59:1: + ILL_PRVOPC = 5 // siginfo.h:60:1: + ILL_PRVREG = 6 // siginfo.h:61:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + MINSIGSTKSZ = 12288 // signal.h:183:1: + NBBY = 8 // select.h:111:1: + NSIG = 33 // signal.h:48:1: + NSIGBUS = 3 // siginfo.h:86:1: + NSIGCLD = 6 // siginfo.h:106:1: + NSIGEMT = 1 // siginfo.h:67:1: + NSIGFPE = 8 // siginfo.h:77:1: + NSIGILL = 8 // siginfo.h:64:1: + NSIGSEGV = 2 // siginfo.h:81:1: + NSIGTRAP = 2 // siginfo.h:95:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SA_NOCLDSTOP = 0x0008 // signal.h:132:1: + SA_NOCLDWAIT = 0x0020 // signal.h:130:1: + SA_NODEFER = 0x0010 // signal.h:129:1: + SA_ONSTACK = 0x0001 // signal.h:126:1: + SA_RESETHAND = 0x0004 // signal.h:128:1: + SA_RESTART = 0x0002 // signal.h:127:1: + SA_SIGINFO = 0x0040 // signal.h:134:1: + SEGV_ACCERR = 2 // siginfo.h:80:1: + SEGV_MAPERR = 1 // siginfo.h:79:1: + SIGABRT = 6 // signal.h:56:1: + SIGALRM = 14 // signal.h:67:1: + SIGBUS = 10 // signal.h:63:1: + SIGCHLD = 20 // signal.h:73:1: + SIGCONT = 19 // signal.h:72:1: + SIGEMT = 7 // signal.h:59:1: + SIGFPE = 8 // signal.h:61:1: + SIGHUP = 1 // signal.h:51:1: + SIGILL = 4 // signal.h:54:1: + SIGINFO = 29 // signal.h:85:1: + SIGINT = 2 // signal.h:52:1: + SIGIO = 23 // signal.h:77:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:62:1: + SIGPIPE = 13 // signal.h:66:1: + SIGPROF = 27 // signal.h:82:1: + SIGQUIT = 3 // signal.h:53:1: + SIGSEGV = 11 // signal.h:64:1: + SIGSTKSZ = 28672 // signal.h:185:1: + SIGSTOP = 17 // signal.h:70:1: + SIGSYS = 12 // signal.h:65:1: + SIGTERM = 15 // signal.h:68:1: + SIGTHR = 32 // signal.h:90:1: + SIGTRAP = 5 // signal.h:55:1: + SIGTSTP = 18 // signal.h:71:1: + SIGTTIN = 21 // signal.h:74:1: + SIGTTOU = 22 // signal.h:75:1: + SIGURG = 16 // signal.h:69:1: + SIGUSR1 = 30 // signal.h:87:1: + SIGUSR2 = 31 // signal.h:88:1: + SIGVTALRM = 26 // signal.h:81:1: + SIGWINCH = 28 // signal.h:84:1: + SIGXCPU = 24 // signal.h:79:1: + SIGXFSZ = 25 // signal.h:80:1: + SIG_BLOCK = 1 // signal.h:140:1: + SIG_SETMASK = 3 // signal.h:142:1: + SIG_UNBLOCK = 2 // signal.h:141:1: + SI_LWP = -1 // siginfo.h:47:1: + SI_MAXSZ = 128 // siginfo.h:127:1: + SI_NOINFO = 32767 // siginfo.h:45:1: + SI_QUEUE = -2 // siginfo.h:48:1: + SI_TIMER = -3 // siginfo.h:49:1: + SI_USER = 0 // siginfo.h:46:1: + SS_DISABLE = 0x0004 // signal.h:182:1: + SS_ONSTACK = 0x0001 // signal.h:181:1: + SV_INTERRUPT = 2 // signal.h:158:1: + SV_ONSTACK = 1 // signal.h:157:1: + SV_RESETHAND = 4 // signal.h:159:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + TRAP_BRKPT = 1 // siginfo.h:93:1: + TRAP_TRACE = 2 // siginfo.h:94:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NSIG = 33 // signal.h:45:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGINFO_H = 0 // siginfo.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_USER_SIGNAL_H = 0 // signal.h:36:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -176,9 +197,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $ +// $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -207,11 +229,79 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // @(#)signal.h 8.3 (Berkeley) 3/30/94 -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-3-Clause +// $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $ +// $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $ + +// Copyright (c) 1982, 1986, 1989, 1991, 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. +// 3. 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. +// +// @(#)signal.h 8.2 (Berkeley) 1/21/94 + +// $OpenBSD: signal.h,v 1.11 2016/05/10 18:39:45 deraadt Exp $ +// $NetBSD: signal.h,v 1.6 1996/01/08 13:51:43 mycroft Exp $ + +// Copyright (c) 1982, 1986, 1989, 1991 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. +// 3. 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. // +// @(#)signal.h 7.16 (Berkeley) 3/17/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -242,63 +332,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -327,117 +393,113 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 -// -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. -// -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. - -// Type Safety Checking -// -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. - -// Lock annotations. -// -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. -// -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. - -// Function releases a lock. - -// Function asserts that an exclusive or shared lock is held. - -// Function requires that an exclusive or shared lock is or is not held. - -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type Sig_atomic_t = int32 /* signal.h:40:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +type Sigcontext = struct { + Fsc_gs int32 + Fsc_fs int32 + Fsc_es int32 + Fsc_ds int32 + Fsc_edi int32 + Fsc_esi int32 + Fsc_ebp int32 + Fsc_ebx int32 + Fsc_edx int32 + Fsc_ecx int32 + Fsc_eax int32 + Fsc_eip int32 + Fsc_cs int32 + Fsc_eflags int32 + Fsc_esp int32 + Fsc_ss int32 + Fsc_cookie int32 + Fsc_mask int32 + Fsc_trapno int32 + Fsc_err int32 + Fsc_fpstate uintptr +} /* signal.h:54:1 */ + +// Language spec says we must list exactly one parameter, even though we +// actually supply three. Ugh! + +type Sigset_t = uint32 /* signal.h:104:22 */ + +// $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $ + +// Copyright (c) 1997 Theo de Raadt // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -449,23 +511,20 @@ type X__float128 = float64 /* :47:21 */ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -496,18 +555,24 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +type Sigval = struct{ Fsival_int int32 } /* siginfo.h:33:1 */ -// - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 +// Negative signal codes are reserved for future use for +// user generated signals. + +// The machine dependent signal codes (SIGILL, SIGFPE, +// SIGSEGV, and SIGBUS) + +// SIGTRAP signal codes + +// SIGCHLD signal codes + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ + +// Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -518,11 +583,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -538,18 +599,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)time.h 8.2 (Berkeley) 7/10/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1992, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -576,159 +631,13 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// @(#)select.h 8.2 (Berkeley) 1/4/94 -type X__int64_t = int64 /* _types.h:66:20 */ - -type X__uint64_t = uint64 /* _types.h:68:28 */ - -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// Copyright (c) 1982, 1986, 1991, 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 @@ -760,12 +669,11 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -796,14 +704,12 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -814,30 +720,33 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-3-Clause +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // -// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + +// Copyright (c) 1991, 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. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -863,29 +772,12 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -895,34 +787,28 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // 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. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -947,14 +833,13 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1990, 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 @@ -964,11 +849,14 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -977,126 +865,284 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// sigset_t macros. +// Tell sys/endian.h we have MD variants of the swap macros. -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ +// Note that these macros evaluate their arguments several times. -// - -// This file is in the public domain. -// $FreeBSD$ +// Public names -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. -// 3. 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. -// -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// These are specified to be function-like macros to match the spec -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.1 (Berkeley) 6/11/93 -// $FreeBSD$ +// POSIX names -// - -// SPDX-License-Identifier: BSD-3-Clause +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ + +// Copyright (c) 1989 The Regents of the University of California. +// All rights reserved. // -// Copyright (c) 1986, 1989, 1991, 1993 -// The Regents of the University of California. All rights reserved. -// Copyright (c) 2003 Peter Wemm. +// (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 @@ -1122,14 +1168,11 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.1 (Berkeley) 6/11/93 -// $FreeBSD$ +// @(#)time.h 5.12 (Berkeley) 3/9/91 -// Machine-dependent signal definitions +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -1160,19 +1203,18 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// Copyright (c) 1990, 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 @@ -1198,79 +1240,13 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -type Sig_atomic_t = int32 /* signal.h:47:13 */ +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) -type Sigcontext = struct { - Fsc_mask struct{ F__bits [4]X__uint32_t } - Fsc_onstack int32 - Fsc_gs int32 - Fsc_fs int32 - Fsc_es int32 - Fsc_ds int32 - Fsc_edi int32 - Fsc_esi int32 - Fsc_ebp int32 - Fsc_isp int32 - Fsc_ebx int32 - Fsc_edx int32 - Fsc_ecx int32 - Fsc_eax int32 - Fsc_trapno int32 - Fsc_err int32 - Fsc_eip int32 - Fsc_cs int32 - Fsc_efl int32 - Fsc_esp int32 - Fsc_ss int32 - Fsc_len int32 - Fsc_fpformat int32 - Fsc_ownedfp int32 - Fsc_flags int32 - Fsc_fpstate [128]int32 - Fsc_fsbase int32 - Fsc_gsbase int32 - Fsc_xfpustate int32 - Fsc_xfpustate_len int32 - Fsc_spare2 [4]int32 -} /* signal.h:50:1 */ - -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ - -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ - -// Additional type definitions: -// -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // @@ -1297,102 +1273,58 @@ type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ // 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Time_t = X__time_t /* _timespec.h:42:18 */ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -type Uid_t = X__uid_t /* signal.h:61:18 */ - -type Sigset_t = X__sigset_t /* signal.h:166:20 */ +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits -type Sigval = struct{ Fsival_int int32 } /* signal.h:171:1 */ - -type Sigevent = struct { - Fsigev_notify int32 - Fsigev_signo int32 - Fsigev_value struct{ Fsival_int int32 } - F_sigev_un struct { - F_threadid X__lwpid_t - F__ccgo_pad1 [28]byte +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 } -} /* signal.h:195:1 */ - -type X__siginfo = struct { - Fsi_signo int32 - Fsi_errno int32 - Fsi_code int32 - Fsi_pid X__pid_t - Fsi_uid X__uid_t - Fsi_status int32 - Fsi_addr uintptr - Fsi_value struct{ Fsival_int int32 } - F_reason struct { - F_fault struct{ F_trapno int32 } - F__ccgo_pad1 [28]byte + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 } -} /* signal.h:229:9 */ - -type Siginfo_t = X__siginfo /* signal.h:263:3 */ +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +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 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_code int32 + Fsi_errno int32 + F_data struct{ F_pad [29]int32 } +} /* siginfo.h:173:3 */ // Signal vector "template" used in sigaction call. type Sigaction = struct { F__sigaction_u struct{ F__sa_handler uintptr } - Fsa_flags int32 Fsa_mask Sigset_t -} /* signal.h:368:1 */ - -// If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. - -// a timer set by timer_settime(). -// an asynchronous I/O request. -// message on an empty message queue. + Fsa_flags int32 +} /* signal.h:112:1 */ -type Sig_t = uintptr /* signal.h:420:24 */ +// if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. -type Sigaltstack = struct { - Fss_sp uintptr - Fss_size X__size_t - Fss_flags int32 -} /* signal.h:428:9 */ +// Flags for sigprocmask: -type Stack_t = Sigaltstack /* signal.h:428:26 */ +type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function // 4.3 compatibility: // Signal vector "template" used in sigvec call. @@ -1400,259 +1332,24 @@ type Sigvec = struct { Fsv_handler uintptr Fsv_mask int32 Fsv_flags int32 -} /* signal.h:452:1 */ - -// Keep this in one place only +} /* signal.h:152:1 */ -// Structure used in sigstack call. -type Sigstack = struct { - Fss_sp uintptr - Fss_onstack int32 -} /* signal.h:479:1 */ +// Macro for converting signal number to a mask suitable for +// sigblock(). -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1999 Marcel Moolenaar -// 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 -// in this position and unchanged. -// 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 BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 2003 Peter Wemm -// Copyright (c) 1999 Marcel Moolenaar -// 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 -// in this position and unchanged. -// 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 BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -// Keep _MC_* values similar to amd64 - -type X__mcontext = struct { - Fmc_onstack X__register_t - Fmc_gs X__register_t - Fmc_fs X__register_t - Fmc_es X__register_t - Fmc_ds X__register_t - Fmc_edi X__register_t - Fmc_esi X__register_t - Fmc_ebp X__register_t - Fmc_isp X__register_t - Fmc_ebx X__register_t - Fmc_edx X__register_t - Fmc_ecx X__register_t - Fmc_eax X__register_t - Fmc_trapno X__register_t - Fmc_err X__register_t - Fmc_eip X__register_t - Fmc_cs X__register_t - Fmc_eflags X__register_t - Fmc_esp X__register_t - Fmc_ss X__register_t - Fmc_len int32 - Fmc_fpformat int32 - Fmc_ownedfp int32 - Fmc_flags X__register_t - Fmc_fpstate [128]int32 - Fmc_fsbase X__register_t - Fmc_gsbase X__register_t - Fmc_xfpustate X__register_t - Fmc_xfpustate_len X__register_t - Fmc_spare2 [4]int32 -} /* ucontext.h:44:9 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1999 Marcel Moolenaar -// 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 -// in this position and unchanged. -// 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 BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 2003 Peter Wemm -// Copyright (c) 1999 Marcel Moolenaar -// 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 -// in this position and unchanged. -// 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 BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -// Keep _MC_* values similar to amd64 - -type Mcontext_t = X__mcontext /* ucontext.h:94:3 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1999 Marcel Moolenaar -// 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 -// in this position and unchanged. -// 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 BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -type X__ucontext = struct { - Fuc_sigmask X__sigset_t - Fuc_mcontext Mcontext_t - Fuc_link uintptr - Fuc_stack struct { - Fss_sp uintptr - Fss_size X__size_t - Fss_flags int32 - } - Fuc_flags int32 - F__spare__ [4]int32 -} /* _ucontext.h:36:9 */ +// Structure used in sigaltstack call. +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* signal.h:176:9 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1999 Marcel Moolenaar -// 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 -// in this position and unchanged. -// 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 BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ +// Macro for converting signal number to a mask suitable for +// sigblock(). -type Ucontext_t = X__ucontext /* _ucontext.h:52:3 */ +// Structure used in sigaltstack call. +type Stack_t = Sigaltstack /* signal.h:180:3 */ -type Pid_t = X__pid_t /* signal.h:60:18 */ // XXX -type X__pthread_t = uintptr /* signal.h:67:24 */ +type Ucontext_t = Sigcontext /* signal.h:190:27 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go b/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go index bbbc9e2bec..50a97bfde4 100644 --- a/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go +++ b/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go @@ -138,8 +138,8 @@ const ( TRAP_TRACE = 2 // siginfo.h:94:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -154,16 +154,16 @@ const ( X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: X_NSIG = 33 // signal.h:45:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -175,17 +175,17 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: X_USER_SIGNAL_H = 0 // signal.h:36:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -591,7 +591,7 @@ type Sigval = struct { // SIGCHLD signal codes -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -655,7 +655,7 @@ type Sigval = struct { // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -825,7 +825,7 @@ type Sigval = struct { // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -985,18 +985,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -1078,27 +1077,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -1234,7 +1232,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go b/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go index bbbc9e2bec..84f02714f8 100644 --- a/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go +++ b/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o signal/signal_openbsd_amd64.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_openbsd_arm64.go -pkgname signal', DO NOT EDIT. package signal @@ -137,9 +137,9 @@ const ( TRAP_BRKPT = 1 // siginfo.h:93:1: TRAP_TRACE = 2 // siginfo.h:94:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -148,23 +148,23 @@ const ( X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:37:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_NSIG = 33 // signal.h:45:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_SELECT_H_ = 0 // select.h:35:1: @@ -175,17 +175,17 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: X_USER_SIGNAL_H = 0 // signal.h:36:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -276,11 +276,12 @@ type X__float128 = float64 /* :47:21 */ // // @(#)signal.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: signal.h,v 1.9 2016/05/10 18:39:42 deraadt Exp $ -// $NetBSD: signal.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ - -// Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California. -// All rights reserved. +// $OpenBSD: signal.h,v 1.2 2017/03/12 17:57:12 kettenis Exp $ +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Ralph Campbell. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -306,7 +307,7 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)signal.h 7.16 (Berkeley) 3/17/91 +// @(#)signal.h 8.1 (Berkeley) 6/10/93 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ @@ -343,10 +344,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -470,7 +468,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -type Sig_atomic_t = int32 /* signal.h:40:13 */ +type Sig_atomic_t = int32 /* signal.h:41:13 */ // Information pushed on stack when a signal is delivered. // This is used by the kernel to restore state following @@ -478,37 +476,15 @@ type Sig_atomic_t = int32 /* signal.h:40:13 */ // to the handler to allow it to restore state properly if // a non-standard exit is performed. type Sigcontext = struct { - Fsc_rdi int64 - Fsc_rsi int64 - Fsc_rdx int64 - Fsc_rcx int64 - Fsc_r8 int64 - Fsc_r9 int64 - Fsc_r10 int64 - Fsc_r11 int64 - Fsc_r12 int64 - Fsc_r13 int64 - Fsc_r14 int64 - Fsc_r15 int64 - Fsc_rbp int64 - Fsc_rbx int64 - Fsc_rax int64 - Fsc_gs int64 - Fsc_fs int64 - Fsc_es int64 - Fsc_ds int64 - Fsc_trapno int64 - Fsc_err int64 - Fsc_rip int64 - Fsc_cs int64 - Fsc_rflags int64 - Fsc_rsp int64 - Fsc_ss int64 - Fsc_fpstate uintptr F__sc_unused int32 Fsc_mask int32 + Fsc_sp uint64 + Fsc_lr uint64 + Fsc_elr uint64 + Fsc_spsr uint64 + Fsc_x [30]uint64 Fsc_cookie int64 -} /* signal.h:54:1 */ +} /* signal.h:51:1 */ // Language spec says we must list exactly one parameter, even though we // actually supply three. Ugh! @@ -591,7 +567,7 @@ type Sigval = struct { // SIGCHLD signal codes -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -655,7 +631,7 @@ type Sigval = struct { // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -825,7 +801,7 @@ type Sigval = struct { // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -857,8 +833,7 @@ type Sigval = struct { // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -900,66 +875,68 @@ type Sigval = struct { // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -985,18 +962,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -1078,27 +1054,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -1234,7 +1209,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/signal/signal_windows_386.go b/vendor/modernc.org/libc/signal/signal_windows_386.go index 2b488a957e..7925155e5a 100644 --- a/vendor/modernc.org/libc/signal/signal_windows_386.go +++ b/vendor/modernc.org/libc/signal/signal_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname signal', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o signal/signal_windows_386.go -pkgname signal', DO NOT EDIT. package signal @@ -15,97 +15,97 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - NSIG = 23 - SIGABRT = 22 - SIGABRT2 = 22 - SIGABRT_COMPAT = 6 - SIGBREAK = 21 - SIGFPE = 8 - SIGILL = 4 - SIGINT = 2 - SIGSEGV = 11 - SIGTERM = 15 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - WIN_PTHREADS_SIGNAL_H = 0 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_SIGNAL = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIG_ATOMIC_T_DEFINED = 0 - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + NSIG = 23 // signal.h:21:1: + SIGABRT = 22 // signal.h:30:1: + SIGABRT2 = 22 // signal.h:31:1: + SIGABRT_COMPAT = 6 // signal.h:25:1: + SIGBREAK = 21 // signal.h:29:1: + SIGFPE = 8 // signal.h:26:1: + SIGILL = 4 // signal.h:24:1: + SIGINT = 2 // signal.h:23:1: + SIGSEGV = 11 // signal.h:27:1: + SIGTERM = 15 // signal.h:28:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + WIN_PTHREADS_SIGNAL_H = 0 // pthread_signal.h:24:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_SIGNAL = 0 // signal.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIG_ATOMIC_T_DEFINED = 0 // signal.h:17:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -139,6 +139,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -159,6 +164,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -199,26 +210,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -244,29 +257,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // // Copyright (c) 2013-2016 mingw-w64 project diff --git a/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go b/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go index 274e16c93c..3782209217 100644 --- a/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_darwin_amd64.go -pkgname stdio', DO NOT EDIT. package stdio diff --git a/vendor/modernc.org/libc/stdio/capi_openbsd_386.go b/vendor/modernc.org/libc/stdio/capi_openbsd_386.go index 1e381ebcc9..67c14eb1aa 100644 --- a/vendor/modernc.org/libc/stdio/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/stdio/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdio/stdio_freebsd_386.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_openbsd_386.go -pkgname stdio', DO NOT EDIT. package stdio diff --git a/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go b/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go index 3c095e74f9..e077230e0e 100644 --- a/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdio/stdio_openbsd_amd64.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_openbsd_arm64.go -pkgname stdio', DO NOT EDIT. package stdio diff --git a/vendor/modernc.org/libc/stdio/capi_windows_386.go b/vendor/modernc.org/libc/stdio/capi_windows_386.go index 280ea7c0c3..48013d5dbc 100644 --- a/vendor/modernc.org/libc/stdio/capi_windows_386.go +++ b/vendor/modernc.org/libc/stdio/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_windows_386.go -pkgname stdio', DO NOT EDIT. package stdio diff --git a/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go b/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go index f6f20867ad..129bf9865c 100644 --- a/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_darwin_amd64.go -pkgname stdio', DO NOT EDIT. package stdio @@ -15,60 +15,60 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUFSIZ = 1024 - EOF = -1 - FILENAME_MAX = 1024 - FOPEN_MAX = 20 - L_ctermid = 1024 - L_tmpnam = 1024 - P_tmpdir = "/var/tmp/" - RENAME_EXCL = 0x00000004 - RENAME_SECLUDE = 0x00000001 - RENAME_SWAP = 0x00000002 - SEEK_CUR = 1 - SEEK_END = 2 - SEEK_SET = 0 - TMP_MAX = 308915776 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CTERMID_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_FSTDIO = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IOFBF = 0 - X_IOLBF = 1 - X_IONBF = 2 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_SECURE__COMMON_H_ = 0 - X_SECURE__STDIO_H_ = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_STDIO_H_ = 0 - X_SYS_STDIO_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UINTPTR_T = 0 - X_USE_FORTIFY_LEVEL = 2 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_VA_LIST_T = 0 + BUFSIZ = 1024 // stdio.h:103:1: + EOF = -1 // stdio.h:104:1: + FILENAME_MAX = 1024 // stdio.h:108:1: + FOPEN_MAX = 20 // stdio.h:107:1: + L_ctermid = 1024 // stdio.h:202:1: + L_tmpnam = 1024 // stdio.h:114:1: + P_tmpdir = "/var/tmp/" // stdio.h:112:1: + RENAME_EXCL = 0x00000004 // stdio.h:45:1: + RENAME_SECLUDE = 0x00000001 // stdio.h:43:1: + RENAME_SWAP = 0x00000002 // stdio.h:44:1: + SEEK_CUR = 1 // stdio.h:121:1: + SEEK_END = 2 // stdio.h:124:1: + SEEK_SET = 0 // stdio.h:118:1: + TMP_MAX = 308915776 // stdio.h:115:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CTERMID_H_ = 0 // _ctermid.h:25:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_FSTDIO = 0 // _stdio.h:83:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IOFBF = 0 // stdio.h:99:1: + X_IOLBF = 1 // stdio.h:100:1: + X_IONBF = 2 // stdio.h:101:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_SECURE__COMMON_H_ = 0 // _common.h:25:1: + X_SECURE__STDIO_H_ = 0 // _stdio.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_STDIO_H_ = 0 // stdio.h:62:1: + X_SYS_STDIO_H_ = 0 // stdio.h:30:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USE_FORTIFY_LEVEL = 2 // _common.h:30:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_VA_LIST_T = 0 // _va_list.h:30:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go b/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go index 1a99d39116..be87fb6f5b 100644 --- a/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go +++ b/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdio/stdio_freebsd_386.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_openbsd_386.go -pkgname stdio', DO NOT EDIT. package stdio @@ -15,46 +15,62 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUFSIZ = 1024 // stdio.h:209:1: - EOF = -1 // stdio.h:210:1: - FILENAME_MAX = 1024 // stdio.h:221:1: - FOPEN_MAX = 20 // stdio.h:219:1: - L_ctermid = 1024 // stdio.h:319:1: - L_cuserid = 17 // stdio.h:315:1: - L_tmpnam = 1024 // stdio.h:227:1: - P_tmpdir = "/tmp/" // stdio.h:225:1: - SEEK_CUR = 1 // stdio.h:234:1: - SEEK_END = 2 // stdio.h:237:1: - SEEK_SET = 0 // stdio.h:231:1: - TMP_MAX = 308915776 // stdio.h:228:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_FSTDIO = 0 // stdio.h:82:1: - X_FTRUNCATE_DECLARED = 0 // stdio.h:435:1: - X_ILP32 = 1 // :1:1: - X_IOFBF = 0 // stdio.h:205:1: - X_IOLBF = 1 // stdio.h:206:1: - X_IONBF = 2 // stdio.h:207:1: - X_LSEEK_DECLARED = 0 // stdio.h:439:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MMAP_DECLARED = 0 // stdio.h:443:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF64_T_DECLARED = 0 // stdio.h:71:1: - X_OFF_T_DECLARED = 0 // stdio.h:61:1: - X_RSIZE_T_DEFINED = 0 // stdio.h:55:1: - X_SIZE_T_DECLARED = 0 // stdio.h:51:1: - X_SSIZE_T_DECLARED = 0 // stdio.h:65:1: - X_STDFILE_DECLARED = 0 // stdio.h:164:1: - X_STDIO_H_ = 0 // stdio.h:39:1: - X_STDSTREAM_DECLARED = 0 // stdio.h:173:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TRUNCATE_DECLARED = 0 // stdio.h:447:1: - X_VA_LIST_DECLARED = 0 // stdio.h:78:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BUFSIZ = 1024 // stdio.h:168:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EOF = -1 // stdio.h:170:1: + FILENAME_MAX = 1024 // stdio.h:178:1: + FOPEN_MAX = 20 // stdio.h:177:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + L_ctermid = 1024 // stdio.h:306:1: + L_tmpnam = 1024 // stdio.h:184:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + P_tmpdir = "/tmp/" // stdio.h:182:1: + SEEK_CUR = 1 // stdio.h:191:1: + SEEK_END = 2 // stdio.h:194:1: + SEEK_SET = 0 // stdio.h:188:1: + TMP_MAX = 0x7fffffff // stdio.h:185:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FSTDIO = 0 // stdio.h:59:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IOFBF = 0 // stdio.h:164:1: + X_IOLBF = 1 // stdio.h:165:1: + X_IONBF = 2 // stdio.h:166:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STDIO_H_ = 0 // stdio.h:39:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -66,11 +82,12 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ +// $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1990 The Regents of the University of California. +// All rights reserved. // // This code is derived from software contributed to Berkeley by // Chris Torek. @@ -99,12 +116,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)stdio.h 8.5 (Berkeley) 4/29/95 -// $FreeBSD$ +// @(#)stdio.h 5.17 (Berkeley) 6/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -135,63 +151,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. - -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Compiler memory barriers, specific to gcc and clang. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -220,180 +212,85 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. +// Delete pseudo-keywords wherever they are not available or needed. -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function acquires an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function attempts to acquire an exclusive or shared lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function releases a lock. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function asserts that an exclusive or shared lock is held. +// Default values. -// Function requires that an exclusive or shared lock is or is not held. +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2003 Marcel Moolenaar -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ +// Written by Todd C. Miller, September 9, 2016 +// Public domain. -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -418,17 +315,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -440,11 +331,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -460,203 +347,220 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// - -// This file is in the public domain. -// $FreeBSD$ +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. -// 3. 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. -// -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// Tell sys/endian.h we have MD variants of the swap macros. -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// Note that these macros evaluate their arguments several times. -// max value for an unsigned long long +// Public names -// Minimum signal stack size. +// These are specified to be function-like macros to match the spec -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// POSIX names -type X__int64_t = int64 /* _types.h:66:20 */ +// original BSD names -type X__uint64_t = uint64 /* _types.h:68:28 */ +// these were exposed here before -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type Int8_t = X__int8_t /* types.h:75:19 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +type Uint8_t = X__uint8_t /* types.h:80:20 */ -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +type Int16_t = X__int16_t /* types.h:85:20 */ -type Fpos_t = X__off_t /* stdio.h:47:18 */ +type Uint16_t = X__uint16_t /* types.h:90:21 */ -type Rsize_t = Size_t /* stdio.h:56:16 */ +type Int32_t = X__int32_t /* types.h:95:20 */ -type Off_t = X__off_t /* stdio.h:62:18 */ -type Ssize_t = X__ssize_t /* stdio.h:66:19 */ +type Uint32_t = X__uint32_t /* types.h:100:21 */ -type Off64_t = X__off64_t /* stdio.h:72:19 */ +type Int64_t = X__int64_t /* types.h:105:20 */ -type Va_list = X__va_list /* stdio.h:77:19 */ +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Fpos_t = Off_t /* stdio.h:61:15 */ // stdio file position type // NB: to fit things in six character monocase externals, the stdio // code uses the prefix `__s' for stdio objects, typically followed @@ -666,7 +570,7 @@ type Va_list = X__va_list /* stdio.h:77:19 */ type X__sbuf = struct { F_base uintptr F_size int32 -} /* stdio.h:91:1 */ +} /* stdio.h:70:1 */ // stdio state variables. // @@ -690,10 +594,6 @@ type X__sbuf = struct { // that does not match the previous one in _bf. When this happens, // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. -// -// Certain members of __sFILE are accessed directly via macros or -// inline functions. To preserve ABI compat, these members must not -// be disturbed. These members are marked below with (*). type X__sFILE = struct { F_p uintptr F_r int32 @@ -710,7 +610,7 @@ type X__sFILE = struct { F_read uintptr F_seek uintptr F_write uintptr - F_ub struct { + F_ext struct { F_base uintptr F_size int32 } @@ -722,25 +622,38 @@ type X__sFILE = struct { F_base uintptr F_size int32 } - F_blksize int32 - F_offset Fpos_t - F_fl_mutex uintptr - F_fl_owner uintptr - F_fl_count int32 - F_orientation int32 - F_mbstate X__mbstate_t - F_flags2 int32 -} /* stdio.h:124:1 */ - -type FILE = X__sFILE /* stdio.h:165:24 */ -type Cookie_io_functions_t = struct { - Fread uintptr - Fwrite uintptr - Fseek uintptr - Fclose uintptr -} /* stdio.h:428:3 */ - -// See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 -// B.8.2.7 for the rationale behind the *_unlocked() macros. + F_blksize int32 + F_offset Fpos_t +} /* stdio.h:99:9 */ + +// stdio state variables. +// +// The following always hold: +// +// if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), +// _lbfsize is -_bf._size, else _lbfsize is 0 +// if _flags&__SRD, _w is 0 +// if _flags&__SWR, _r is 0 +// +// This ensures that the getc and putc macros (or inline functions) never +// try to write or read from a file that is in `read' or `write' mode. +// (Moreover, they can, and do, automatically switch from read mode to +// write mode, and back, on "r+" and "w+" files.) +// +// _lbfsize is used only to make the inline line-buffered output stream +// code as compact as possible. +// +// _ub, _up, and _ur are used when ungetc() pushes back more characters +// than fit in the current _bf, or when ungetc() pushes back a character +// that does not match the previous one in _bf. When this happens, +// _ub._base becomes non-nil (i.e., a stream has ungetc() data iff +// _ub._base!=NULL) and _up and _ur save the current values of _p and _r. +type FILE = X__sFILE /* stdio.h:131:3 */ + +// The macro implementations of putc and putc_unlocked are not +// fully POSIX compliant; they do not set errno on failure + +// The macro implementations of putc and putc_unlocked are not +// fully POSIX compliant; they do not set errno on failure var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go b/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go index d0888198fb..0b4ed237e1 100644 --- a/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go +++ b/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go @@ -32,8 +32,8 @@ const ( TMP_MAX = 0x7fffffff // stdio.h:185:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_FSTDIO = 0 // stdio.h:59:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -49,14 +49,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_STDIO_H_ = 0 // stdio.h:39:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: @@ -64,13 +64,13 @@ const ( X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -91,7 +91,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: stdio.h,v 1.54 2020/09/11 17:56:41 naddy Exp $ +// $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ // $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ // - @@ -294,7 +294,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -454,18 +454,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -547,27 +546,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go b/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go index d0888198fb..010e72d900 100644 --- a/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go +++ b/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdio/stdio_openbsd_amd64.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_openbsd_arm64.go -pkgname stdio', DO NOT EDIT. package stdio @@ -31,9 +31,9 @@ const ( SEEK_SET = 0 // stdio.h:188:1: TMP_MAX = 0x7fffffff // stdio.h:185:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_FSTDIO = 0 // stdio.h:59:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -45,32 +45,32 @@ const ( X_IONBF = 2 // stdio.h:166:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_STDIO_H_ = 0 // stdio.h:39:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -91,7 +91,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: stdio.h,v 1.54 2020/09/11 17:56:41 naddy Exp $ +// $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ // $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ // - @@ -162,10 +162,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -294,7 +291,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -326,8 +323,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -369,66 +365,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -454,18 +452,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -547,27 +544,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/stdio/stdio_windows_386.go b/vendor/modernc.org/libc/stdio/stdio_windows_386.go index ca396f234e..8ee5e35d6b 100644 --- a/vendor/modernc.org/libc/stdio/stdio_windows_386.go +++ b/vendor/modernc.org/libc/stdio/stdio_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname stdio', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdio/stdio_windows_386.go -pkgname stdio', DO NOT EDIT. package stdio @@ -15,141 +15,152 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUFSIZ = 512 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - EOF = -1 - FILENAME_MAX = 260 - FOPEN_MAX = 20 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - SEEK_CUR = 1 - SEEK_END = 2 - SEEK_SET = 0 - STDERR_FILENO = 2 - STDIN_FILENO = 0 - STDOUT_FILENO = 1 - SYS_OPEN = 20 - TMP_MAX = 32767 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_PERROR_DEFINED = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_WPERROR_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_FSEEKO = 0 - X_FILE_OFFSET_BITS_SET_FTELLO = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FPOS_T_DEFINED = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STDIO = 0 - X_INC_STDIO_S = 0 - X_INC_SWPRINTF_INL = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IOB_ENTRIES = 20 - X_IOEOF = 0x0010 - X_IOERR = 0x0020 - X_IOFBF = 0x0000 - X_IOLBF = 0x0040 - X_IOMYBUF = 0x0008 - X_IONBF = 0x0004 - X_IOREAD = 0x0001 - X_IORW = 0x0080 - X_IOSTRG = 0x0040 - X_IOWRT = 0x0002 - X_MT = 0 - X_M_IX86 = 600 - X_NFILE = 512 - X_NSTREAM_ = 512 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_OLD_P_OVERLAY = 2 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_P_DETACH = 4 - X_P_NOWAIT = 1 - X_P_NOWAITO = 3 - X_P_OVERLAY = 2 - X_P_WAIT = 0 - X_P_tmpdir = "\\" - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SPAWNV_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_STDIO_DEFINED = 0 - X_STDIO_S_DEFINED = 0 - X_STDSTREAM_DEFINED = 0 - X_SYS_OPEN = 20 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_TWO_DIGIT_EXPONENT = 0x1 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WAIT_CHILD = 0 - X_WAIT_GRANDCHILD = 1 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WSPAWN_DEFINED = 0 - X_WSTDIO_DEFINED = 0 - X_WSTDIO_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + BUFSIZ = 512 // stdio.h:17:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + EOF = -1 // stdio.h:21:1: + FILENAME_MAX = 260 // stdio.h:61:1: + FOPEN_MAX = 20 // stdio.h:62:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + SEEK_CUR = 1 // stdio.h:53:1: + SEEK_END = 2 // stdio.h:54:1: + SEEK_SET = 0 // stdio.h:55:1: + STDERR_FILENO = 2 // stdio.h:59:1: + STDIN_FILENO = 0 // stdio.h:57:1: + STDOUT_FILENO = 1 // stdio.h:58:1: + SYS_OPEN = 20 // stdio.h:1486:1: + TMP_MAX = 32767 // stdio.h:64:1: + TMP_MAX_S = 32767 // stdio_s.h:27:3: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // stdio.h:728:1: + X_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS = 4 // corecrt_stdio_config.h:23:1: + X_CRT_INTERNAL_LOCAL_SCANF_OPTIONS = 2 // corecrt_stdio_config.h:27:1: + X_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY = 0x0008 // corecrt_stdio_config.h:15:1: + X_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS = 0x0010 // corecrt_stdio_config.h:16:1: + X_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION = 0x0001 // corecrt_stdio_config.h:12:1: + X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS = 0x0004 // corecrt_stdio_config.h:14:1: + X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR = 0x0002 // corecrt_stdio_config.h:13:1: + X_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY = 0x0004 // corecrt_stdio_config.h:20:1: + X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS = 0x0002 // corecrt_stdio_config.h:19:1: + X_CRT_INTERNAL_SCANF_SECURECRT = 0x0001 // corecrt_stdio_config.h:18:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_PERROR_DEFINED = 0 // stdio.h:712:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WPERROR_DEFINED = 0 // stdio.h:1423:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_DEFINED = 0 // stdio.h:35:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FILE_OFFSET_BITS_SET_FSEEKO = 0 // stdio.h:692:1: + X_FILE_OFFSET_BITS_SET_FTELLO = 0 // stdio.h:699:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FPOS_T_DEFINED = 0 // stdio.h:98:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STDIO = 0 // stdio.h:7:1: + X_INC_STDIO_S = 0 // stdio_s.h:7:1: + X_INC_SWPRINTF_INL = 0 // swprintf.inl:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IOB_ENTRIES = 20 // stdio.h:20:1: + X_IOEOF = 0x0010 // stdio.h:127:1: + X_IOERR = 0x0020 // stdio.h:128:1: + X_IOFBF = 0x0000 // stdio.h:122:1: + X_IOLBF = 0x0040 // stdio.h:123:1: + X_IOMYBUF = 0x0008 // stdio.h:126:1: + X_IONBF = 0x0004 // stdio.h:124:1: + X_IOREAD = 0x0001 // stdio.h:119:1: + X_IORW = 0x0080 // stdio.h:130:1: + X_IOSTRG = 0x0040 // stdio.h:129:1: + X_IOWRT = 0x0002 // stdio.h:120:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NFILE = 512 // stdio.h:18:1: + X_NSTREAM_ = 512 // stdio.h:19:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_OLD_P_OVERLAY = 2 // stdio.h:1557:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_P_DETACH = 4 // stdio.h:1559:1: + X_P_NOWAIT = 1 // stdio.h:1556:1: + X_P_NOWAITO = 3 // stdio.h:1558:1: + X_P_OVERLAY = 2 // stdio.h:1560:1: + X_P_WAIT = 0 // stdio.h:1555:1: + X_P_tmpdir = "\\" // stdio.h:42:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPAWNV_DEFINED = 0 // stdio.h:1567:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_STDIO_CONFIG_DEFINED = 0 // corecrt_stdio_config.h:8:1: + X_STDIO_DEFINED = 0 // stdio.h:1453:1: + X_STDIO_S_DEFINED = 0 // stdio_s.h:25:1: + X_STDSTREAM_DEFINED = 0 // stdio.h:112:1: + X_SYS_OPEN = 20 // stdio.h:63:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_TWO_DIGIT_EXPONENT = 0x1 // stdio.h:135:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WAIT_CHILD = 0 // stdio.h:1562:1: + X_WAIT_GRANDCHILD = 1 // stdio.h:1563:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WSPAWN_DEFINED = 0 // stdio.h:1543:1: + X_WSTDIO_DEFINED = 0 // stdio.h:958:1: + X_WSTDIO_S_DEFINED = 0 // stdio_s.h:579:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -168,6 +179,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the Wine project. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -203,6 +219,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -243,26 +265,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -288,36 +312,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// Undefine __mingw_ macros. +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_iobuf = struct { F_ptr uintptr @@ -328,9 +345,9 @@ type X_iobuf = struct { F_charbuf int32 F_bufsiz int32 F_tmpfname uintptr -} /* stdio.h:26:3 */ +} /* stdio.h:24:3 */ -type FILE = X_iobuf /* stdio.h:36:25 */ +type FILE = X_iobuf /* stdio.h:34:25 */ type X_off_t = int32 /* _mingw_off_t.h:5:16 */ type Off32_t = int32 /* _mingw_off_t.h:7:16 */ @@ -340,13 +357,6 @@ type Off64_t = int64 /* _mingw_off_t.h:15:39 */ type Off_t = Off64_t /* _mingw_off_t.h:24:17 */ // A pointer to an array of FILE -type Fpos_t = int64 /* stdio.h:104:37 */ - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// Define __mingw_ macros. +type Fpos_t = int64 /* stdio.h:102:37 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go b/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go index aa94ac0d7b..9d240249d1 100644 --- a/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. package stdlib diff --git a/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go b/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go index 364879c03e..cde9550bea 100644 --- a/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdlib/stdlib_freebsd_386.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_386.go -pkgname stdlib', DO NOT EDIT. package stdlib diff --git a/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go b/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go index 23ac9adca0..04d26a4631 100644 --- a/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_amd64.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_arm64.go -pkgname stdlib', DO NOT EDIT. package stdlib diff --git a/vendor/modernc.org/libc/stdlib/capi_windows_386.go b/vendor/modernc.org/libc/stdlib/capi_windows_386.go index c65f27059a..50dcc47743 100644 --- a/vendor/modernc.org/libc/stdlib/capi_windows_386.go +++ b/vendor/modernc.org/libc/stdlib/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_windows_386.go -pkgname stdlib', DO NOT EDIT. package stdlib diff --git a/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go index f3c60e8cad..7babc1f18f 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. package stdlib @@ -15,305 +15,305 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 - BUS_ADRALN = 1 - BUS_ADRERR = 2 - BUS_NOOP = 0 - BUS_OBJERR = 3 - BYTE_ORDER = 1234 - CLD_CONTINUED = 6 - CLD_DUMPED = 3 - CLD_EXITED = 1 - CLD_KILLED = 2 - CLD_NOOP = 0 - CLD_STOPPED = 5 - CLD_TRAPPED = 4 - CPUMON_MAKE_FATAL = 0x1000 - EXIT_FAILURE = 1 - EXIT_SUCCESS = 0 - FOOTPRINT_INTERVAL_RESET = 0x1 - FPE_FLTDIV = 1 - FPE_FLTINV = 5 - FPE_FLTOVF = 2 - FPE_FLTRES = 4 - FPE_FLTSUB = 6 - FPE_FLTUND = 3 - FPE_INTDIV = 7 - FPE_INTOVF = 8 - FPE_NOOP = 0 - FP_CHOP = 3 - FP_PREC_24B = 0 - FP_PREC_53B = 2 - FP_PREC_64B = 3 - FP_RND_DOWN = 1 - FP_RND_NEAR = 0 - FP_RND_UP = 2 - FP_STATE_BYTES = 512 - ILL_BADSTK = 8 - ILL_COPROC = 7 - ILL_ILLADR = 5 - ILL_ILLOPC = 1 - ILL_ILLOPN = 4 - ILL_ILLTRP = 2 - ILL_NOOP = 0 - ILL_PRVOPC = 3 - ILL_PRVREG = 6 - INT16_MAX = 32767 - INT16_MIN = -32768 - INT32_MAX = 2147483647 - INT32_MIN = -2147483648 - INT64_MAX = 9223372036854775807 - INT64_MIN = -9223372036854775808 - INT8_MAX = 127 - INT8_MIN = -128 - INTMAX_MAX = 9223372036854775807 - INTMAX_MIN = -9223372036854775808 - INTPTR_MAX = 9223372036854775807 - INTPTR_MIN = -9223372036854775808 - INT_FAST16_MAX = 32767 - INT_FAST16_MIN = -32768 - INT_FAST32_MAX = 2147483647 - INT_FAST32_MIN = -2147483648 - INT_FAST64_MAX = 9223372036854775807 - INT_FAST64_MIN = -9223372036854775808 - INT_FAST8_MAX = 127 - INT_FAST8_MIN = -128 - INT_LEAST16_MAX = 32767 - INT_LEAST16_MIN = -32768 - INT_LEAST32_MAX = 2147483647 - INT_LEAST32_MIN = -2147483648 - INT_LEAST64_MAX = 9223372036854775807 - INT_LEAST64_MIN = -9223372036854775808 - INT_LEAST8_MAX = 127 - INT_LEAST8_MIN = -128 - IOPOL_APPLICATION = 5 - IOPOL_ATIME_UPDATES_DEFAULT = 0 - IOPOL_ATIME_UPDATES_OFF = 1 - IOPOL_DEFAULT = 0 - IOPOL_IMPORTANT = 1 - IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 - IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 - IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 - IOPOL_NORMAL = 1 - IOPOL_PASSIVE = 2 - IOPOL_SCOPE_DARWIN_BG = 2 - IOPOL_SCOPE_PROCESS = 0 - IOPOL_SCOPE_THREAD = 1 - IOPOL_STANDARD = 5 - IOPOL_THROTTLE = 3 - IOPOL_TYPE_DISK = 0 - IOPOL_TYPE_VFS_ATIME_UPDATES = 2 - IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 - IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 - IOPOL_UTILITY = 4 - IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 - IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 - LITTLE_ENDIAN = 1234 - MINSIGSTKSZ = 32768 - NSIG = 32 - PDP_ENDIAN = 3412 - POLL_ERR = 4 - POLL_HUP = 6 - POLL_IN = 1 - POLL_MSG = 3 - POLL_OUT = 2 - POLL_PRI = 5 - PRIO_DARWIN_BG = 0x1000 - PRIO_DARWIN_NONUI = 0x1001 - PRIO_DARWIN_PROCESS = 4 - PRIO_DARWIN_THREAD = 3 - PRIO_MAX = 20 - PRIO_MIN = -20 - PRIO_PGRP = 1 - PRIO_PROCESS = 0 - PRIO_USER = 2 - PTRDIFF_MAX = 9223372036854775807 - PTRDIFF_MIN = -9223372036854775808 - RAND_MAX = 0x7fffffff - RLIMIT_AS = 5 - RLIMIT_CORE = 4 - RLIMIT_CPU = 0 - RLIMIT_CPU_USAGE_MONITOR = 0x2 - RLIMIT_DATA = 2 - RLIMIT_FOOTPRINT_INTERVAL = 0x4 - RLIMIT_FSIZE = 1 - RLIMIT_MEMLOCK = 6 - RLIMIT_NOFILE = 8 - RLIMIT_NPROC = 7 - RLIMIT_RSS = 5 - RLIMIT_STACK = 3 - RLIMIT_THREAD_CPULIMITS = 0x3 - RLIMIT_WAKEUPS_MONITOR = 0x1 - RLIM_NLIMITS = 9 - RSIZE_MAX = 9223372036854775807 - RUSAGE_CHILDREN = -1 - RUSAGE_INFO_CURRENT = 4 - RUSAGE_INFO_V0 = 0 - RUSAGE_INFO_V1 = 1 - RUSAGE_INFO_V2 = 2 - RUSAGE_INFO_V3 = 3 - RUSAGE_INFO_V4 = 4 - RUSAGE_SELF = 0 - SA_64REGSET = 0x0200 - SA_NOCLDSTOP = 0x0008 - SA_NOCLDWAIT = 0x0020 - SA_NODEFER = 0x0010 - SA_ONSTACK = 0x0001 - SA_RESETHAND = 0x0004 - SA_RESTART = 0x0002 - SA_SIGINFO = 0x0040 - SA_USERSPACE_MASK = 127 - SA_USERTRAMP = 0x0100 - SEGV_ACCERR = 2 - SEGV_MAPERR = 1 - SEGV_NOOP = 0 - SIGABRT = 6 - SIGALRM = 14 - SIGBUS = 10 - SIGCHLD = 20 - SIGCONT = 19 - SIGEMT = 7 - SIGEV_NONE = 0 - SIGEV_SIGNAL = 1 - SIGEV_THREAD = 3 - SIGFPE = 8 - SIGHUP = 1 - SIGILL = 4 - SIGINFO = 29 - SIGINT = 2 - SIGIO = 23 - SIGIOT = 6 - SIGKILL = 9 - SIGPIPE = 13 - SIGPROF = 27 - SIGQUIT = 3 - SIGSEGV = 11 - SIGSTKSZ = 131072 - SIGSTOP = 17 - SIGSYS = 12 - SIGTERM = 15 - SIGTRAP = 5 - SIGTSTP = 18 - SIGTTIN = 21 - SIGTTOU = 22 - SIGURG = 16 - SIGUSR1 = 30 - SIGUSR2 = 31 - SIGVTALRM = 26 - SIGWINCH = 28 - SIGXCPU = 24 - SIGXFSZ = 25 - SIG_ATOMIC_MAX = 2147483647 - SIG_ATOMIC_MIN = -2147483648 - SIG_BLOCK = 1 - SIG_SETMASK = 3 - SIG_UNBLOCK = 2 - SIZE_MAX = 18446744073709551615 - SI_ASYNCIO = 0x10004 - SI_MESGQ = 0x10005 - SI_QUEUE = 0x10002 - SI_TIMER = 0x10003 - SI_USER = 0x10001 - SS_DISABLE = 0x0004 - SS_ONSTACK = 0x0001 - SV_INTERRUPT = 2 - SV_NOCLDSTOP = 8 - SV_NODEFER = 16 - SV_ONSTACK = 1 - SV_RESETHAND = 4 - SV_SIGINFO = 64 - TRAP_BRKPT = 1 - TRAP_TRACE = 2 - UINT16_MAX = 65535 - UINT32_MAX = 4294967295 - UINT64_MAX = 18446744073709551615 - UINT8_MAX = 255 - UINTMAX_MAX = 18446744073709551615 - UINTPTR_MAX = 18446744073709551615 - UINT_FAST16_MAX = 65535 - UINT_FAST32_MAX = 4294967295 - UINT_FAST64_MAX = 18446744073709551615 - UINT_FAST8_MAX = 255 - UINT_LEAST16_MAX = 65535 - UINT_LEAST32_MAX = 4294967295 - UINT_LEAST64_MAX = 18446744073709551615 - UINT_LEAST8_MAX = 255 - WAIT_ANY = -1 - WAIT_MYPGRP = 0 - WAKEMON_DISABLE = 0x02 - WAKEMON_ENABLE = 0x01 - WAKEMON_GET_PARAMS = 0x04 - WAKEMON_MAKE_FATAL = 0x10 - WAKEMON_SET_DEFAULTS = 0x08 - WCHAR_MAX = 2147483647 - WCHAR_MIN = -2147483648 - WCONTINUED = 0x00000010 - WCOREFLAG = 0200 - WEXITED = 0x00000004 - WINT_MAX = 2147483647 - WINT_MIN = -2147483648 - WNOHANG = 0x00000001 - WNOWAIT = 0x00000020 - WSTOPPED = 0x00000008 - WUNTRACED = 0x00000002 - X_ALLOCA_H_ = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_SIGNAL_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CT_RUNE_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_I386_SIGNAL_H_ = 1 - X_I386__ENDIAN_H_ = 0 - X_ID_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MACH_I386__STRUCTS_H_ = 0 - X_MACH_MACHINE__STRUCTS_H_ = 0 - X_MALLOC_UNDERSCORE_MALLOC_H_ = 0 - X_MCONTEXT_T = 0 - X_MODE_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RLIMIT_POSIX_FLAG = 0x1000 - X_RUNE_T = 0 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_STDLIB_H_ = 0 - X_SYS_RESOURCE_H_ = 0 - X_SYS_SIGNAL_H_ = 0 - X_SYS_WAIT_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UID_T = 0 - X_UINT32_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_WCHAR_T = 0 - X_WSTOPPED = 0177 + BIG_ENDIAN = 4321 // endian.h:94:1: + BUS_ADRALN = 1 // signal.h:241:1: + BUS_ADRERR = 2 // signal.h:242:1: + BUS_NOOP = 0 // signal.h:239:1: + BUS_OBJERR = 3 // signal.h:243:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CLD_CONTINUED = 6 // signal.h:258:1: + CLD_DUMPED = 3 // signal.h:255:1: + CLD_EXITED = 1 // signal.h:253:1: + CLD_KILLED = 2 // signal.h:254:1: + CLD_NOOP = 0 // signal.h:251:1: + CLD_STOPPED = 5 // signal.h:257:1: + CLD_TRAPPED = 4 // signal.h:256:1: + CPUMON_MAKE_FATAL = 0x1000 // resource.h:393:1: + EXIT_FAILURE = 1 // stdlib.h:102:1: + EXIT_SUCCESS = 0 // stdlib.h:103:1: + FOOTPRINT_INTERVAL_RESET = 0x1 // resource.h:398:1: + FPE_FLTDIV = 1 // signal.h:221:1: + FPE_FLTINV = 5 // signal.h:225:1: + FPE_FLTOVF = 2 // signal.h:222:1: + FPE_FLTRES = 4 // signal.h:224:1: + FPE_FLTSUB = 6 // signal.h:226:1: + FPE_FLTUND = 3 // signal.h:223:1: + FPE_INTDIV = 7 // signal.h:227:1: + FPE_INTOVF = 8 // signal.h:228:1: + FPE_NOOP = 0 // signal.h:219:1: + FP_CHOP = 3 // _structs.h:112:1: + FP_PREC_24B = 0 // _structs.h:103:1: + FP_PREC_53B = 2 // _structs.h:104:1: + FP_PREC_64B = 3 // _structs.h:105:1: + FP_RND_DOWN = 1 // _structs.h:110:1: + FP_RND_NEAR = 0 // _structs.h:109:1: + FP_RND_UP = 2 // _structs.h:111:1: + FP_STATE_BYTES = 512 // _structs.h:276:1: + ILL_BADSTK = 8 // signal.h:215:1: + ILL_COPROC = 7 // signal.h:214:1: + ILL_ILLADR = 5 // signal.h:212:1: + ILL_ILLOPC = 1 // signal.h:208:1: + ILL_ILLOPN = 4 // signal.h:211:1: + ILL_ILLTRP = 2 // signal.h:209:1: + ILL_NOOP = 0 // signal.h:206:1: + ILL_PRVOPC = 3 // signal.h:210:1: + ILL_PRVREG = 6 // signal.h:213:1: + INT16_MAX = 32767 // stdint.h:599:1: + INT16_MIN = -32768 // stdint.h:600:1: + INT32_MAX = 2147483647 // stdint.h:555:1: + INT32_MIN = -2147483648 // stdint.h:556:1: + INT64_MAX = 9223372036854775807 // stdint.h:461:1: + INT64_MIN = -9223372036854775808 // stdint.h:462:1: + INT8_MAX = 127 // stdint.h:621:1: + INT8_MIN = -128 // stdint.h:622:1: + INTMAX_MAX = 9223372036854775807 // stdint.h:663:1: + INTMAX_MIN = -9223372036854775808 // stdint.h:662:1: + INTPTR_MAX = 9223372036854775807 // stdint.h:649:1: + INTPTR_MIN = -9223372036854775808 // stdint.h:648:1: + INT_FAST16_MAX = 32767 // stdint.h:615:1: + INT_FAST16_MIN = -32768 // stdint.h:614:1: + INT_FAST32_MAX = 2147483647 // stdint.h:574:1: + INT_FAST32_MIN = -2147483648 // stdint.h:573:1: + INT_FAST64_MAX = 9223372036854775807 // stdint.h:483:1: + INT_FAST64_MIN = -9223372036854775808 // stdint.h:482:1: + INT_FAST8_MAX = 127 // stdint.h:634:1: + INT_FAST8_MIN = -128 // stdint.h:633:1: + INT_LEAST16_MAX = 32767 // stdint.h:612:1: + INT_LEAST16_MIN = -32768 // stdint.h:611:1: + INT_LEAST32_MAX = 2147483647 // stdint.h:571:1: + INT_LEAST32_MIN = -2147483648 // stdint.h:570:1: + INT_LEAST64_MAX = 9223372036854775807 // stdint.h:480:1: + INT_LEAST64_MIN = -9223372036854775808 // stdint.h:479:1: + INT_LEAST8_MAX = 127 // stdint.h:631:1: + INT_LEAST8_MIN = -128 // stdint.h:630:1: + IOPOL_APPLICATION = 5 // resource.h:427:1: + IOPOL_ATIME_UPDATES_DEFAULT = 0 // resource.h:431:1: + IOPOL_ATIME_UPDATES_OFF = 1 // resource.h:432:1: + IOPOL_DEFAULT = 0 // resource.h:419:1: + IOPOL_IMPORTANT = 1 // resource.h:420:1: + IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 // resource.h:434:1: + IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 // resource.h:435:1: + IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 // resource.h:436:1: + IOPOL_NORMAL = 1 // resource.h:428:1: + IOPOL_PASSIVE = 2 // resource.h:421:1: + IOPOL_SCOPE_DARWIN_BG = 2 // resource.h:416:1: + IOPOL_SCOPE_PROCESS = 0 // resource.h:414:1: + IOPOL_SCOPE_THREAD = 1 // resource.h:415:1: + IOPOL_STANDARD = 5 // resource.h:424:1: + IOPOL_THROTTLE = 3 // resource.h:422:1: + IOPOL_TYPE_DISK = 0 // resource.h:408:1: + IOPOL_TYPE_VFS_ATIME_UPDATES = 2 // resource.h:409:1: + IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 // resource.h:410:1: + IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 // resource.h:411:1: + IOPOL_UTILITY = 4 // resource.h:423:1: + IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 // resource.h:439:1: + IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 // resource.h:438:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MINSIGSTKSZ = 32768 // signal.h:340:1: + NSIG = 32 // signal.h:79:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + POLL_ERR = 4 // signal.h:264:1: + POLL_HUP = 6 // signal.h:266:1: + POLL_IN = 1 // signal.h:261:1: + POLL_MSG = 3 // signal.h:263:1: + POLL_OUT = 2 // signal.h:262:1: + POLL_PRI = 5 // signal.h:265:1: + PRIO_DARWIN_BG = 0x1000 // resource.h:120:1: + PRIO_DARWIN_NONUI = 0x1001 // resource.h:126:1: + PRIO_DARWIN_PROCESS = 4 // resource.h:106:1: + PRIO_DARWIN_THREAD = 3 // resource.h:105:1: + PRIO_MAX = 20 // resource.h:113:1: + PRIO_MIN = -20 // resource.h:112:1: + PRIO_PGRP = 1 // resource.h:101:1: + PRIO_PROCESS = 0 // resource.h:100:1: + PRIO_USER = 2 // resource.h:102:1: + PTRDIFF_MAX = 9223372036854775807 // stdint.h:652:1: + PTRDIFF_MIN = -9223372036854775808 // stdint.h:651:1: + RAND_MAX = 0x7fffffff // stdlib.h:105:1: + RLIMIT_AS = 5 // resource.h:349:1: + RLIMIT_CORE = 4 // resource.h:348:1: + RLIMIT_CPU = 0 // resource.h:344:1: + RLIMIT_CPU_USAGE_MONITOR = 0x2 // resource.h:377:1: + RLIMIT_DATA = 2 // resource.h:346:1: + RLIMIT_FOOTPRINT_INTERVAL = 0x4 // resource.h:379:1: + RLIMIT_FSIZE = 1 // resource.h:345:1: + RLIMIT_MEMLOCK = 6 // resource.h:352:1: + RLIMIT_NOFILE = 8 // resource.h:355:1: + RLIMIT_NPROC = 7 // resource.h:353:1: + RLIMIT_RSS = 5 // resource.h:351:1: + RLIMIT_STACK = 3 // resource.h:347:1: + RLIMIT_THREAD_CPULIMITS = 0x3 // resource.h:378:1: + RLIMIT_WAKEUPS_MONITOR = 0x1 // resource.h:376:1: + RLIM_NLIMITS = 9 // resource.h:357:1: + RSIZE_MAX = 9223372036854775807 // stdint.h:658:1: + RUSAGE_CHILDREN = -1 // resource.h:141:1: + RUSAGE_INFO_CURRENT = 4 // resource.h:191:1: + RUSAGE_INFO_V0 = 0 // resource.h:186:1: + RUSAGE_INFO_V1 = 1 // resource.h:187:1: + RUSAGE_INFO_V2 = 2 // resource.h:188:1: + RUSAGE_INFO_V3 = 3 // resource.h:189:1: + RUSAGE_INFO_V4 = 4 // resource.h:190:1: + RUSAGE_SELF = 0 // resource.h:140:1: + SA_64REGSET = 0x0200 // signal.h:308:1: + SA_NOCLDSTOP = 0x0008 // signal.h:301:1: + SA_NOCLDWAIT = 0x0020 // signal.h:303:1: + SA_NODEFER = 0x0010 // signal.h:302:1: + SA_ONSTACK = 0x0001 // signal.h:298:1: + SA_RESETHAND = 0x0004 // signal.h:300:1: + SA_RESTART = 0x0002 // signal.h:299:1: + SA_SIGINFO = 0x0040 // signal.h:304:1: + SA_USERSPACE_MASK = 127 // signal.h:314:1: + SA_USERTRAMP = 0x0100 // signal.h:306:1: + SEGV_ACCERR = 2 // signal.h:235:1: + SEGV_MAPERR = 1 // signal.h:234:1: + SEGV_NOOP = 0 // signal.h:232:1: + SIGABRT = 6 // signal.h:89:1: + SIGALRM = 14 // signal.h:102:1: + SIGBUS = 10 // signal.h:98:1: + SIGCHLD = 20 // signal.h:108:1: + SIGCONT = 19 // signal.h:107:1: + SIGEMT = 7 // signal.h:94:1: + SIGEV_NONE = 0 // signal.h:164:1: + SIGEV_SIGNAL = 1 // signal.h:165:1: + SIGEV_THREAD = 3 // signal.h:166:1: + SIGFPE = 8 // signal.h:96:1: + SIGHUP = 1 // signal.h:84:1: + SIGILL = 4 // signal.h:87:1: + SIGINFO = 29 // signal.h:120:1: + SIGINT = 2 // signal.h:85:1: + SIGIO = 23 // signal.h:112:1: + SIGIOT = 6 // signal.h:93:1: + SIGKILL = 9 // signal.h:97:1: + SIGPIPE = 13 // signal.h:101:1: + SIGPROF = 27 // signal.h:117:1: + SIGQUIT = 3 // signal.h:86:1: + SIGSEGV = 11 // signal.h:99:1: + SIGSTKSZ = 131072 // signal.h:341:1: + SIGSTOP = 17 // signal.h:105:1: + SIGSYS = 12 // signal.h:100:1: + SIGTERM = 15 // signal.h:103:1: + SIGTRAP = 5 // signal.h:88:1: + SIGTSTP = 18 // signal.h:106:1: + SIGTTIN = 21 // signal.h:109:1: + SIGTTOU = 22 // signal.h:110:1: + SIGURG = 16 // signal.h:104:1: + SIGUSR1 = 30 // signal.h:122:1: + SIGUSR2 = 31 // signal.h:123:1: + SIGVTALRM = 26 // signal.h:116:1: + SIGWINCH = 28 // signal.h:119:1: + SIGXCPU = 24 // signal.h:114:1: + SIGXFSZ = 25 // signal.h:115:1: + SIG_ATOMIC_MAX = 2147483647 // stdint.h:668:1: + SIG_ATOMIC_MIN = -2147483648 // stdint.h:667:1: + SIG_BLOCK = 1 // signal.h:319:1: + SIG_SETMASK = 3 // signal.h:321:1: + SIG_UNBLOCK = 2 // signal.h:320:1: + SIZE_MAX = 18446744073709551615 // stdint.h:653:1: + SI_ASYNCIO = 0x10004 // signal.h:327:1: + SI_MESGQ = 0x10005 // signal.h:328:1: + SI_QUEUE = 0x10002 // signal.h:325:1: + SI_TIMER = 0x10003 // signal.h:326:1: + SI_USER = 0x10001 // signal.h:324:1: + SS_DISABLE = 0x0004 // signal.h:339:1: + SS_ONSTACK = 0x0001 // signal.h:338:1: + SV_INTERRUPT = 2 // signal.h:355:1: + SV_NOCLDSTOP = 8 // signal.h:358:1: + SV_NODEFER = 16 // signal.h:357:1: + SV_ONSTACK = 1 // signal.h:354:1: + SV_RESETHAND = 4 // signal.h:356:1: + SV_SIGINFO = 64 // signal.h:359:1: + TRAP_BRKPT = 1 // signal.h:246:1: + TRAP_TRACE = 2 // signal.h:247:1: + UINT16_MAX = 65535 // stdint.h:601:1: + UINT32_MAX = 4294967295 // stdint.h:557:1: + UINT64_MAX = 18446744073709551615 // stdint.h:463:1: + UINT8_MAX = 255 // stdint.h:623:1: + UINTMAX_MAX = 18446744073709551615 // stdint.h:664:1: + UINTPTR_MAX = 18446744073709551615 // stdint.h:650:1: + UINT_FAST16_MAX = 65535 // stdint.h:616:1: + UINT_FAST32_MAX = 4294967295 // stdint.h:575:1: + UINT_FAST64_MAX = 18446744073709551615 // stdint.h:484:1: + UINT_FAST8_MAX = 255 // stdint.h:635:1: + UINT_LEAST16_MAX = 65535 // stdint.h:613:1: + UINT_LEAST32_MAX = 4294967295 // stdint.h:572:1: + UINT_LEAST64_MAX = 18446744073709551615 // stdint.h:481:1: + UINT_LEAST8_MAX = 255 // stdint.h:632:1: + WAIT_ANY = -1 // wait.h:183:1: + WAIT_MYPGRP = 0 // wait.h:184:1: + WAKEMON_DISABLE = 0x02 // resource.h:385:1: + WAKEMON_ENABLE = 0x01 // resource.h:384:1: + WAKEMON_GET_PARAMS = 0x04 // resource.h:386:1: + WAKEMON_MAKE_FATAL = 0x10 // resource.h:388:1: + WAKEMON_SET_DEFAULTS = 0x08 // resource.h:387:1: + WCHAR_MAX = 2147483647 // stdint.h:678:1: + WCHAR_MIN = -2147483648 // stdint.h:682:1: + WCONTINUED = 0x00000010 // wait.h:173:1: + WCOREFLAG = 0200 // wait.h:132:1: + WEXITED = 0x00000004 // wait.h:168:1: + WINT_MAX = 2147483647 // stdint.h:674:1: + WINT_MIN = -2147483648 // stdint.h:673:1: + WNOHANG = 0x00000001 // wait.h:121:1: + WNOWAIT = 0x00000020 // wait.h:174:1: + WSTOPPED = 0x00000008 // wait.h:171:1: + WUNTRACED = 0x00000002 // wait.h:122:1: + X_ALLOCA_H_ = 0 // alloca.h:25:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_SIGNAL_H_ = 0 // signal.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CT_RUNE_T = 0 // _ct_rune_t.h:30:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_I386_SIGNAL_H_ = 1 // signal.h:34:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MACH_I386__STRUCTS_H_ = 0 // _structs.h:33:1: + X_MACH_MACHINE__STRUCTS_H_ = 0 // _structs.h:30:1: + X_MALLOC_UNDERSCORE_MALLOC_H_ = 0 // _malloc.h:25:1: + X_MCONTEXT_T = 0 // _mcontext.h:202:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RLIMIT_POSIX_FLAG = 0x1000 // resource.h:359:1: + X_RUNE_T = 0 // _rune_t.h:29:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_STDLIB_H_ = 0 // stdlib.h:59:1: + X_SYS_RESOURCE_H_ = 0 // resource.h:65:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:70:1: + X_SYS_WAIT_H_ = 0 // wait.h:65:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINT32_T = 0 // _uint32_t.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_WCHAR_T = 0 // _wchar_t.h:32:1: + X_WSTOPPED = 0177 // wait.h:137:1: ) // Copyright (c) 2000 Apple Computer, Inc. All rights reserved. diff --git a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go index 81362f614c..07f326fa0f 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdlib/stdlib_freebsd_386.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_386.go -pkgname stdlib', DO NOT EDIT. package stdlib @@ -15,29 +15,51 @@ var _ atomic.Value var _ unsafe.Pointer const ( - EXIT_FAILURE = 1 // stdlib.h:73:1: - EXIT_SUCCESS = 0 // stdlib.h:74:1: - RAND_MAX = 0x7fffffff // stdlib.h:80:1: - X_ERRNO_T_DEFINED = 0 // stdlib.h:344:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EXIT_FAILURE = 1 // stdlib.h:80:1: + EXIT_SUCCESS = 0 // stdlib.h:81:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + RAND_MAX = 0x7fffffff // stdlib.h:83:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MKDTEMP_DECLARED = 0 // stdlib.h:192:1: - X_MKSTEMP_DECLARED = 0 // stdlib.h:196:1: - X_MKTEMP_DECLARED = 0 // stdlib.h:221:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_RSIZE_T_DEFINED = 0 // stdlib.h:339:1: - X_RUNE_T_DECLARED = 0 // stdlib.h:47:1: - X_SIZE_T_DECLARED = 0 // stdlib.h:53:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: X_STDLIB_H_ = 0 // stdlib.h:36:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_WCHAR_T_DECLARED = 0 // stdlib.h:59:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -49,11 +71,12 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: stdlib.h,v 1.76 2019/05/10 15:03:24 otto Exp $ +// $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1990 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 @@ -79,12 +102,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)stdlib.h 8.5 (Berkeley) 5/19/95 -// $FreeBSD$ +// @(#)stdlib.h 5.13 (Berkeley) 6/4/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -115,63 +137,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -200,147 +198,229 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function acquires an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function attempts to acquire an exclusive or shared lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function releases a lock. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function asserts that an exclusive or shared lock is held. +// Default values. -// Function requires that an exclusive or shared lock is or is not held. +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ -// Function should not be analyzed. +// Written by Todd C. Miller, September 9, 2016 +// Public domain. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ -// Guard variables and structure members by lock. +// - +// Copyright (c) 1990, 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. +// 3. 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2003 Marcel Moolenaar -// All rights reserved. +// Copyright (c) 1982, 1986, 1991, 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. +// 3. 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 AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// 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. // -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -350,11 +430,14 @@ type X__float128 = float64 /* :47:21 */ // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -363,11 +446,44 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -398,17 +514,40 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause +// Copyright (c) 1997 Niklas Hallqvist. 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. // -// Copyright (c) 2002 Mike Barcroft +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ + +// - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -420,11 +559,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -440,18 +575,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -478,186 +607,164 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// Tell sys/endian.h we have MD variants of the swap macros. -// max value for an unsigned long long +// Note that these macros evaluate their arguments several times. -// Minimum signal stack size. +// Public names -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// These are specified to be function-like macros to match the spec -type X__int64_t = int64 /* _types.h:66:20 */ +// POSIX names -type X__uint64_t = uint64 /* _types.h:68:28 */ +// original BSD names -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// these were exposed here before + +// ancient stuff -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -type Rune_t = X__rune_t /* stdlib.h:46:18 */ +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ type Div_t = struct { Fquot int32 Frem int32 -} /* stdlib.h:66:3 */ +} /* stdlib.h:59:3 */ type Ldiv_t = struct { Fquot int32 Frem int32 -} /* stdlib.h:71:3 */ +} /* stdlib.h:64:3 */ -// Functions added in C99 which we make conditionally available in the -// BSD^C89 namespace if the compiler supports `long long'. -// The #if test is more complicated than it ought to be because -// __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' -// is not supported in the compilation environment (which therefore means -// that it can't really be ISO C99). -// -// (The only other extension made by C99 in thie header is _Exit().) -// LONGLONG type Lldiv_t = struct { Fquot int64 Frem int64 -} /* stdlib.h:142:3 */ // getsubopt(3) external variable - -type Rsize_t = Size_t /* stdlib.h:340:16 */ - -type Errno_t = int32 /* stdlib.h:345:13 */ +} /* stdlib.h:70:3 */ -// K.3.6 -type Constraint_handler_t = uintptr /* stdlib.h:349:14 */ +type Qdiv_t = struct { + Fquot Quad_t + Frem Quad_t +} /* stdlib.h:77:3 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go index d7b12022f8..e2f8af44be 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go @@ -24,8 +24,8 @@ const ( RAND_MAX = 0x7fffffff // stdlib.h:83:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -37,14 +37,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_STDLIB_H_ = 0 // stdlib.h:36:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: @@ -52,14 +52,14 @@ const ( X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -384,7 +384,7 @@ type X__rune_t = int32 /* _types.h:136:15 */ type X__wctrans_t = uintptr /* _types.h:137:14 */ type X__wctype_t = uintptr /* _types.h:138:14 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -554,7 +554,7 @@ type X__wctype_t = uintptr /* _types.h:138:14 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -643,18 +643,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -736,27 +735,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ type Div_t = struct { Fquot int32 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go index d7b12022f8..3089ff9551 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_amd64.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_arm64.go -pkgname stdlib', DO NOT EDIT. package stdlib @@ -23,9 +23,9 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: RAND_MAX = 0x7fffffff // stdlib.h:83:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -33,33 +33,33 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_STDLIB_H_ = 0 // stdlib.h:36:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -148,10 +148,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -280,8 +277,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -323,68 +319,70 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -554,7 +552,7 @@ type X__wctype_t = uintptr /* _types.h:138:14 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -586,8 +584,7 @@ type X__wctype_t = uintptr /* _types.h:138:14 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -643,18 +640,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -736,27 +732,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ type Div_t = struct { Fquot int32 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go b/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go index d6e0c8ada2..69dee2619b 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname stdlib', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o stdlib/stdlib_windows_386.go -pkgname stdlib', DO NOT EDIT. package stdlib @@ -15,179 +15,178 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CHAR_BIT = 8 - CHAR_MAX = 127 - CHAR_MIN = -128 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - EXIT_FAILURE = 1 - EXIT_SUCCESS = 0 - INT_MAX = 2147483647 - INT_MIN = -2147483648 - LLONG_MAX = 9223372036854775807 - LLONG_MIN = -9223372036854775808 - LONG_LONG_MAX = 9223372036854775807 - LONG_LONG_MIN = -9223372036854775808 - LONG_MAX = 2147483647 - LONG_MIN = -2147483648 - MB_LEN_MAX = 5 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - PATH_MAX = 260 - RAND_MAX = 0x7fff - SCHAR_MAX = 127 - SCHAR_MIN = -128 - SHRT_MAX = 32767 - SHRT_MIN = -32768 - SIZE_MAX = 4294967295 - SSIZE_MAX = 2147483647 - UCHAR_MAX = 255 - UINT_MAX = 4294967295 - ULLONG_MAX = 18446744073709551615 - ULONG_LONG_MAX = 18446744073709551615 - ULONG_MAX = 4294967295 - UNALIGNED = 0 - USE___UUIDOF = 0 - USHRT_MAX = 65535 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ALLOCA_S_HEAP_MARKER = 0xDDDD - X_ALLOCA_S_MARKER_SIZE = 8 - X_ALLOCA_S_STACK_MARKER = 0xCCCC - X_ALLOCA_S_THRESHOLD = 1024 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CALL_REPORTFAULT = 0x2 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ABS_DEFINED = 0 - X_CRT_ALGO_DEFINED = 0 - X_CRT_ALLOCATION_DEFINED = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_ATOF_DEFINED = 0 - X_CRT_DOUBLE_DEC = 0 - X_CRT_ERRNO_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_PERROR_DEFINED = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_SWAB_DEFINED = 0 - X_CRT_SYSTEM_DEFINED = 0 - X_CRT_TERMINATE_DEFINED = 0 - X_CRT_WPERROR_DEFINED = 0 - X_CRT_WSYSTEM_DEFINED = 0 - X_CVTBUFSIZE = 349 - X_DIV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FREEA_INLINE = 0 - X_FREEENTRY = 0 - X_GCC_LIMITS_H_ = 0 - X_HEAPBADBEGIN = -3 - X_HEAPBADNODE = -4 - X_HEAPBADPTR = -6 - X_HEAPEMPTY = -1 - X_HEAPEND = -5 - X_HEAPINFO_DEFINED = 0 - X_HEAPOK = -2 - X_HEAP_MAXREQ = 0xFFFFFFE0 - X_I16_MAX = 32767 - X_I16_MIN = -32768 - X_I32_MAX = 2147483647 - X_I32_MIN = -2147483648 - X_I64_MAX = 9223372036854775807 - X_I64_MIN = -9223372036854775808 - X_I8_MAX = 127 - X_I8_MIN = -128 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_LIMITS = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STDLIB = 0 - X_INC_STDLIB_S = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LIMITS_H___ = 0 - X_MALLOC_H_ = 0 - X_MAX_DIR = 256 - X_MAX_DRIVE = 3 - X_MAX_ENV = 32767 - X_MAX_EXT = 256 - X_MAX_FNAME = 256 - X_MAX_PATH = 260 - X_MAX_WAIT_MALLOC_CRT = 60000 - X_MM_MALLOC_H_INCLUDED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_ONEXIT_T_DEFINED = 0 - X_OUT_TO_DEFAULT = 0 - X_OUT_TO_MSGBOX = 2 - X_OUT_TO_STDERR = 1 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_QSORT_S_DEFINED = 0 - X_REENTRANT = 1 - X_REPORT_ERRMODE = 3 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UI16_MAX = 0xffff - X_UI32_MAX = 0xffffffff - X_UI64_MAX = 0xffffffffffffffff - X_UI8_MAX = 0xff - X_UINTPTR_T_DEFINED = 0 - X_USEDENTRY = 1 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WRITE_ABORT_MSG = 0x1 - X_WSTDLIBP_DEFINED = 0 - X_WSTDLIBP_S_DEFINED = 0 - X_WSTDLIB_DEFINED = 0 - X_WSTDLIB_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + EXIT_FAILURE = 1 // stdlib.h:45:1: + EXIT_SUCCESS = 0 // stdlib.h:44:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1: + LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1: + LONG_MAX = 2147483647 // limits.h:131:1: + LONG_MIN = -2147483648 // limits.h:129:1: + MB_LEN_MAX = 5 // limits.h:35:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + PATH_MAX = 260 // limits.h:20:1: + RAND_MAX = 0x7fff // stdlib.h:106:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SIZE_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:86:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_LONG_MAX = 18446744073709551615 // limits.h:158:1: + ULONG_MAX = 4294967295 // limits.h:135:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + USHRT_MAX = 65535 // limits.h:113:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ALLOCA_S_HEAP_MARKER = 0xDDDD // malloc.h:137:1: + X_ALLOCA_S_MARKER_SIZE = 8 // malloc.h:140:1: + X_ALLOCA_S_STACK_MARKER = 0xCCCC // malloc.h:136:1: + X_ALLOCA_S_THRESHOLD = 1024 // malloc.h:135:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CALL_REPORTFAULT = 0x2 // stdlib.h:139:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ABS_DEFINED = 0 // stdlib.h:410:1: + X_CRT_ALGO_DEFINED = 0 // stdlib.h:433:1: + X_CRT_ALLOCATION_DEFINED = 0 // stdlib.h:528:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_ATOF_DEFINED = 0 // stdlib.h:424:1: + X_CRT_DOUBLE_DEC = 0 // stdlib.h:72:1: + X_CRT_ERRNO_DEFINED = 0 // stdlib.h:153:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_PERROR_DEFINED = 0 // stdlib.h:648:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_SWAB_DEFINED = 0 // stdlib.h:716:1: + X_CRT_SYSTEM_DEFINED = 0 // stdlib.h:518:1: + X_CRT_TERMINATE_DEFINED = 0 // stdlib.h:387:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WPERROR_DEFINED = 0 // stdlib.h:677:1: + X_CRT_WSYSTEM_DEFINED = 0 // stdlib.h:587:1: + X_CVTBUFSIZE = 349 // stdlib.h:611:1: + X_DIV_T_DEFINED = 0 // stdlib.h:58:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FREEA_INLINE = 0 // malloc.h:161:1: + X_FREEENTRY = 0 // malloc.h:40:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_HEAPBADBEGIN = -3 // malloc.h:34:1: + X_HEAPBADNODE = -4 // malloc.h:35:1: + X_HEAPBADPTR = -6 // malloc.h:37:1: + X_HEAPEMPTY = -1 // malloc.h:32:1: + X_HEAPEND = -5 // malloc.h:36:1: + X_HEAPINFO_DEFINED = 0 // malloc.h:44:1: + X_HEAPOK = -2 // malloc.h:33:1: + X_HEAP_MAXREQ = 0xFFFFFFE0 // malloc.h:20:1: + X_I16_MAX = 32767 // limits.h:54:1: + X_I16_MIN = -32768 // limits.h:53:1: + X_I32_MAX = 2147483647 // limits.h:58:1: + X_I32_MIN = -2147483648 // limits.h:57:1: + X_I64_MAX = 9223372036854775807 // limits.h:71:1: + X_I64_MIN = -9223372036854775808 // limits.h:70:1: + X_I8_MAX = 127 // limits.h:50:1: + X_I8_MIN = -128 // limits.h:49:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CORECRT_WSTDLIB = 0 // corecrt_wstdlib.h:7:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_LIMITS = 0 // limits.h:9:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STDLIB = 0 // stdlib.h:7:1: + X_INC_STDLIB_S = 0 // stdlib_s.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_MALLOC_H_ = 0 // malloc.h:7:1: + X_MAX_DIR = 256 // stdlib.h:129:1: + X_MAX_DRIVE = 3 // stdlib.h:128:1: + X_MAX_ENV = 32767 // stdlib.h:141:1: + X_MAX_EXT = 256 // stdlib.h:131:1: + X_MAX_FNAME = 256 // stdlib.h:130:1: + X_MAX_PATH = 260 // stdlib.h:127:1: + X_MAX_WAIT_MALLOC_CRT = 60000 // malloc.h:108:1: + X_MM_MALLOC_H_INCLUDED = 0 // malloc.h:61:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_ONEXIT_T_DEFINED = 0 // stdlib.h:48:1: + X_OUT_TO_DEFAULT = 0 // stdlib.h:133:1: + X_OUT_TO_MSGBOX = 2 // stdlib.h:135:1: + X_OUT_TO_STDERR = 1 // stdlib.h:134:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_QSORT_S_DEFINED = 0 // stdlib_s.h:40:1: + X_REPORT_ERRMODE = 3 // stdlib.h:136:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UI16_MAX = 0xffff // limits.h:55:1: + X_UI32_MAX = 0xffffffff // limits.h:59:1: + X_UI64_MAX = 0xffffffffffffffff // limits.h:72:1: + X_UI8_MAX = 0xff // limits.h:51:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USEDENTRY = 1 // malloc.h:41:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WRITE_ABORT_MSG = 0x1 // stdlib.h:138:1: + X_WSTDLIBP_DEFINED = 0 // stdlib.h:673:1: + X_WSTDLIB_DEFINED = 0 // stdlib.h:553:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -241,6 +240,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -281,26 +286,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -326,31 +333,31 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ -// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -394,6 +401,11 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // File system limits // // NOTE: Apparently the actual size of PATH_MAX is 260, but a space is @@ -402,7 +414,7 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. -// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -459,40 +471,40 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // This administrivia gets added to the end of limits.h // if the system has its own version of limits.h. -type X_onexit_t = uintptr /* stdlib.h:49:15 */ +type X_onexit_t = uintptr /* stdlib.h:50:15 */ type X_div_t = struct { Fquot int32 Frem int32 -} /* stdlib.h:59:11 */ +} /* stdlib.h:60:11 */ -type Div_t = X_div_t /* stdlib.h:62:5 */ +type Div_t = X_div_t /* stdlib.h:63:5 */ type X_ldiv_t = struct { Fquot int32 Frem int32 -} /* stdlib.h:64:11 */ +} /* stdlib.h:65:11 */ -type Ldiv_t = X_ldiv_t /* stdlib.h:67:5 */ +type Ldiv_t = X_ldiv_t /* stdlib.h:68:5 */ -type X_LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:76:5 */ +type X_LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:77:5 */ -type X_CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:83:5 */ +type X_CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:84:5 */ -type X_CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:87:5 */ +type X_CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:88:5 */ -type X_LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:94:5 */ +type X_LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:95:5 */ -type X_LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:101:5 */ +type X_LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:102:5 */ -type X_purecall_handler = uintptr /* stdlib.h:142:16 */ +type X_purecall_handler = uintptr /* stdlib.h:143:16 */ -type X_invalid_parameter_handler = uintptr /* stdlib.h:147:16 */ +type X_invalid_parameter_handler = uintptr /* stdlib.h:148:16 */ type Lldiv_t = struct { Fquot int64 Frem int64 -} /* stdlib.h:699:61 */ +} /* stdlib.h:727:61 */ // * // This file has no copyright assigned and is placed in the Public Domain. diff --git a/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go b/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go index 3014939442..4cfd69b9fb 100644 --- a/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname socket', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/socket/socket_darwin_amd64.go -pkgname socket', DO NOT EDIT. package socket diff --git a/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go b/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go index e972f1ef4d..5f3633e429 100644 --- a/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/socket/socket_freebsd_386.go -pkgname socket', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_386.go -pkgname socket', DO NOT EDIT. package socket diff --git a/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go b/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go index 704ece3037..a5653ab767 100644 --- a/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_amd64.go -pkgname socket', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_arm64.go -pkgname socket', DO NOT EDIT. package socket diff --git a/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go index a17bddfafc..90ffef0cfb 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname socket', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/socket/socket_darwin_amd64.go -pkgname socket', DO NOT EDIT. package socket @@ -15,323 +15,323 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 - AF_CCITT = 10 - AF_CHAOS = 5 - AF_CNT = 21 - AF_COIP = 20 - AF_DATAKIT = 9 - AF_DECnet = 12 - AF_DLI = 13 - AF_E164 = 28 - AF_ECMA = 8 - AF_HYLINK = 15 - AF_IEEE80211 = 37 - AF_IMPLINK = 3 - AF_INET = 2 - AF_INET6 = 30 - AF_IPX = 23 - AF_ISDN = 28 - AF_ISO = 7 - AF_LAT = 14 - AF_LINK = 18 - AF_LOCAL = 1 - AF_MAX = 40 - AF_NATM = 31 - AF_NDRV = 27 - AF_NETBIOS = 33 - AF_NS = 6 - AF_OSI = 7 - AF_PPP = 34 - AF_PUP = 4 - AF_RESERVED_36 = 36 - AF_ROUTE = 17 - AF_SIP = 24 - AF_SNA = 11 - AF_SYSTEM = 32 - AF_UNIX = 1 - AF_UNSPEC = 0 - AF_UTUN = 38 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - CONNECT_DATA_AUTHENTICATED = 0x4 - CONNECT_DATA_IDEMPOTENT = 0x2 - CONNECT_RESUME_ON_READ_WRITE = 0x1 - FD_SETSIZE = 1024 - KEV_DL_ADDMULTI = 7 - KEV_DL_AWDL_RESTRICTED = 26 - KEV_DL_AWDL_UNRESTRICTED = 27 - KEV_DL_DELMULTI = 8 - KEV_DL_IFCAP_CHANGED = 19 - KEV_DL_IFDELEGATE_CHANGED = 25 - KEV_DL_IF_ATTACHED = 9 - KEV_DL_IF_DETACHED = 11 - KEV_DL_IF_DETACHING = 10 - KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 - KEV_DL_ISSUES = 24 - KEV_DL_LINK_ADDRESS_CHANGED = 16 - KEV_DL_LINK_OFF = 12 - KEV_DL_LINK_ON = 13 - KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 - KEV_DL_LOW_POWER_MODE_CHANGED = 30 - KEV_DL_MASTER_ELECTED = 23 - KEV_DL_NODE_ABSENCE = 22 - KEV_DL_NODE_PRESENCE = 21 - KEV_DL_PROTO_ATTACHED = 14 - KEV_DL_PROTO_DETACHED = 15 - KEV_DL_QOS_MODE_CHANGED = 29 - KEV_DL_RRC_STATE_CHANGED = 28 - KEV_DL_SIFFLAGS = 1 - KEV_DL_SIFGENERIC = 6 - KEV_DL_SIFMEDIA = 5 - KEV_DL_SIFMETRICS = 2 - KEV_DL_SIFMTU = 3 - KEV_DL_SIFPHYS = 4 - KEV_DL_SUBCLASS = 2 - KEV_DL_WAKEFLAGS_CHANGED = 17 - KEV_INET6_ADDR_DELETED = 3 - KEV_INET6_CHANGED_ADDR = 2 - KEV_INET6_DEFROUTER = 6 - KEV_INET6_NEW_LL_ADDR = 4 - KEV_INET6_NEW_RTADV_ADDR = 5 - KEV_INET6_NEW_USER_ADDR = 1 - KEV_INET6_REQUEST_NAT64_PREFIX = 7 - KEV_INET6_SUBCLASS = 6 - KEV_INET_ADDR_DELETED = 3 - KEV_INET_ARPCOLLISION = 7 - KEV_INET_ARPRTRALIVE = 10 - KEV_INET_ARPRTRFAILURE = 9 - KEV_INET_CHANGED_ADDR = 2 - KEV_INET_NEW_ADDR = 1 - KEV_INET_PORTINUSE = 8 - KEV_INET_SIFBRDADDR = 5 - KEV_INET_SIFDSTADDR = 4 - KEV_INET_SIFNETMASK = 6 - KEV_INET_SUBCLASS = 1 - LITTLE_ENDIAN = 1234 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - NBBY = 8 - NETSVC_MRKNG_LVL_L2 = 1 - NETSVC_MRKNG_LVL_L3L2_ALL = 2 - NETSVC_MRKNG_LVL_L3L2_BK = 3 - NETSVC_MRKNG_UNKNOWN = 0 - NET_MAXID = 40 - NET_RT_DUMP = 1 - NET_RT_DUMP2 = 7 - NET_RT_FLAGS = 2 - NET_RT_FLAGS_PRIV = 10 - NET_RT_IFLIST = 3 - NET_RT_IFLIST2 = 6 - NET_RT_MAXID = 11 - NET_RT_STAT = 4 - NET_RT_TRASH = 5 - NET_SERVICE_TYPE_AV = 6 - NET_SERVICE_TYPE_BE = 0 - NET_SERVICE_TYPE_BK = 1 - NET_SERVICE_TYPE_OAM = 7 - NET_SERVICE_TYPE_RD = 8 - NET_SERVICE_TYPE_RV = 5 - NET_SERVICE_TYPE_SIG = 2 - NET_SERVICE_TYPE_VI = 3 - NET_SERVICE_TYPE_VO = 4 - PDP_ENDIAN = 3412 - PF_APPLETALK = 16 - PF_CCITT = 10 - PF_CHAOS = 5 - PF_CNT = 21 - PF_COIP = 20 - PF_DATAKIT = 9 - PF_DECnet = 12 - PF_DLI = 13 - PF_ECMA = 8 - PF_HYLINK = 15 - PF_IMPLINK = 3 - PF_INET = 2 - PF_INET6 = 30 - PF_IPX = 23 - PF_ISDN = 28 - PF_ISO = 7 - PF_KEY = 29 - PF_LAT = 14 - PF_LINK = 18 - PF_LOCAL = 1 - PF_MAX = 40 - PF_NATM = 31 - PF_NDRV = 27 - PF_NETBIOS = 33 - PF_NS = 6 - PF_OSI = 7 - PF_PIP = 25 - PF_PPP = 34 - PF_PUP = 4 - PF_RESERVED_36 = 36 - PF_ROUTE = 17 - PF_RTIP = 22 - PF_SIP = 24 - PF_SNA = 11 - PF_SYSTEM = 32 - PF_UNIX = 1 - PF_UNSPEC = 0 - PF_UTUN = 38 - PF_XTP = 19 - SAE_ASSOCID_ANY = 0 - SAE_CONNID_ANY = 0 - SCM_CREDS = 0x03 - SCM_RIGHTS = 0x01 - SCM_TIMESTAMP = 0x02 - SCM_TIMESTAMP_MONOTONIC = 0x04 - SHUT_RD = 0 - SHUT_RDWR = 2 - SHUT_WR = 1 - SOCK_DGRAM = 2 - SOCK_MAXADDRLEN = 255 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_STREAM = 1 - SOL_SOCKET = 0xffff - SOMAXCONN = 128 - SONPX_SETOPTSHUT = 0x000000001 - SO_ACCEPTCONN = 0x0002 - SO_BROADCAST = 0x0020 - SO_DEBUG = 0x0001 - SO_DONTROUTE = 0x0010 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x0008 - SO_LABEL = 0x1010 - SO_LINGER = 0x0080 - SO_LINGER_SEC = 0x1080 - SO_NETSVC_MARKING_LEVEL = 0x1119 - SO_NET_SERVICE_TYPE = 0x1116 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x0100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x0004 - SO_REUSEPORT = 0x0200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x0400 - SO_TIMESTAMP_MONOTONIC = 0x0800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x0040 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_I386__PARAM_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NET_NETKEV_H_ = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SA_FAMILY_T = 0 - X_SIZE_T = 0 - X_SOCKLEN_T = 0 - X_SSIZE_T = 0 - X_SS_MAXSIZE = 128 - X_STRUCT_IOVEC = 0 - X_SUSECONDS_T = 0 - X_SYS_SOCKET_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 - Pseudo_AF_HDRCMPLT = 35 - Pseudo_AF_KEY = 29 - Pseudo_AF_PIP = 25 - Pseudo_AF_RTIP = 22 - Pseudo_AF_XTP = 19 + AF_APPLETALK = 16 // socket.h:375:1: + AF_CCITT = 10 // socket.h:369:1: + AF_CHAOS = 5 // socket.h:363:1: + AF_CNT = 21 // socket.h:380:1: + AF_COIP = 20 // socket.h:379:1: + AF_DATAKIT = 9 // socket.h:368:1: + AF_DECnet = 12 // socket.h:371:1: + AF_DLI = 13 // socket.h:372:1: + AF_E164 = 28 // socket.h:387:1: + AF_ECMA = 8 // socket.h:367:1: + AF_HYLINK = 15 // socket.h:374:1: + AF_IEEE80211 = 37 // socket.h:399:1: + AF_IMPLINK = 3 // socket.h:361:1: + AF_INET = 2 // socket.h:359:1: + AF_INET6 = 30 // socket.h:390:1: + AF_IPX = 23 // socket.h:382:1: + AF_ISDN = 28 // socket.h:386:1: + AF_ISO = 7 // socket.h:365:1: + AF_LAT = 14 // socket.h:373:1: + AF_LINK = 18 // socket.h:377:1: + AF_LOCAL = 1 // socket.h:357:1: + AF_MAX = 40 // socket.h:401:1: + AF_NATM = 31 // socket.h:392:1: + AF_NDRV = 27 // socket.h:385:1: + AF_NETBIOS = 33 // socket.h:394:1: + AF_NS = 6 // socket.h:364:1: + AF_OSI = 7 // socket.h:366:1: + AF_PPP = 34 // socket.h:395:1: + AF_PUP = 4 // socket.h:362:1: + AF_RESERVED_36 = 36 // socket.h:398:1: + AF_ROUTE = 17 // socket.h:376:1: + AF_SIP = 24 // socket.h:383:1: + AF_SNA = 11 // socket.h:370:1: + AF_SYSTEM = 32 // socket.h:393:1: + AF_UNIX = 1 // socket.h:355:1: + AF_UNSPEC = 0 // socket.h:354:1: + AF_UTUN = 38 // socket.h:400:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CONNECT_DATA_AUTHENTICATED = 0x4 // socket.h:300:1: + CONNECT_DATA_IDEMPOTENT = 0x2 // socket.h:299:1: + CONNECT_RESUME_ON_READ_WRITE = 0x1 // socket.h:298:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + KEV_DL_ADDMULTI = 7 // net_kev.h:61:1: + KEV_DL_AWDL_RESTRICTED = 26 // net_kev.h:80:1: + KEV_DL_AWDL_UNRESTRICTED = 27 // net_kev.h:81:1: + KEV_DL_DELMULTI = 8 // net_kev.h:62:1: + KEV_DL_IFCAP_CHANGED = 19 // net_kev.h:73:1: + KEV_DL_IFDELEGATE_CHANGED = 25 // net_kev.h:79:1: + KEV_DL_IF_ATTACHED = 9 // net_kev.h:63:1: + KEV_DL_IF_DETACHED = 11 // net_kev.h:65:1: + KEV_DL_IF_DETACHING = 10 // net_kev.h:64:1: + KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 // net_kev.h:72:1: + KEV_DL_ISSUES = 24 // net_kev.h:78:1: + KEV_DL_LINK_ADDRESS_CHANGED = 16 // net_kev.h:70:1: + KEV_DL_LINK_OFF = 12 // net_kev.h:66:1: + KEV_DL_LINK_ON = 13 // net_kev.h:67:1: + KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 // net_kev.h:74:1: + KEV_DL_LOW_POWER_MODE_CHANGED = 30 // net_kev.h:84:1: + KEV_DL_MASTER_ELECTED = 23 // net_kev.h:77:1: + KEV_DL_NODE_ABSENCE = 22 // net_kev.h:76:1: + KEV_DL_NODE_PRESENCE = 21 // net_kev.h:75:1: + KEV_DL_PROTO_ATTACHED = 14 // net_kev.h:68:1: + KEV_DL_PROTO_DETACHED = 15 // net_kev.h:69:1: + KEV_DL_QOS_MODE_CHANGED = 29 // net_kev.h:83:1: + KEV_DL_RRC_STATE_CHANGED = 28 // net_kev.h:82:1: + KEV_DL_SIFFLAGS = 1 // net_kev.h:55:1: + KEV_DL_SIFGENERIC = 6 // net_kev.h:60:1: + KEV_DL_SIFMEDIA = 5 // net_kev.h:59:1: + KEV_DL_SIFMETRICS = 2 // net_kev.h:56:1: + KEV_DL_SIFMTU = 3 // net_kev.h:57:1: + KEV_DL_SIFPHYS = 4 // net_kev.h:58:1: + KEV_DL_SUBCLASS = 2 // net_kev.h:50:1: + KEV_DL_WAKEFLAGS_CHANGED = 17 // net_kev.h:71:1: + KEV_INET6_ADDR_DELETED = 3 // net_kev.h:91:1: + KEV_INET6_CHANGED_ADDR = 2 // net_kev.h:90:1: + KEV_INET6_DEFROUTER = 6 // net_kev.h:94:1: + KEV_INET6_NEW_LL_ADDR = 4 // net_kev.h:92:1: + KEV_INET6_NEW_RTADV_ADDR = 5 // net_kev.h:93:1: + KEV_INET6_NEW_USER_ADDR = 1 // net_kev.h:89:1: + KEV_INET6_REQUEST_NAT64_PREFIX = 7 // net_kev.h:95:1: + KEV_INET6_SUBCLASS = 6 // net_kev.h:87:1: + KEV_INET_ADDR_DELETED = 3 // net_kev.h:39:1: + KEV_INET_ARPCOLLISION = 7 // net_kev.h:43:1: + KEV_INET_ARPRTRALIVE = 10 // net_kev.h:48:1: + KEV_INET_ARPRTRFAILURE = 9 // net_kev.h:47:1: + KEV_INET_CHANGED_ADDR = 2 // net_kev.h:38:1: + KEV_INET_NEW_ADDR = 1 // net_kev.h:37:1: + KEV_INET_PORTINUSE = 8 // net_kev.h:45:1: + KEV_INET_SIFBRDADDR = 5 // net_kev.h:41:1: + KEV_INET_SIFDSTADDR = 4 // net_kev.h:40:1: + KEV_INET_SIFNETMASK = 6 // net_kev.h:42:1: + KEV_INET_SUBCLASS = 1 // net_kev.h:35:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MSG_CTRUNC = 0x20 // socket.h:563:1: + MSG_DONTROUTE = 0x4 // socket.h:560:1: + MSG_DONTWAIT = 0x80 // socket.h:566:1: + MSG_EOF = 0x100 // socket.h:567:1: + MSG_EOR = 0x8 // socket.h:561:1: + MSG_FLUSH = 0x400 // socket.h:572:1: + MSG_HAVEMORE = 0x2000 // socket.h:575:1: + MSG_HOLD = 0x800 // socket.h:573:1: + MSG_NEEDSA = 0x10000 // socket.h:578:1: + MSG_OOB = 0x1 // socket.h:558:1: + MSG_PEEK = 0x2 // socket.h:559:1: + MSG_RCVMORE = 0x4000 // socket.h:576:1: + MSG_SEND = 0x1000 // socket.h:574:1: + MSG_TRUNC = 0x10 // socket.h:562:1: + MSG_WAITALL = 0x40 // socket.h:564:1: + MSG_WAITSTREAM = 0x200 // socket.h:570:1: + NBBY = 8 // types.h:186:1: + NETSVC_MRKNG_LVL_L2 = 1 // socket.h:283:1: + NETSVC_MRKNG_LVL_L3L2_ALL = 2 // socket.h:284:1: + NETSVC_MRKNG_LVL_L3L2_BK = 3 // socket.h:285:1: + NETSVC_MRKNG_UNKNOWN = 0 // socket.h:282:1: + NET_MAXID = 40 // socket.h:506:1: + NET_RT_DUMP = 1 // socket.h:519:1: + NET_RT_DUMP2 = 7 // socket.h:525:1: + NET_RT_FLAGS = 2 // socket.h:520:1: + NET_RT_FLAGS_PRIV = 10 // socket.h:530:1: + NET_RT_IFLIST = 3 // socket.h:521:1: + NET_RT_IFLIST2 = 6 // socket.h:524:1: + NET_RT_MAXID = 11 // socket.h:531:1: + NET_RT_STAT = 4 // socket.h:522:1: + NET_RT_TRASH = 5 // socket.h:523:1: + NET_SERVICE_TYPE_AV = 6 // socket.h:276:1: + NET_SERVICE_TYPE_BE = 0 // socket.h:270:1: + NET_SERVICE_TYPE_BK = 1 // socket.h:271:1: + NET_SERVICE_TYPE_OAM = 7 // socket.h:277:1: + NET_SERVICE_TYPE_RD = 8 // socket.h:278:1: + NET_SERVICE_TYPE_RV = 5 // socket.h:275:1: + NET_SERVICE_TYPE_SIG = 2 // socket.h:272:1: + NET_SERVICE_TYPE_VI = 3 // socket.h:273:1: + NET_SERVICE_TYPE_VO = 4 // socket.h:274:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + PF_APPLETALK = 16 // socket.h:469:1: + PF_CCITT = 10 // socket.h:463:1: + PF_CHAOS = 5 // socket.h:457:1: + PF_CNT = 21 // socket.h:474:1: + PF_COIP = 20 // socket.h:473:1: + PF_DATAKIT = 9 // socket.h:462:1: + PF_DECnet = 12 // socket.h:465:1: + PF_DLI = 13 // socket.h:466:1: + PF_ECMA = 8 // socket.h:461:1: + PF_HYLINK = 15 // socket.h:468:1: + PF_IMPLINK = 3 // socket.h:455:1: + PF_INET = 2 // socket.h:454:1: + PF_INET6 = 30 // socket.h:482:1: + PF_IPX = 23 // socket.h:476:1: + PF_ISDN = 28 // socket.h:480:1: + PF_ISO = 7 // socket.h:459:1: + PF_KEY = 29 // socket.h:481:1: + PF_LAT = 14 // socket.h:467:1: + PF_LINK = 18 // socket.h:471:1: + PF_LOCAL = 1 // socket.h:452:1: + PF_MAX = 40 // socket.h:489:1: + PF_NATM = 31 // socket.h:483:1: + PF_NDRV = 27 // socket.h:479:1: + PF_NETBIOS = 33 // socket.h:485:1: + PF_NS = 6 // socket.h:458:1: + PF_OSI = 7 // socket.h:460:1: + PF_PIP = 25 // socket.h:478:1: + PF_PPP = 34 // socket.h:486:1: + PF_PUP = 4 // socket.h:456:1: + PF_RESERVED_36 = 36 // socket.h:487:1: + PF_ROUTE = 17 // socket.h:470:1: + PF_RTIP = 22 // socket.h:477:1: + PF_SIP = 24 // socket.h:475:1: + PF_SNA = 11 // socket.h:464:1: + PF_SYSTEM = 32 // socket.h:484:1: + PF_UNIX = 1 // socket.h:453:1: + PF_UNSPEC = 0 // socket.h:451:1: + PF_UTUN = 38 // socket.h:488:1: + PF_XTP = 19 // socket.h:472:1: + SAE_ASSOCID_ANY = 0 // socket.h:290:1: + SAE_CONNID_ANY = 0 // socket.h:294:1: + SCM_CREDS = 0x03 // socket.h:661:1: + SCM_RIGHTS = 0x01 // socket.h:658:1: + SCM_TIMESTAMP = 0x02 // socket.h:660:1: + SCM_TIMESTAMP_MONOTONIC = 0x04 // socket.h:662:1: + SHUT_RD = 0 // socket.h:670:1: + SHUT_RDWR = 2 // socket.h:672:1: + SHUT_WR = 1 // socket.h:671:1: + SOCK_DGRAM = 2 // socket.h:112:1: + SOCK_MAXADDRLEN = 255 // socket.h:414:1: + SOCK_RAW = 3 // socket.h:113:1: + SOCK_RDM = 4 // socket.h:115:1: + SOCK_SEQPACKET = 5 // socket.h:117:1: + SOCK_STREAM = 1 // socket.h:111:1: + SOL_SOCKET = 0xffff // socket.h:348:1: + SOMAXCONN = 128 // socket.h:540:1: + SONPX_SETOPTSHUT = 0x000000001 // socket.h:338:1: + SO_ACCEPTCONN = 0x0002 // socket.h:123:1: + SO_BROADCAST = 0x0020 // socket.h:127:1: + SO_DEBUG = 0x0001 // socket.h:122:1: + SO_DONTROUTE = 0x0010 // socket.h:126:1: + SO_DONTTRUNC = 0x2000 // socket.h:142:1: + SO_ERROR = 0x1007 // socket.h:160:1: + SO_KEEPALIVE = 0x0008 // socket.h:125:1: + SO_LABEL = 0x1010 // socket.h:163:1: + SO_LINGER = 0x0080 // socket.h:130:1: + SO_LINGER_SEC = 0x1080 // socket.h:176:1: + SO_NETSVC_MARKING_LEVEL = 0x1119 // socket.h:185:1: + SO_NET_SERVICE_TYPE = 0x1116 // socket.h:182:1: + SO_NKE = 0x1021 // socket.h:167:1: + SO_NOADDRERR = 0x1023 // socket.h:169:1: + SO_NOSIGPIPE = 0x1022 // socket.h:168:1: + SO_NOTIFYCONFLICT = 0x1026 // socket.h:173:1: + SO_NP_EXTENSIONS = 0x1083 // socket.h:178:1: + SO_NREAD = 0x1020 // socket.h:166:1: + SO_NUMRCVPKT = 0x1112 // socket.h:181:1: + SO_NWRITE = 0x1024 // socket.h:170:1: + SO_OOBINLINE = 0x0100 // socket.h:134:1: + SO_PEERLABEL = 0x1011 // socket.h:164:1: + SO_RANDOMPORT = 0x1082 // socket.h:177:1: + SO_RCVBUF = 0x1002 // socket.h:155:1: + SO_RCVLOWAT = 0x1004 // socket.h:157:1: + SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_REUSEADDR = 0x0004 // socket.h:124:1: + SO_REUSEPORT = 0x0200 // socket.h:136:1: + SO_REUSESHAREUID = 0x1025 // socket.h:171:1: + SO_SNDBUF = 0x1001 // socket.h:154:1: + SO_SNDLOWAT = 0x1003 // socket.h:156:1: + SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_TIMESTAMP = 0x0400 // socket.h:137:1: + SO_TIMESTAMP_MONOTONIC = 0x0800 // socket.h:138:1: + SO_TYPE = 0x1008 // socket.h:161:1: + SO_UPCALLCLOSEWAIT = 0x1027 // socket.h:174:1: + SO_USELOOPBACK = 0x0040 // socket.h:129:1: + SO_WANTMORE = 0x4000 // socket.h:144:1: + SO_WANTOOBFLAG = 0x8000 // socket.h:145:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_I386__PARAM_H_ = 0 // _param.h:30:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NET_NETKEV_H_ = 0 // net_kev.h:30:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SA_FAMILY_T = 0 // _sa_family_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SOCKLEN_T = 0 // _socklen_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SS_MAXSIZE = 128 // socket.h:429:1: + X_STRUCT_IOVEC = 0 // _iovec_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SOCKET_H_ = 0 // socket.h:73:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: + Pseudo_AF_HDRCMPLT = 35 // socket.h:396:1: + Pseudo_AF_KEY = 29 // socket.h:388:1: + Pseudo_AF_PIP = 25 // socket.h:384:1: + Pseudo_AF_RTIP = 22 // socket.h:381:1: + Pseudo_AF_XTP = 19 // socket.h:378:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go b/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go index 626e2b6bb6..2cc5f03225 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go +++ b/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/socket/socket_freebsd_386.go -pkgname socket', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_386.go -pkgname socket', DO NOT EDIT. package socket @@ -15,265 +15,228 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 // socket.h:240:1: - AF_ARP = 35 // socket.h:264:1: - AF_ATM = 30 // socket.h:257:1: - AF_BLUETOOTH = 36 // socket.h:265:1: - AF_CCITT = 10 // socket.h:234:1: - AF_CHAOS = 5 // socket.h:228:1: - AF_CNT = 21 // socket.h:245:1: - AF_COIP = 20 // socket.h:244:1: - AF_DATAKIT = 9 // socket.h:233:1: - AF_DECnet = 12 // socket.h:236:1: - AF_DLI = 13 // socket.h:237:1: - AF_E164 = 26 // socket.h:251:1: - AF_ECMA = 8 // socket.h:232:1: - AF_HYLINK = 15 // socket.h:239:1: - AF_HYPERV = 43 // socket.h:269:1: - AF_IEEE80211 = 37 // socket.h:266:1: - AF_IMPLINK = 3 // socket.h:226:1: - AF_INET = 2 // socket.h:224:1: - AF_INET6 = 28 // socket.h:254:1: - AF_INET6_SDP = 42 // socket.h:268:1: - AF_INET_SDP = 40 // socket.h:267:1: - AF_IPX = 23 // socket.h:247:1: - AF_ISDN = 26 // socket.h:250:1: - AF_ISO = 7 // socket.h:230:1: - AF_LAT = 14 // socket.h:238:1: - AF_LINK = 18 // socket.h:242:1: - AF_LOCAL = 1 // socket.h:221:1: - AF_MAX = 43 // socket.h:270:1: - AF_NATM = 29 // socket.h:256:1: - AF_NETBIOS = 6 // socket.h:229:1: - AF_NETGRAPH = 32 // socket.h:261:1: - AF_OSI = 7 // socket.h:231:1: - AF_PUP = 4 // socket.h:227:1: - AF_ROUTE = 17 // socket.h:241:1: - AF_SCLUSTER = 34 // socket.h:263:1: - AF_SIP = 24 // socket.h:248:1: - AF_SLOW = 33 // socket.h:262:1: - AF_SNA = 11 // socket.h:235:1: - AF_UNIX = 1 // socket.h:223:1: - AF_UNSPEC = 0 // socket.h:219:1: - AF_VENDOR00 = 39 // socket.h:276:1: - AF_VENDOR01 = 41 // socket.h:277:1: - AF_VENDOR03 = 45 // socket.h:278:1: - AF_VENDOR04 = 47 // socket.h:279:1: - AF_VENDOR05 = 49 // socket.h:280:1: - AF_VENDOR06 = 51 // socket.h:281:1: - AF_VENDOR07 = 53 // socket.h:282:1: - AF_VENDOR08 = 55 // socket.h:283:1: - AF_VENDOR09 = 57 // socket.h:284:1: - AF_VENDOR10 = 59 // socket.h:285:1: - AF_VENDOR11 = 61 // socket.h:286:1: - AF_VENDOR12 = 63 // socket.h:287:1: - AF_VENDOR13 = 65 // socket.h:288:1: - AF_VENDOR14 = 67 // socket.h:289:1: - AF_VENDOR15 = 69 // socket.h:290:1: - AF_VENDOR16 = 71 // socket.h:291:1: - AF_VENDOR17 = 73 // socket.h:292:1: - AF_VENDOR18 = 75 // socket.h:293:1: - AF_VENDOR19 = 77 // socket.h:294:1: - AF_VENDOR20 = 79 // socket.h:295:1: - AF_VENDOR21 = 81 // socket.h:296:1: - AF_VENDOR22 = 83 // socket.h:297:1: - AF_VENDOR23 = 85 // socket.h:298:1: - AF_VENDOR24 = 87 // socket.h:299:1: - AF_VENDOR25 = 89 // socket.h:300:1: - AF_VENDOR26 = 91 // socket.h:301:1: - AF_VENDOR27 = 93 // socket.h:302:1: - AF_VENDOR28 = 95 // socket.h:303:1: - AF_VENDOR29 = 97 // socket.h:304:1: - AF_VENDOR30 = 99 // socket.h:305:1: - AF_VENDOR31 = 101 // socket.h:306:1: - AF_VENDOR32 = 103 // socket.h:307:1: - AF_VENDOR33 = 105 // socket.h:308:1: - AF_VENDOR34 = 107 // socket.h:309:1: - AF_VENDOR35 = 109 // socket.h:310:1: - AF_VENDOR36 = 111 // socket.h:311:1: - AF_VENDOR37 = 113 // socket.h:312:1: - AF_VENDOR38 = 115 // socket.h:313:1: - AF_VENDOR39 = 117 // socket.h:314:1: - AF_VENDOR40 = 119 // socket.h:315:1: - AF_VENDOR41 = 121 // socket.h:316:1: - AF_VENDOR42 = 123 // socket.h:317:1: - AF_VENDOR43 = 125 // socket.h:318:1: - AF_VENDOR44 = 127 // socket.h:319:1: - AF_VENDOR45 = 129 // socket.h:320:1: - AF_VENDOR46 = 131 // socket.h:321:1: - AF_VENDOR47 = 133 // socket.h:322:1: - CMGROUP_MAX = 16 // socket.h:495:1: - MSG_CMSG_CLOEXEC = 0x00040000 // socket.h:468:1: - MSG_COMPAT = 0x00008000 // socket.h:459:1: - MSG_CTRUNC = 0x00000020 // socket.h:448:1: - MSG_DONTROUTE = 0x00000004 // socket.h:445:1: - MSG_DONTWAIT = 0x00000080 // socket.h:451:1: - MSG_EOF = 0x00000100 // socket.h:452:1: - MSG_EOR = 0x00000008 // socket.h:446:1: - MSG_NBIO = 0x00004000 // socket.h:458:1: - MSG_NOSIGNAL = 0x00020000 // socket.h:465:1: - MSG_NOTIFICATION = 0x00002000 // socket.h:457:1: - MSG_OOB = 0x00000001 // socket.h:443:1: - MSG_PEEK = 0x00000002 // socket.h:444:1: - MSG_TRUNC = 0x00000010 // socket.h:447:1: - MSG_WAITALL = 0x00000040 // socket.h:449:1: - MSG_WAITFORONE = 0x00080000 // socket.h:469:1: - NET_RT_DUMP = 1 // socket.h:414:1: - NET_RT_FLAGS = 2 // socket.h:415:1: - NET_RT_IFLIST = 3 // socket.h:416:1: - NET_RT_IFLISTL = 5 // socket.h:418:1: - NET_RT_IFMALIST = 4 // socket.h:417:1: - NET_RT_NHGRP = 7 // socket.h:421:1: - NET_RT_NHOP = 6 // socket.h:420:1: - PF_APPLETALK = 16 // socket.h:371:1: - PF_ARP = 35 // socket.h:389:1: - PF_ATM = 30 // socket.h:385:1: - PF_BLUETOOTH = 36 // socket.h:390:1: - PF_CCITT = 10 // socket.h:365:1: - PF_CHAOS = 5 // socket.h:359:1: - PF_CNT = 21 // socket.h:376:1: - PF_COIP = 20 // socket.h:375:1: - PF_DATAKIT = 9 // socket.h:364:1: - PF_DECnet = 12 // socket.h:367:1: - PF_DLI = 13 // socket.h:368:1: - PF_ECMA = 8 // socket.h:363:1: - PF_HYLINK = 15 // socket.h:370:1: - PF_IEEE80211 = 37 // socket.h:391:1: - PF_IMPLINK = 3 // socket.h:357:1: - PF_INET = 2 // socket.h:356:1: - PF_INET6 = 28 // socket.h:383:1: - PF_INET6_SDP = 42 // socket.h:393:1: - PF_INET_SDP = 40 // socket.h:392:1: - PF_IPX = 23 // socket.h:378:1: - PF_ISDN = 26 // socket.h:381:1: - PF_ISO = 7 // socket.h:361:1: - PF_KEY = 27 // socket.h:382:1: - PF_LAT = 14 // socket.h:369:1: - PF_LINK = 18 // socket.h:373:1: - PF_LOCAL = 1 // socket.h:354:1: - PF_MAX = 43 // socket.h:395:1: - PF_NATM = 29 // socket.h:384:1: - PF_NETBIOS = 6 // socket.h:360:1: - PF_NETGRAPH = 32 // socket.h:386:1: - PF_OSI = 7 // socket.h:362:1: - PF_PIP = 25 // socket.h:380:1: - PF_PUP = 4 // socket.h:358:1: - PF_ROUTE = 17 // socket.h:372:1: - PF_RTIP = 22 // socket.h:379:1: - PF_SCLUSTER = 34 // socket.h:388:1: - PF_SIP = 24 // socket.h:377:1: - PF_SLOW = 33 // socket.h:387:1: - PF_SNA = 11 // socket.h:366:1: - PF_UNIX = 1 // socket.h:355:1: - PF_UNSPEC = 0 // socket.h:353:1: - PF_XTP = 19 // socket.h:374:1: - PRU_FLUSH_RD = 0 // socket.h:636:1: - PRU_FLUSH_RDWR = 2 // socket.h:638:1: - PRU_FLUSH_WR = 1 // socket.h:637:1: - SCM_BINTIME = 0x04 // socket.h:587:1: - SCM_CREDS = 0x03 // socket.h:586:1: - SCM_CREDS2 = 0x08 // socket.h:591:1: - SCM_MONOTONIC = 0x06 // socket.h:589:1: - SCM_REALTIME = 0x05 // socket.h:588:1: - SCM_RIGHTS = 0x01 // socket.h:583:1: - SCM_TIMESTAMP = 0x02 // socket.h:585:1: - SCM_TIME_INFO = 0x07 // socket.h:590:1: - SF_MNOWAIT = 0x00000002 // socket.h:656:1: - SF_NOCACHE = 0x00000010 // socket.h:659:1: - SF_NODISKIO = 0x00000001 // socket.h:655:1: - SF_SYNC = 0x00000004 // socket.h:657:1: - SF_USER_READAHEAD = 0x00000008 // socket.h:658:1: - SHUT_RD = 0 // socket.h:629:1: - SHUT_RDWR = 2 // socket.h:631:1: - SHUT_WR = 1 // socket.h:630:1: - SOCK_CLOEXEC = 0x10000000 // socket.h:114:1: - SOCK_DGRAM = 2 // socket.h:103:1: - SOCK_MAXADDRLEN = 255 // socket.h:335:1: - SOCK_NONBLOCK = 0x20000000 // socket.h:115:1: - SOCK_RAW = 3 // socket.h:104:1: - SOCK_RDM = 4 // socket.h:106:1: - SOCK_SEQPACKET = 5 // socket.h:108:1: - SOCK_STREAM = 1 // socket.h:102:1: - SOL_SOCKET = 0xffff // socket.h:214:1: - SOMAXCONN = 128 // socket.h:427:1: - SO_ACCEPTCONN = 0x00000002 // socket.h:130:1: - SO_ACCEPTFILTER = 0x00001000 // socket.h:144:1: - SO_BINTIME = 0x00002000 // socket.h:145:1: - SO_BROADCAST = 0x00000020 // socket.h:134:1: - SO_DEBUG = 0x00000001 // socket.h:129:1: - SO_DOMAIN = 0x1019 // socket.h:175:1: - SO_DONTROUTE = 0x00000010 // socket.h:133:1: - SO_ERROR = 0x1007 // socket.h:161:1: - SO_KEEPALIVE = 0x00000008 // socket.h:132:1: - SO_LABEL = 0x1009 // socket.h:164:1: - SO_LINGER = 0x00000080 // socket.h:138:1: - SO_LISTENINCQLEN = 0x1013 // socket.h:168:1: - SO_LISTENQLEN = 0x1012 // socket.h:167:1: - SO_LISTENQLIMIT = 0x1011 // socket.h:166:1: - SO_MAX_PACING_RATE = 0x1018 // socket.h:174:1: - SO_NOSIGPIPE = 0x00000800 // socket.h:143:1: - SO_NO_DDP = 0x00008000 // socket.h:148:1: - SO_NO_OFFLOAD = 0x00004000 // socket.h:147:1: - SO_OOBINLINE = 0x00000100 // socket.h:139:1: - SO_PEERLABEL = 0x1010 // socket.h:165:1: - SO_PROTOCOL = 0x1016 // socket.h:171:1: - SO_PROTOTYPE = 4118 // socket.h:172:1: - SO_RCVBUF = 0x1002 // socket.h:156:1: - SO_RCVLOWAT = 0x1004 // socket.h:158:1: - SO_RCVTIMEO = 0x1006 // socket.h:160:1: - SO_RERROR = 0x00020000 // socket.h:150:1: - SO_REUSEADDR = 0x00000004 // socket.h:131:1: - SO_REUSEPORT = 0x00000200 // socket.h:141:1: - SO_REUSEPORT_LB = 0x00010000 // socket.h:149:1: - SO_SETFIB = 0x1014 // socket.h:169:1: - SO_SNDBUF = 0x1001 // socket.h:155:1: - SO_SNDLOWAT = 0x1003 // socket.h:157:1: - SO_SNDTIMEO = 0x1005 // socket.h:159:1: - SO_TIMESTAMP = 0x00000400 // socket.h:142:1: - SO_TS_BINTIME = 1 // socket.h:180:1: - SO_TS_CLOCK = 0x1017 // socket.h:173:1: - SO_TS_CLOCK_MAX = 3 // socket.h:184:1: - SO_TS_DEFAULT = 0 // socket.h:183:1: - SO_TS_MONOTONIC = 3 // socket.h:182:1: - SO_TS_REALTIME = 2 // socket.h:181:1: - SO_TS_REALTIME_MICRO = 0 // socket.h:179:1: - SO_TYPE = 0x1008 // socket.h:162:1: - SO_USELOOPBACK = 0x00000040 // socket.h:136:1: - SO_USER_COOKIE = 0x1015 // socket.h:170:1: - SO_VENDOR = 0x80000000 // socket.h:193:1: - ST_INFO_HW = 0x0001 // socket.h:599:1: - ST_INFO_HW_HPREC = 0x0002 // socket.h:600:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_GID_T_DECLARED = 0 // socket.h:53:1: - X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF_T_DECLARED = 0 // socket.h:58:1: - X_PID_T_DECLARED = 0 // socket.h:63:1: - X_SA_FAMILY_T_DECLARED = 0 // socket.h:69:1: - X_SIZE_T_DECLARED = 0 // _iovec.h:42:1: - X_SOCKLEN_T_DECLARED = 0 // socket.h:74:1: - X_SSIZE_T_DECLARED = 0 // socket.h:79:1: - X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SOCKET_H_ = 0 // socket.h:36:1: - X_SYS__IOVEC_H_ = 0 // _iovec.h:36:1: - X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_UID_T_DECLARED = 0 // socket.h:85:1: - X_UINT32_T_DECLARED = 0 // socket.h:91:1: - X_UINTPTR_T_DECLARED = 0 // socket.h:96:1: - X_X86_INCLUDE__ALIGN_H_ = 0 // _align.h:44:1: - I386 = 1 // :335:1: - Pseudo_AF_HDRCMPLT = 31 // socket.h:258:1: - Pseudo_AF_KEY = 27 // socket.h:252:1: - Pseudo_AF_PIP = 25 // socket.h:249:1: - Pseudo_AF_RTIP = 22 // socket.h:246:1: - Pseudo_AF_XTP = 19 // socket.h:243:1: - Unix = 1 // :336:1: + AF_APPLETALK = 16 // socket.h:181:1: + AF_BLUETOOTH = 32 // socket.h:199:1: + AF_CCITT = 10 // socket.h:175:1: + AF_CHAOS = 5 // socket.h:169:1: + AF_CNT = 21 // socket.h:186:1: + AF_COIP = 20 // socket.h:185:1: + AF_DATAKIT = 9 // socket.h:174:1: + AF_DECnet = 12 // socket.h:177:1: + AF_DLI = 13 // socket.h:178:1: + AF_E164 = 26 // socket.h:192:1: + AF_ECMA = 8 // socket.h:173:1: + AF_ENCAP = 28 // socket.h:194:1: + AF_HYLINK = 15 // socket.h:180:1: + AF_IMPLINK = 3 // socket.h:167:1: + AF_INET = 2 // socket.h:166:1: + AF_INET6 = 24 // socket.h:189:1: + AF_IPX = 23 // socket.h:188:1: + AF_ISDN = 26 // socket.h:191:1: + AF_ISO = 7 // socket.h:171:1: + AF_KEY = 30 // socket.h:196:1: + AF_LAT = 14 // socket.h:179:1: + AF_LINK = 18 // socket.h:183:1: + AF_LOCAL = 1 // socket.h:165:1: + AF_MAX = 36 // socket.h:203:1: + AF_MPLS = 33 // socket.h:200:1: + AF_NATM = 27 // socket.h:193:1: + AF_NS = 6 // socket.h:170:1: + AF_OSI = 7 // socket.h:172:1: + AF_PUP = 4 // socket.h:168:1: + AF_ROUTE = 17 // socket.h:182:1: + AF_SIP = 29 // socket.h:195:1: + AF_SNA = 11 // socket.h:176:1: + AF_UNIX = 1 // socket.h:164:1: + AF_UNSPEC = 0 // socket.h:163:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + MSG_BCAST = 0x100 // socket.h:508:1: + MSG_CMSG_CLOEXEC = 0x800 // socket.h:511:1: + MSG_CTRUNC = 0x20 // socket.h:505:1: + MSG_DONTROUTE = 0x4 // socket.h:502:1: + MSG_DONTWAIT = 0x80 // socket.h:507:1: + MSG_EOR = 0x8 // socket.h:503:1: + MSG_MCAST = 0x200 // socket.h:509:1: + MSG_NOSIGNAL = 0x400 // socket.h:510:1: + MSG_OOB = 0x1 // socket.h:500:1: + MSG_PEEK = 0x2 // socket.h:501:1: + MSG_TRUNC = 0x10 // socket.h:504:1: + MSG_WAITALL = 0x40 // socket.h:506:1: + MSG_WAITFORONE = 0x1000 // socket.h:512:1: + NET_BPF_BUFSIZE = 1 // socket.h:452:1: + NET_BPF_MAXBUFSIZE = 2 // socket.h:453:1: + NET_BPF_MAXID = 3 // socket.h:454:1: + NET_KEY_MAXID = 3 // socket.h:441:1: + NET_KEY_SADB_DUMP = 1 // socket.h:439:1: + NET_KEY_SPD_DUMP = 2 // socket.h:440:1: + NET_LINK_IFRXQ = 1 // socket.h:416:1: + NET_LINK_IFRXQ_MAXID = 3 // socket.h:428:1: + NET_LINK_IFRXQ_PRESSURE_DROP = 2 // socket.h:426:1: + NET_LINK_IFRXQ_PRESSURE_RETURN = 1 // socket.h:424:1: + NET_LINK_MAXID = 2 // socket.h:417:1: + NET_MAXID = 36 // socket.h:314:1: + NET_PFLOW_MAXID = 2 // socket.h:466:1: + NET_PFLOW_STATS = 1 // socket.h:465:1: + NET_RT_DUMP = 1 // socket.h:365:1: + NET_RT_FLAGS = 2 // socket.h:366:1: + NET_RT_IFLIST = 3 // socket.h:367:1: + NET_RT_IFNAMES = 6 // socket.h:370:1: + NET_RT_MAXID = 8 // socket.h:372:1: + NET_RT_SOURCE = 7 // socket.h:371:1: + NET_RT_STATS = 4 // socket.h:368:1: + NET_RT_TABLE = 5 // socket.h:369:1: + NET_UNIX_DEFERRED = 7 // socket.h:389:1: + NET_UNIX_INFLIGHT = 6 // socket.h:388:1: + NET_UNIX_MAXID = 8 // socket.h:390:1: + NET_UNIX_PROTO_MAXID = 3 // socket.h:405:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + PF_APPLETALK = 16 // socket.h:267:1: + PF_BLUETOOTH = 32 // socket.h:283:1: + PF_BPF = 31 // socket.h:282:1: + PF_CCITT = 10 // socket.h:261:1: + PF_CHAOS = 5 // socket.h:255:1: + PF_CNT = 21 // socket.h:272:1: + PF_COIP = 20 // socket.h:271:1: + PF_DATAKIT = 9 // socket.h:260:1: + PF_DECnet = 12 // socket.h:263:1: + PF_DLI = 13 // socket.h:264:1: + PF_ECMA = 8 // socket.h:259:1: + PF_ENCAP = 28 // socket.h:279:1: + PF_HYLINK = 15 // socket.h:266:1: + PF_IMPLINK = 3 // socket.h:253:1: + PF_INET = 2 // socket.h:252:1: + PF_INET6 = 24 // socket.h:274:1: + PF_IPX = 23 // socket.h:273:1: + PF_ISDN = 26 // socket.h:277:1: + PF_ISO = 7 // socket.h:257:1: + PF_KEY = 30 // socket.h:281:1: + PF_LAT = 14 // socket.h:265:1: + PF_LINK = 18 // socket.h:269:1: + PF_LOCAL = 1 // socket.h:250:1: + PF_MAX = 36 // socket.h:287:1: + PF_MPLS = 33 // socket.h:284:1: + PF_NATM = 27 // socket.h:278:1: + PF_NS = 6 // socket.h:256:1: + PF_OSI = 7 // socket.h:258:1: + PF_PFLOW = 34 // socket.h:285:1: + PF_PIP = 25 // socket.h:276:1: + PF_PIPEX = 35 // socket.h:286:1: + PF_PUP = 4 // socket.h:254:1: + PF_ROUTE = 17 // socket.h:268:1: + PF_RTIP = 22 // socket.h:275:1: + PF_SIP = 29 // socket.h:280:1: + PF_SNA = 11 // socket.h:262:1: + PF_UNIX = 1 // socket.h:251:1: + PF_UNSPEC = 0 // socket.h:249:1: + PF_XTP = 19 // socket.h:270:1: + RT_TABLEID_BITS = 8 // socket.h:150:1: + RT_TABLEID_MASK = 0xff // socket.h:151:1: + RT_TABLEID_MAX = 255 // socket.h:149:1: + SCM_RIGHTS = 0x01 // socket.h:560:1: + SCM_TIMESTAMP = 0x04 // socket.h:561:1: + SHUT_RD = 0 // socket.h:292:1: + SHUT_RDWR = 2 // socket.h:294:1: + SHUT_WR = 1 // socket.h:293:1: + SOCK_CLOEXEC = 0x8000 // socket.h:76:1: + SOCK_DGRAM = 2 // socket.h:64:1: + SOCK_DNS = 0x1000 // socket.h:81:1: + SOCK_NONBLOCK = 0x4000 // socket.h:77:1: + SOCK_RAW = 3 // socket.h:65:1: + SOCK_RDM = 4 // socket.h:66:1: + SOCK_SEQPACKET = 5 // socket.h:67:1: + SOCK_STREAM = 1 // socket.h:63:1: + SOL_SOCKET = 0xffff // socket.h:158:1: + SOMAXCONN = 128 // socket.h:477:1: + SO_ACCEPTCONN = 0x0002 // socket.h:88:1: + SO_BINDANY = 0x1000 // socket.h:98:1: + SO_BROADCAST = 0x0020 // socket.h:92:1: + SO_DEBUG = 0x0001 // socket.h:87:1: + SO_DOMAIN = 0x1024 // socket.h:116:1: + SO_DONTROUTE = 0x0010 // socket.h:91:1: + SO_ERROR = 0x1007 // socket.h:110:1: + SO_KEEPALIVE = 0x0008 // socket.h:90:1: + SO_LINGER = 0x0080 // socket.h:94:1: + SO_NETPROC = 0x1020 // socket.h:112:1: + SO_OOBINLINE = 0x0100 // socket.h:95:1: + SO_PEERCRED = 0x1022 // socket.h:114:1: + SO_PROTOCOL = 0x1025 // socket.h:117:1: + SO_RCVBUF = 0x1002 // socket.h:105:1: + SO_RCVLOWAT = 0x1004 // socket.h:107:1: + SO_RCVTIMEO = 0x1006 // socket.h:109:1: + SO_REUSEADDR = 0x0004 // socket.h:89:1: + SO_REUSEPORT = 0x0200 // socket.h:96:1: + SO_RTABLE = 0x1021 // socket.h:113:1: + SO_SNDBUF = 0x1001 // socket.h:104:1: + SO_SNDLOWAT = 0x1003 // socket.h:106:1: + SO_SNDTIMEO = 0x1005 // socket.h:108:1: + SO_SPLICE = 0x1023 // socket.h:115:1: + SO_TIMESTAMP = 0x0800 // socket.h:97:1: + SO_TYPE = 0x1008 // socket.h:111:1: + SO_USELOOPBACK = 0x0040 // socket.h:93:1: + SO_ZEROIZE = 0x2000 // socket.h:99:1: + UIO_MAXIOV = 1024 // uio.h:84:1: + UNPCTL_RECVSPACE = 1 // socket.h:403:1: + UNPCTL_SENDSPACE = 2 // socket.h:404:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SA_FAMILY_T_DEFINED_ = 0 // socket.h:51:1: + X_SIZE_T_DEFINED_ = 0 // uio.h:42:1: + X_SOCKLEN_T_DEFINED_ = 0 // socket.h:46:1: + X_SSIZE_T_DEFINED_ = 0 // uio.h:47:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SOCKET_H_ = 0 // socket.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UIO_H_ = 0 // uio.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMEVAL_DECLARED = 0 // socket.h:130:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Pseudo_AF_HDRCMPLT = 31 // socket.h:197:1: + Pseudo_AF_PFLOW = 34 // socket.h:201:1: + Pseudo_AF_PIP = 25 // socket.h:190:1: + Pseudo_AF_PIPEX = 35 // socket.h:202:1: + Pseudo_AF_RTIP = 22 // socket.h:187:1: + Pseudo_AF_XTP = 19 // socket.h:184:1: + Unix = 1 // :340:1: +) + +const ( /* uio.h:57:1: */ + UIO_READ = 0 + UIO_WRITE = 1 +) + +// Segment flag values. +const ( /* uio.h:60:1: */ + UIO_USERSPACE = 0 // from user data space + UIO_SYSSPACE = 1 ) type Ptrdiff_t = int32 /* :3:26 */ @@ -285,9 +248,9 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// $OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $ +// $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ + // Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 // The Regents of the University of California. All rights reserved. // @@ -316,11 +279,43 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // @(#)socket.h 8.4 (Berkeley) 2/21/94 -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-3-Clause +// get the definitions for struct iovec, size_t, ssize_t, and +// $OpenBSD: uio.h,v 1.19 2018/08/20 16:00:22 mpi Exp $ +// $NetBSD: uio.h,v 1.12 1996/02/09 18:25:45 christos Exp $ + +// Copyright (c) 1982, 1986, 1993, 1994 +// 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. +// 3. 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. // +// @(#)uio.h 8.5 (Berkeley) 2/22/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -351,63 +346,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -436,151 +407,80 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function attempts to acquire an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function releases a lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function asserts that an exclusive or shared lock is held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function requires that an exclusive or shared lock is or is not held. +// Default values. -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -605,17 +505,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -627,11 +521,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -647,369 +537,329 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -// - -// This file is in the public domain. -// $FreeBSD$ +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. -// 3. 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. -// -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ +type Ssize_t = X__ssize_t /* uio.h:48:19 */ -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* uio.h:51:1 */ -// max value for an unsigned long long +// Tell sys/endian.h we have MD variants of the swap macros. -// Minimum signal stack size. +// Note that these macros evaluate their arguments several times. -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ +// Public names -type X__int64_t = int64 /* _types.h:66:20 */ +// These are specified to be function-like macros to match the spec -type X__uint64_t = uint64 /* _types.h:68:28 */ +// POSIX names -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// original BSD names -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +// these were exposed here before -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +// ancient stuff -type Iovec = struct { - Fiov_base uintptr - Fiov_len Size_t -} /* _iovec.h:45:1 */ +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -// - -// This file is in the public domain. -// $FreeBSD$ +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -// - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2001 David E. O'Brien -// Copyright (c) 1990 The Regents of the University of California. -// All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// William Jolitz. -// -// 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. -// 3. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. -// -// from: @(#)param.h 5.8 (Berkeley) 6/28/91 -// $FreeBSD$ +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -// Round p (pointer or byte index) up to a correctly-aligned value -// for all data types (int, long, ...). The result is unsigned int -// and must be cast to any desired pointer type. +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -// Definitions related to sockets: types, address families, options. +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ -// Data types. -type Gid_t = X__gid_t /* socket.h:52:18 */ +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ -type Off_t = X__off_t /* socket.h:57:18 */ +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ -type Pid_t = X__pid_t /* socket.h:62:18 */ +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -type Sa_family_t = X__sa_family_t /* socket.h:68:23 */ +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -type Socklen_t = X__socklen_t /* socket.h:73:21 */ +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ -type Ssize_t = X__ssize_t /* socket.h:78:19 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Uid_t = X__uid_t /* socket.h:84:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Uint32_t = X__uint32_t /* socket.h:90:20 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Uintptr_t = X__uintptr_t /* socket.h:95:21 */ +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Socklen_t = X__socklen_t /* socket.h:47:21 */ // length type for network syscalls + +type Sa_family_t = X__sa_family_t /* socket.h:52:23 */ // sockaddr address family type + +// Definitions related to sockets: types, address families, options. // Types -// Creation flags, OR'ed into socket() and socketpair() type argument. +// Socket creation flags // Option flags per-socket. // Additional options, not kept in so_options. -// Space reserved for new socket options added by third-party vendors. -// This range applies to all socket option levels. New socket options -// in FreeBSD should always use an option value less than SO_VENDOR. - // Structure used for manipulating linger option. type Linger = struct { Fl_onoff int32 Fl_linger int32 -} /* socket.h:199:1 */ +} /* socket.h:122:1 */ + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* socket.h:131:1 */ + +// Structure used for manipulating splice option. +type Splice = struct { + Fsp_fd int32 + Fsp_max Off_t + Fsp_idle struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* socket.h:140:1 */ -type Accept_filter_arg = struct { - Faf_name [16]int8 - Faf_arg [240]int8 -} /* socket.h:205:1 */ +// Maximum number of alternate routing tables // Level number for (get/set)sockopt() to apply to socket itself. // Address families. -// When allocating a new AF_ constant, please only allocate -// even numbered constants for FreeBSD until 134 as odd numbered AF_ -// constants 39-133 are now reserved for vendors. // Structure used by kernel to store most // addresses. type Sockaddr = struct { - Fsa_len uint8 + Fsa_len X__uint8_t Fsa_family Sa_family_t Fsa_data [14]int8 -} /* socket.h:329:1 */ - -// Structure used by kernel to pass protocol -// information in raw sockets. -type Sockproto = struct { - Fsp_family uint16 - Fsp_protocol uint16 -} /* socket.h:341:1 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 -// 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. -// 3. 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. -// -// @(#)socket.h 8.4 (Berkeley) 2/21/94 -// $FreeBSD$ - -// RFC 2553: protocol-independent placeholder for socket addresses - +} /* socket.h:209:1 */ + +// Sockaddr type which can hold any sockaddr type available +// in the system. +// +// Note: __ss_{len,family} is defined in RFC2553. During RFC2553 discussion +// the field name went back and forth between ss_len and __ss_len, +// and RFC2553 specifies it to be __ss_len. openbsd picked ss_len. +// For maximum portability, userland programmer would need to +// (1) make the code never touch ss_len portion (cast it into sockaddr and +// touch sa_len), or (2) add "-Dss_len=__ss_len" into CFLAGS to unify all +// occurrences (including header file) to __ss_len. type Sockaddr_storage = struct { - Fss_len uint8 - Fss_family Sa_family_t - F__ss_pad1 [6]int8 - F__ss_align X__int64_t - F__ss_pad2 [112]int8 -} /* _sockaddr_storage.h:48:1 */ + Fss_len X__uint8_t + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_pad2 X__uint64_t + F__ss_pad3 [240]uint8 +} /* socket.h:227:1 */ // Protocol families, same as address families for now. +// These are the valid values for the "how" field used by shutdown(2). + +// Read using getsockopt() with SOL_SOCKET, SO_PEERCRED +type Sockpeercred = struct { + Fuid Uid_t + Fgid Gid_t + Fpid Pid_t +} /* socket.h:300:1 */ + // Definitions for network related sysctl, CTL_NET. // // Second level is protocol family. // Third level is protocol number. // -// Further levels are defined by the individual families. +// Further levels are defined by the individual families below. // PF_ROUTE - Routing table // -// Three additional levels are defined: +// Four additional levels are defined: // Fourth: address family, 0 is wildcard // Fifth: type of info, defined below // Sixth: flag(s) to mask with for NET_RT_FLAGS +// Seventh: routing table to use (facultative, defaults to 0) +// NET_RT_TABLE has the table id as sixth element. + +// PF_UNIX - unix socket tunables + +// PF_LINK - link layer or device tunables -// Maximum queue length specifiable by listen. +// PF_KEY - Key Management + +// PF_BPF not really a family, but connected under CTL_NET + +// PF_PFLOW not really a family, but connected under CTL_NET + +// Maximum queue length specifiable by listen(2). // Message header for recvmsg and sendmsg calls. // Used value-result for recvmsg, value only for sendmsg. @@ -1017,130 +867,33 @@ type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t Fmsg_iov uintptr - Fmsg_iovlen int32 + Fmsg_iovlen uint32 Fmsg_control uintptr Fmsg_controllen Socklen_t Fmsg_flags int32 -} /* socket.h:433:1 */ - -// 0x00000200 unused -// 0x00000400 unused -// 0x00000800 unused -// 0x00001000 unused +} /* socket.h:483:1 */ -// Header for ancillary data objects in msg_control buffer. -// Used for additional information with/about a datagram -// not expressible by flags. The format is a sequence -// of message elements headed by cmsghdr structures. -type Cmsghdr = struct { - Fcmsg_len Socklen_t - Fcmsg_level int32 - Fcmsg_type int32 -} /* socket.h:482:1 */ - -// While we may have more groups than this, the cmsgcred struct must -// be able to fit in an mbuf and we have historically supported a -// maximum of 16 groups. - -// Credentials structure, used to verify the identity of a peer -// process that has sent us a message. This is allocated by the -// peer process but filled in by the kernel. This prevents the -// peer from lying about its identity. (Note that cmcred_groups[0] -// is the effective GID.) -type Cmsgcred = struct { - Fcmcred_pid Pid_t - Fcmcred_uid Uid_t - Fcmcred_euid Uid_t - Fcmcred_gid Gid_t - Fcmcred_ngroups int16 - F__ccgo_pad1 [2]byte - Fcmcred_groups [16]Gid_t -} /* socket.h:504:1 */ - -// Socket credentials (LOCAL_CREDS). -type Sockcred = struct { - Fsc_uid Uid_t - Fsc_euid Uid_t - Fsc_gid Gid_t - Fsc_egid Gid_t - Fsc_ngroups int32 - Fsc_groups [1]Gid_t -} /* socket.h:516:1 */ - -// Compute size of a sockcred structure with groups. - -// Socket credentials (LOCAL_CREDS_PERSISTENT). -type Sockcred2 = struct { - Fsc_version int32 - Fsc_pid Pid_t - Fsc_uid Uid_t - Fsc_euid Uid_t - Fsc_gid Gid_t - Fsc_egid Gid_t - Fsc_ngroups int32 - Fsc_groups [1]Gid_t -} /* socket.h:534:1 */ - -// given pointer to struct cmsghdr, return pointer to data - -// given pointer to struct cmsghdr, return pointer to next cmsghdr - -// RFC 2292 requires to check msg_controllen, in case that the kernel returns -// an empty list for some reasons. - -// RFC 2292 additions - -// "Socket"-level control message types: - -type Sock_timestamp_info = struct { - Fst_info_flags X__uint32_t - Fst_info_pad0 X__uint32_t - Fst_info_rsv [7]X__uint64_t -} /* socket.h:593:1 */ - -// 4.3 compat sockaddr, move to compat file later -type Osockaddr = struct { - Fsa_family uint16 - Fsa_data [14]int8 -} /* socket.h:608:1 */ - -// 4.3-compat message header (move to compat file later). -type Omsghdr = struct { - Fmsg_name uintptr - Fmsg_namelen int32 - Fmsg_iov uintptr - Fmsg_iovlen int32 - Fmsg_accrights uintptr - Fmsg_accrightslen int32 -} /* socket.h:616:1 */ - -// howto arguments for shutdown(2), specified by Posix.1g. - -// for SCTP -// we cheat and use the SHUT_XX defines for these - -// sendfile(2) header/trailer struct -type Sf_hdtr = struct { - Fheaders uintptr - Fhdr_cnt int32 - Ftrailers uintptr - Ftrl_cnt int32 -} /* socket.h:645:1 */ - -// Sendfile-specific flag(s) - -// Sendmmsg/recvmmsg specific structure(s) type Mmsghdr = struct { Fmsg_hdr struct { Fmsg_name uintptr Fmsg_namelen Socklen_t Fmsg_iov uintptr - Fmsg_iovlen int32 + Fmsg_iovlen uint32 Fmsg_control uintptr Fmsg_controllen Socklen_t Fmsg_flags int32 } - Fmsg_len Ssize_t -} /* socket.h:669:1 */ + Fmsg_len uint32 +} /* socket.h:493:1 */ + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len Socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:520:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go index cd779132d2..c5271729c6 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go @@ -52,18 +52,19 @@ const ( BIG_ENDIAN = 4321 // endian.h:45:1: BYTE_ORDER = 1234 // endian.h:47:1: LITTLE_ENDIAN = 1234 // endian.h:44:1: - MSG_BCAST = 0x100 // socket.h:501:1: - MSG_CMSG_CLOEXEC = 0x800 // socket.h:504:1: - MSG_CTRUNC = 0x20 // socket.h:498:1: - MSG_DONTROUTE = 0x4 // socket.h:495:1: - MSG_DONTWAIT = 0x80 // socket.h:500:1: - MSG_EOR = 0x8 // socket.h:496:1: - MSG_MCAST = 0x200 // socket.h:502:1: - MSG_NOSIGNAL = 0x400 // socket.h:503:1: - MSG_OOB = 0x1 // socket.h:493:1: - MSG_PEEK = 0x2 // socket.h:494:1: - MSG_TRUNC = 0x10 // socket.h:497:1: - MSG_WAITALL = 0x40 // socket.h:499:1: + MSG_BCAST = 0x100 // socket.h:508:1: + MSG_CMSG_CLOEXEC = 0x800 // socket.h:511:1: + MSG_CTRUNC = 0x20 // socket.h:505:1: + MSG_DONTROUTE = 0x4 // socket.h:502:1: + MSG_DONTWAIT = 0x80 // socket.h:507:1: + MSG_EOR = 0x8 // socket.h:503:1: + MSG_MCAST = 0x200 // socket.h:509:1: + MSG_NOSIGNAL = 0x400 // socket.h:510:1: + MSG_OOB = 0x1 // socket.h:500:1: + MSG_PEEK = 0x2 // socket.h:501:1: + MSG_TRUNC = 0x10 // socket.h:504:1: + MSG_WAITALL = 0x40 // socket.h:506:1: + MSG_WAITFORONE = 0x1000 // socket.h:512:1: NET_BPF_BUFSIZE = 1 // socket.h:452:1: NET_BPF_MAXBUFSIZE = 2 // socket.h:453:1: NET_BPF_MAXID = 3 // socket.h:454:1: @@ -133,8 +134,8 @@ const ( RT_TABLEID_BITS = 8 // socket.h:150:1: RT_TABLEID_MASK = 0xff // socket.h:151:1: RT_TABLEID_MAX = 255 // socket.h:149:1: - SCM_RIGHTS = 0x01 // socket.h:552:1: - SCM_TIMESTAMP = 0x04 // socket.h:553:1: + SCM_RIGHTS = 0x01 // socket.h:560:1: + SCM_TIMESTAMP = 0x04 // socket.h:561:1: SHUT_RD = 0 // socket.h:292:1: SHUT_RDWR = 2 // socket.h:294:1: SHUT_WR = 1 // socket.h:293:1: @@ -180,8 +181,8 @@ const ( UNPCTL_SENDSPACE = 2 // socket.h:404:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -193,9 +194,9 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: @@ -211,9 +212,9 @@ const ( X_SYS_UIO_H_ = 0 // uio.h:36:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMEVAL_DECLARED = 0 // socket.h:130:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -224,7 +225,7 @@ const ( Pseudo_AF_PIPEX = 35 // socket.h:202:1: Pseudo_AF_RTIP = 22 // socket.h:187:1: Pseudo_AF_XTP = 19 // socket.h:184:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) const ( /* uio.h:57:1: */ @@ -256,7 +257,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: socket.h,v 1.100 2021/05/17 17:54:31 claudio Exp $ +// $OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $ // $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ // Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -483,7 +484,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -643,18 +644,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Ssize_t = X__ssize_t /* uio.h:48:19 */ @@ -743,25 +743,24 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -886,6 +885,22 @@ type Msghdr = struct { Fmsg_flags int32 } /* socket.h:483:1 */ +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen uint32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte +} /* socket.h:493:1 */ + // Header for ancillary data objects in msg_control buffer. // Used for additional information with/about a datagram // not expressible by flags. The format is a sequence @@ -894,6 +909,6 @@ type Cmsghdr = struct { Fcmsg_len Socklen_t Fcmsg_level int32 Fcmsg_type int32 -} /* socket.h:512:1 */ +} /* socket.h:520:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go b/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go index cd779132d2..39dc282b06 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_amd64.go -pkgname socket', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_arm64.go -pkgname socket', DO NOT EDIT. package socket @@ -52,18 +52,19 @@ const ( BIG_ENDIAN = 4321 // endian.h:45:1: BYTE_ORDER = 1234 // endian.h:47:1: LITTLE_ENDIAN = 1234 // endian.h:44:1: - MSG_BCAST = 0x100 // socket.h:501:1: - MSG_CMSG_CLOEXEC = 0x800 // socket.h:504:1: - MSG_CTRUNC = 0x20 // socket.h:498:1: - MSG_DONTROUTE = 0x4 // socket.h:495:1: - MSG_DONTWAIT = 0x80 // socket.h:500:1: - MSG_EOR = 0x8 // socket.h:496:1: - MSG_MCAST = 0x200 // socket.h:502:1: - MSG_NOSIGNAL = 0x400 // socket.h:503:1: - MSG_OOB = 0x1 // socket.h:493:1: - MSG_PEEK = 0x2 // socket.h:494:1: - MSG_TRUNC = 0x10 // socket.h:497:1: - MSG_WAITALL = 0x40 // socket.h:499:1: + MSG_BCAST = 0x100 // socket.h:508:1: + MSG_CMSG_CLOEXEC = 0x800 // socket.h:511:1: + MSG_CTRUNC = 0x20 // socket.h:505:1: + MSG_DONTROUTE = 0x4 // socket.h:502:1: + MSG_DONTWAIT = 0x80 // socket.h:507:1: + MSG_EOR = 0x8 // socket.h:503:1: + MSG_MCAST = 0x200 // socket.h:509:1: + MSG_NOSIGNAL = 0x400 // socket.h:510:1: + MSG_OOB = 0x1 // socket.h:500:1: + MSG_PEEK = 0x2 // socket.h:501:1: + MSG_TRUNC = 0x10 // socket.h:504:1: + MSG_WAITALL = 0x40 // socket.h:506:1: + MSG_WAITFORONE = 0x1000 // socket.h:512:1: NET_BPF_BUFSIZE = 1 // socket.h:452:1: NET_BPF_MAXBUFSIZE = 2 // socket.h:453:1: NET_BPF_MAXID = 3 // socket.h:454:1: @@ -133,8 +134,8 @@ const ( RT_TABLEID_BITS = 8 // socket.h:150:1: RT_TABLEID_MASK = 0xff // socket.h:151:1: RT_TABLEID_MAX = 255 // socket.h:149:1: - SCM_RIGHTS = 0x01 // socket.h:552:1: - SCM_TIMESTAMP = 0x04 // socket.h:553:1: + SCM_RIGHTS = 0x01 // socket.h:560:1: + SCM_TIMESTAMP = 0x04 // socket.h:561:1: SHUT_RD = 0 // socket.h:292:1: SHUT_RDWR = 2 // socket.h:294:1: SHUT_WR = 1 // socket.h:293:1: @@ -179,9 +180,9 @@ const ( UNPCTL_RECVSPACE = 1 // socket.h:403:1: UNPCTL_SENDSPACE = 2 // socket.h:404:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -189,13 +190,13 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: @@ -203,7 +204,7 @@ const ( X_SIZE_T_DEFINED_ = 0 // uio.h:42:1: X_SOCKLEN_T_DEFINED_ = 0 // socket.h:46:1: X_SSIZE_T_DEFINED_ = 0 // uio.h:47:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_SOCKET_H_ = 0 // socket.h:36:1: @@ -211,9 +212,9 @@ const ( X_SYS_UIO_H_ = 0 // uio.h:36:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMEVAL_DECLARED = 0 // socket.h:130:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -224,7 +225,7 @@ const ( Pseudo_AF_PIPEX = 35 // socket.h:202:1: Pseudo_AF_RTIP = 22 // socket.h:187:1: Pseudo_AF_XTP = 19 // socket.h:184:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) const ( /* uio.h:57:1: */ @@ -256,7 +257,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: socket.h,v 1.100 2021/05/17 17:54:31 claudio Exp $ +// $OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $ // $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ // Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -356,10 +357,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -483,7 +481,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -515,8 +513,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -558,66 +555,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -643,18 +642,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Ssize_t = X__ssize_t /* uio.h:48:19 */ @@ -743,25 +741,24 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -886,6 +883,22 @@ type Msghdr = struct { Fmsg_flags int32 } /* socket.h:483:1 */ +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen uint32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte +} /* socket.h:493:1 */ + // Header for ancillary data objects in msg_control buffer. // Used for additional information with/about a datagram // not expressible by flags. The format is a sequence @@ -894,6 +907,6 @@ type Cmsghdr = struct { Fcmsg_len Socklen_t Fcmsg_level int32 Fcmsg_type int32 -} /* socket.h:512:1 */ +} /* socket.h:520:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go b/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go index 550e5b58c3..07cbcc3975 100644 --- a/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_darwin_amd64.go -pkgname stat', DO NOT EDIT. package stat diff --git a/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go b/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go index 4a3bca07ae..ef273da7bc 100644 --- a/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/stat/stat_freebsd_386.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_386.go -pkgname stat', DO NOT EDIT. package stat diff --git a/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go b/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go index 2988cae545..8382dd840e 100644 --- a/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_amd64.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_arm64.go -pkgname stat', DO NOT EDIT. package stat diff --git a/vendor/modernc.org/libc/sys/stat/capi_windows_386.go b/vendor/modernc.org/libc/sys/stat/capi_windows_386.go index 5656b390b9..925ee93db2 100644 --- a/vendor/modernc.org/libc/sys/stat/capi_windows_386.go +++ b/vendor/modernc.org/libc/sys/stat/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_windows_386.go -pkgname stat', DO NOT EDIT. package stat diff --git a/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go index 45c2ed9af2..68ca4f1273 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_darwin_amd64.go -pkgname stat', DO NOT EDIT. package stat @@ -15,102 +15,102 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSPERMS = 511 - ALLPERMS = 4095 - DEFFILEMODE = 438 - EF_IS_PURGEABLE = 0x00000008 - EF_IS_SPARSE = 0x00000010 - EF_IS_SYNC_ROOT = 0x00000004 - EF_MAY_SHARE_BLOCKS = 0x00000001 - EF_NO_XATTRS = 0x00000002 - SF_APPEND = 0x00040000 - SF_ARCHIVED = 0x00010000 - SF_DATALESS = 0x40000000 - SF_FIRMLINK = 0x00800000 - SF_IMMUTABLE = 0x00020000 - SF_NOUNLINK = 0x00100000 - SF_RESTRICTED = 0x00080000 - SF_SETTABLE = 0x3fff0000 - SF_SUPPORTED = 0x009f0000 - SF_SYNTHETIC = 0xc0000000 - S_BLKSIZE = 512 - S_IEXEC = 64 - S_IFBLK = 0060000 - S_IFCHR = 0020000 - S_IFDIR = 0040000 - S_IFIFO = 0010000 - S_IFLNK = 0120000 - S_IFMT = 0170000 - S_IFREG = 0100000 - S_IFSOCK = 0140000 - S_IFWHT = 0160000 - S_IREAD = 256 - S_IRGRP = 0000040 - S_IROTH = 0000004 - S_IRUSR = 0000400 - S_IRWXG = 0000070 - S_IRWXO = 0000007 - S_IRWXU = 0000700 - S_ISGID = 0002000 - S_ISTXT = 512 - S_ISUID = 0004000 - S_ISVTX = 0001000 - S_IWGRP = 0000020 - S_IWOTH = 0000002 - S_IWRITE = 128 - S_IWUSR = 0000200 - S_IXGRP = 0000010 - S_IXOTH = 0000001 - S_IXUSR = 0000100 - UF_APPEND = 0x00000004 - UF_COMPRESSED = 0x00000020 - UF_DATAVAULT = 0x00000080 - UF_HIDDEN = 0x00008000 - UF_IMMUTABLE = 0x00000002 - UF_NODUMP = 0x00000001 - UF_OPAQUE = 0x00000008 - UF_SETTABLE = 0x0000ffff - UF_TRACKED = 0x00000040 - UTIME_NOW = -1 - UTIME_OMIT = -2 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_FILESEC_T = 0 - X_FILE_OFFSET_BITS = 64 - X_GID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_SYS_STAT_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + ACCESSPERMS = 511 // stat.h:297:1: + ALLPERMS = 4095 // stat.h:299:1: + DEFFILEMODE = 438 // stat.h:301:1: + EF_IS_PURGEABLE = 0x00000008 // stat.h:370:1: + EF_IS_SPARSE = 0x00000010 // stat.h:371:1: + EF_IS_SYNC_ROOT = 0x00000004 // stat.h:369:1: + EF_MAY_SHARE_BLOCKS = 0x00000001 // stat.h:367:1: + EF_NO_XATTRS = 0x00000002 // stat.h:368:1: + SF_APPEND = 0x00040000 // stat.h:340:1: + SF_ARCHIVED = 0x00010000 // stat.h:338:1: + SF_DATALESS = 0x40000000 // stat.h:359:1: + SF_FIRMLINK = 0x00800000 // stat.h:351:1: + SF_IMMUTABLE = 0x00020000 // stat.h:339:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_RESTRICTED = 0x00080000 // stat.h:341:1: + SF_SETTABLE = 0x3fff0000 // stat.h:336:1: + SF_SUPPORTED = 0x009f0000 // stat.h:335:1: + SF_SYNTHETIC = 0xc0000000 // stat.h:337:1: + S_BLKSIZE = 512 // stat.h:303:1: + S_IEXEC = 64 // _s_ifmt.h:72:1: + S_IFBLK = 0060000 // _s_ifmt.h:39:1: + S_IFCHR = 0020000 // _s_ifmt.h:37:1: + S_IFDIR = 0040000 // _s_ifmt.h:38:1: + S_IFIFO = 0010000 // _s_ifmt.h:36:1: + S_IFLNK = 0120000 // _s_ifmt.h:41:1: + S_IFMT = 0170000 // _s_ifmt.h:35:1: + S_IFREG = 0100000 // _s_ifmt.h:40:1: + S_IFSOCK = 0140000 // _s_ifmt.h:42:1: + S_IFWHT = 0160000 // _s_ifmt.h:44:1: + S_IREAD = 256 // _s_ifmt.h:70:1: + S_IRGRP = 0000040 // _s_ifmt.h:55:1: + S_IROTH = 0000004 // _s_ifmt.h:60:1: + S_IRUSR = 0000400 // _s_ifmt.h:50:1: + S_IRWXG = 0000070 // _s_ifmt.h:54:1: + S_IRWXO = 0000007 // _s_ifmt.h:59:1: + S_IRWXU = 0000700 // _s_ifmt.h:49:1: + S_ISGID = 0002000 // _s_ifmt.h:65:1: + S_ISTXT = 512 // _s_ifmt.h:69:1: + S_ISUID = 0004000 // _s_ifmt.h:64:1: + S_ISVTX = 0001000 // _s_ifmt.h:66:1: + S_IWGRP = 0000020 // _s_ifmt.h:56:1: + S_IWOTH = 0000002 // _s_ifmt.h:61:1: + S_IWRITE = 128 // _s_ifmt.h:71:1: + S_IWUSR = 0000200 // _s_ifmt.h:51:1: + S_IXGRP = 0000010 // _s_ifmt.h:57:1: + S_IXOTH = 0000001 // _s_ifmt.h:62:1: + S_IXUSR = 0000100 // _s_ifmt.h:52:1: + UF_APPEND = 0x00000004 // stat.h:313:1: + UF_COMPRESSED = 0x00000020 // stat.h:320:1: + UF_DATAVAULT = 0x00000080 // stat.h:326:1: + UF_HIDDEN = 0x00008000 // stat.h:330:1: + UF_IMMUTABLE = 0x00000002 // stat.h:312:1: + UF_NODUMP = 0x00000001 // stat.h:311:1: + UF_OPAQUE = 0x00000008 // stat.h:314:1: + UF_SETTABLE = 0x0000ffff // stat.h:310:1: + UF_TRACKED = 0x00000040 // stat.h:324:1: + UTIME_NOW = -1 // stat.h:393:1: + UTIME_OMIT = -2 // stat.h:394:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_FILESEC_T = 0 // _filesec_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_SYS_STAT_H_ = 0 // stat.h:71:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go index 5468c82f4e..e343c8d995 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go @@ -1721,6 +1721,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go b/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go index e2fb029e2b..aa9c64fd74 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go +++ b/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go @@ -1696,6 +1696,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go b/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go index 29a36fad0b..c742e0a7f3 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go +++ b/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/stat/stat_freebsd_386.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_386.go -pkgname stat', DO NOT EDIT. package stat @@ -15,185 +15,121 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSPERMS = 511 // stat.h:298:1: - ALLPERMS = 4095 // stat.h:300:1: - BIG_ENDIAN = 4321 // _endian.h:70:1: - BYTE_ORDER = 1234 // _endian.h:72:1: - CLK_TCK = 128 // time.h:56:1: - CLOCKS_PER_SEC = 128 // time.h:60:1: - CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: - CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: - CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: - CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: - CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: - CLOCK_PROF = 2 // _clock_id.h:64:1: - CLOCK_REALTIME = 0 // _clock_id.h:60:1: - CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: - CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: - CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: - CLOCK_SECOND = 13 // _clock_id.h:80:1: - CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: - CLOCK_UPTIME = 5 // _clock_id.h:74:1: - CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: - CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: - CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: - CPUCLOCK_WHICH_PID = 0 // time.h:476:1: - CPUCLOCK_WHICH_TID = 1 // time.h:477:1: - DEFFILEMODE = 438 // stat.h:302:1: - DST_AUST = 2 // time.h:49:1: - DST_CAN = 6 // time.h:53:1: - DST_EET = 5 // time.h:52:1: - DST_MET = 4 // time.h:51:1: - DST_NONE = 0 // time.h:47:1: - DST_USA = 1 // time.h:48:1: - DST_WET = 3 // time.h:50:1: - FD_SETSIZE = 1024 // select.h:61:1: - ITIMER_PROF = 2 // time.h:457:1: - ITIMER_REAL = 0 // time.h:455:1: - ITIMER_VIRTUAL = 1 // time.h:456:1: - LITTLE_ENDIAN = 1234 // _endian.h:69:1: - PDP_ENDIAN = 3412 // _endian.h:71:1: - SBT_MAX = 0x7fffffffffffffff // time.h:135:1: - SF_APPEND = 0x00040000 // stat.h:341:1: - SF_ARCHIVED = 0x00010000 // stat.h:339:1: - SF_IMMUTABLE = 0x00020000 // stat.h:340:1: - SF_NOUNLINK = 0x00100000 // stat.h:342:1: - SF_SETTABLE = 0xffff0000 // stat.h:338:1: - SF_SNAPSHOT = 0x00200000 // stat.h:343:1: - S_BLKSIZE = 512 // stat.h:304:1: - S_IEXEC = 64 // stat.h:256:1: - S_IFBLK = 0060000 // stat.h:274:1: - S_IFCHR = 0020000 // stat.h:272:1: - S_IFDIR = 0040000 // stat.h:273:1: - S_IFIFO = 0010000 // stat.h:271:1: - S_IFLNK = 0120000 // stat.h:276:1: - S_IFMT = 0170000 // stat.h:270:1: - S_IFREG = 0100000 // stat.h:275:1: - S_IFSOCK = 0140000 // stat.h:277:1: - S_IFWHT = 0160000 // stat.h:281:1: - S_IREAD = 256 // stat.h:254:1: - S_IRGRP = 0000040 // stat.h:260:1: - S_IROTH = 0000004 // stat.h:265:1: - S_IRUSR = 0000400 // stat.h:249:1: - S_IRWXG = 0000070 // stat.h:259:1: - S_IRWXO = 0000007 // stat.h:264:1: - S_IRWXU = 0000700 // stat.h:248:1: - S_ISGID = 0002000 // stat.h:243:1: - S_ISTXT = 0001000 // stat.h:245:1: - S_ISUID = 0004000 // stat.h:242:1: - S_ISVTX = 0001000 // stat.h:278:1: - S_IWGRP = 0000020 // stat.h:261:1: - S_IWOTH = 0000002 // stat.h:266:1: - S_IWRITE = 128 // stat.h:255:1: - S_IWUSR = 0000200 // stat.h:250:1: - S_IXGRP = 0000010 // stat.h:262:1: - S_IXOTH = 0000001 // stat.h:267:1: - S_IXUSR = 0000100 // stat.h:251:1: - TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: - TIMER_RELTIME = 0x0 // _clock_id.h:98:1: - TIME_UTC = 1 // time.h:188:1: - UF_APPEND = 0x00000004 // stat.h:314:1: - UF_ARCHIVE = 0x00000800 // stat.h:330:1: - UF_HIDDEN = 0x00008000 // stat.h:333:1: - UF_IMMUTABLE = 0x00000002 // stat.h:313:1: - UF_NODUMP = 0x00000001 // stat.h:312:1: - UF_NOUNLINK = 0x00000010 // stat.h:316:1: - UF_OFFLINE = 0x00000200 // stat.h:328:1: - UF_OPAQUE = 0x00000008 // stat.h:315:1: - UF_READONLY = 0x00001000 // stat.h:331:1: - UF_REPARSE = 0x00000400 // stat.h:329:1: - UF_SETTABLE = 0x0000ffff // stat.h:311:1: - UF_SPARSE = 0x00000100 // stat.h:327:1: - UF_SYSTEM = 0x00000080 // stat.h:326:1: - UTIME_NOW = -1 // stat.h:358:1: - UTIME_OMIT = -2 // stat.h:359:1: - X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // _endian.h:47:1: - X_BLKCNT_T_DECLARED = 0 // stat.h:54:1: - X_BLKSIZE_T_DECLARED = 0 // stat.h:49:1: - X_BYTE_ORDER = 1234 // _endian.h:40:1: - X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: - X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: - X_CLOCKID_T_DECLARED = 0 // types.h:100:1: - X_CLOCK_T_DECLARED = 0 // types.h:95:1: - X_DEV_T_DECLARED = 0 // stat.h:59:1: - X_FFLAGS_T_DECLARED = 0 // stat.h:64:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: - X_FTRUNCATE_DECLARED = 0 // types.h:417:1: - X_GID_T_DECLARED = 0 // stat.h:69:1: - X_ID_T_DECLARED = 0 // types.h:141:1: - X_ILP32 = 1 // :1:1: - X_INO_T_DECLARED = 0 // stat.h:74:1: - X_INT16_T_DECLARED = 0 // _stdint.h:42:1: - X_INT32_T_DECLARED = 0 // _stdint.h:47:1: - X_INT64_T_DECLARED = 0 // _stdint.h:52:1: - X_INT8_T_DECLARED = 0 // _stdint.h:37:1: - X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: - X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: - X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: - X_IN_PORT_T_DECLARED = 0 // types.h:136:1: - X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: - X_LSEEK_DECLARED = 0 // types.h:421:1: - X_LWPID_T_DECLARED = 0 // types.h:156:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MKNOD_DECLARED = 0 // stat.h:393:1: - X_MMAP_DECLARED = 0 // types.h:425:1: - X_MODE_T_DECLARED = 0 // stat.h:79:1: - X_MQD_T_DECLARED = 0 // types.h:227:1: - X_NLINK_T_DECLARED = 0 // stat.h:84:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF64_T_DECLARED = 0 // types.h:181:1: - X_OFF_T_DECLARED = 0 // stat.h:89:1: - X_PDP_ENDIAN = 3412 // _endian.h:48:1: - X_PID_T_DECLARED = 0 // types.h:186:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // _endian.h:55:1: - X_QUAD_LOWWORD = 0 // _endian.h:56:1: - X_RLIM_T_DECLARED = 0 // types.h:193:1: - X_SELECT_DECLARED = 0 // select.h:103:1: - X_SIGSET_T_DECLARED = 0 // select.h:50:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // types.h:202:1: - X_SSIZE_T_DECLARED = 0 // types.h:207:1: - X_SUSECONDS_T_DECLARED = 0 // _timeval.h:38:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SELECT_H_ = 0 // select.h:35:1: - X_SYS_STAT_H_ = 0 // stat.h:41:1: - X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS_TIME_H_ = 0 // time.h:36:1: - X_SYS_TYPES_H_ = 0 // types.h:41:1: - X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // types.h:222:1: - X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - X_TRUNCATE_DECLARED = 0 // types.h:429:1: - X_UID_T_DECLARED = 0 // stat.h:94:1: - X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: - X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: - X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: - X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: - X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: - X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: - X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + ACCESSPERMS = 511 // stat.h:151:1: + ALLPERMS = 4095 // stat.h:153:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DEFFILEMODE = 438 // stat.h:155:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + FD_SETSIZE = 1024 // select.h:62:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NBBY = 8 // select.h:111:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SF_APPEND = 0x00040000 // stat.h:175:1: + SF_ARCHIVED = 0x00010000 // stat.h:173:1: + SF_IMMUTABLE = 0x00020000 // stat.h:174:1: + SF_SETTABLE = 0xffff0000 // stat.h:172:1: + S_BLKSIZE = 512 // stat.h:157:1: + S_IEXEC = 64 // stat.h:108:1: + S_IFBLK = 0060000 // stat.h:126:1: + S_IFCHR = 0020000 // stat.h:124:1: + S_IFDIR = 0040000 // stat.h:125:1: + S_IFIFO = 0010000 // stat.h:123:1: + S_IFLNK = 0120000 // stat.h:128:1: + S_IFMT = 0170000 // stat.h:122:1: + S_IFREG = 0100000 // stat.h:127:1: + S_IFSOCK = 0140000 // stat.h:129:1: + S_IREAD = 256 // stat.h:106:1: + S_IRGRP = 0000040 // stat.h:112:1: + S_IROTH = 0000004 // stat.h:117:1: + S_IRUSR = 0000400 // stat.h:101:1: + S_IRWXG = 0000070 // stat.h:111:1: + S_IRWXO = 0000007 // stat.h:116:1: + S_IRWXU = 0000700 // stat.h:100:1: + S_ISGID = 0002000 // stat.h:95:1: + S_ISTXT = 0001000 // stat.h:97:1: + S_ISUID = 0004000 // stat.h:94:1: + S_ISVTX = 0001000 // stat.h:130:1: + S_IWGRP = 0000020 // stat.h:113:1: + S_IWOTH = 0000002 // stat.h:118:1: + S_IWRITE = 128 // stat.h:107:1: + S_IWUSR = 0000200 // stat.h:102:1: + S_IXGRP = 0000010 // stat.h:114:1: + S_IXOTH = 0000001 // stat.h:119:1: + S_IXUSR = 0000100 // stat.h:103:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + UF_APPEND = 0x00000004 // stat.h:167:1: + UF_IMMUTABLE = 0x00000002 // stat.h:166:1: + UF_NODUMP = 0x00000001 // stat.h:165:1: + UF_OPAQUE = 0x00000008 // stat.h:168:1: + UF_SETTABLE = 0x0000ffff // stat.h:164:1: + UTIME_NOW = -2 // stat.h:188:1: + UTIME_OMIT = -1 // stat.h:189:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -205,9 +141,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ +// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1982, 1986, 1989, 1993 // The Regents of the University of California. All rights reserved. // (c) UNIX System Laboratories, Inc. @@ -240,237 +177,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)stat.h 8.12 (Berkeley) 6/16/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. - -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. - -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced - -// Macro to test if we're using a specific version of gcc or later. - -// The __CONCAT macro is used to concatenate parts of symbol names, e.g. -// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. - -// GNU C version 2.96 adds explicit branch prediction so that -// the CPU back-end can hint the processor and also so that -// code blocks can be reordered such that the predicted path -// sees a more linear flow, thus improving cache behavior, etc. -// -// The following two macros provide us with a way to utilize this -// compiler feature. Use __predict_true() if you expect the expression -// to evaluate to true, and __predict_false() if you expect the -// expression to evaluate to false. -// -// A few notes about usage: -// -// * Generally, __predict_false() error condition checks (unless -// you have some _strong_ reason to do otherwise, in which case -// document it), and/or __predict_true() `no-error' condition -// checks, assuming you want to optimize for the no-error case. -// -// * Other than that, if you don't know the likelihood of a test -// succeeding from empirical or other `hard' evidence, don't -// make predictions. -// -// * These are meant to be used in places that are run `a lot'. -// It is wasteful to make predictions in code that is run -// seldomly (e.g. at subsystem initialization time) as the -// basic block reordering that this affects can often generate -// larger code. - -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 -// -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. -// -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. - -// Type Safety Checking -// -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. - -// Lock annotations. -// -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. -// -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. - -// Function releases a lock. - -// Function asserts that an exclusive or shared lock is held. - -// Function requires that an exclusive or shared lock is or is not held. - -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. +// @(#)stat.h 8.9 (Berkeley) 8/17/94 -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // @@ -498,48 +209,14 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// @(#)time.h 8.2 (Berkeley) 7/10/94 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1992, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -564,19 +241,19 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)select.h 8.2 (Berkeley) 1/4/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 +// Copyright (c) 1982, 1986, 1991, 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 @@ -586,11 +263,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -606,20 +279,17 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -644,794 +314,139 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// max value for an unsigned long long +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Minimum signal stack size. +// Written by J.T. Conklin 01/17/95. +// Public domain. -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ +// Macro to test if we're using a specific version of gcc or later. -type X__uint64_t = uint64 /* _types.h:68:28 */ +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. // -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. - -type Time_t = X__time_t /* _timespec.h:42:18 */ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// A few notes about usage: // -// 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. +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. // -// $FreeBSD$ - -type Blksize_t = X__blksize_t /* stat.h:48:21 */ - -type Blkcnt_t = X__blkcnt_t /* stat.h:53:20 */ - -type Dev_t = X__dev_t /* stat.h:58:18 */ - -type Fflags_t = X__fflags_t /* stat.h:63:20 */ - -type Gid_t = X__gid_t /* stat.h:68:18 */ - -type Ino_t = X__ino_t /* stat.h:73:18 */ - -type Mode_t = X__mode_t /* stat.h:78:18 */ - -type Nlink_t = X__nlink_t /* stat.h:83:19 */ - -type Off_t = X__off_t /* stat.h:88:18 */ +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. -type Uid_t = X__uid_t /* stat.h:93:18 */ +// Delete pseudo-keywords wherever they are not available or needed. -// XXX We get miscellaneous namespace pollution with this. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// 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. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// $FreeBSD$ +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. // -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Suseconds_t = X__suseconds_t /* _timeval.h:37:23 */ - -// Structure returned by gettimeofday(2) system call, and used in other calls. -type Timeval = struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t -} /* _timeval.h:49:1 */ - -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ - -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ - -// Additional type definitions: -// -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ - -type U_char = uint8 /* types.h:52:23 */ -type U_short = uint16 /* types.h:53:24 */ -type U_int = uint32 /* types.h:54:22 */ -type U_long = uint32 /* types.h:55:23 */ -type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility -type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility - -// XXX POSIX sized integrals that should appear only in . -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011 David E. O'Brien -// Copyright (c) 2001 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Int8_t = X__int8_t /* _stdint.h:36:19 */ - -type Int16_t = X__int16_t /* _stdint.h:41:20 */ - -type Int32_t = X__int32_t /* _stdint.h:46:20 */ - -type Int64_t = X__int64_t /* _stdint.h:51:20 */ - -type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ - -type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ - -type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ - -type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ - -type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ -type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ -type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ -type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ - -type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) -type U_int16_t = X__uint16_t /* types.h:68:20 */ -type U_int32_t = X__uint32_t /* types.h:69:20 */ -type U_int64_t = X__uint64_t /* types.h:70:20 */ - -type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) -type Quad_t = X__int64_t /* types.h:73:19 */ -type Qaddr_t = uintptr /* types.h:74:16 */ - -type Caddr_t = uintptr /* types.h:76:14 */ // core address -type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const - -type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ -type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ -type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ - -type Clock_t = X__clock_t /* types.h:94:19 */ - -type Clockid_t = X__clockid_t /* types.h:99:21 */ - -type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value -type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address - -type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number - -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ - -type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address - -type In_port_t = X__uint16_t /* types.h:135:20 */ - -type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t - -type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) - -type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions - -type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) - -type Pid_t = X__pid_t /* types.h:185:18 */ // process id - -type Register_t = X__register_t /* types.h:189:22 */ - -type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit - -type Sbintime_t = X__int64_t /* types.h:196:19 */ - -type Segsz_t = X__segsz_t /* types.h:198:19 */ - -type Ssize_t = X__ssize_t /* types.h:206:19 */ - -type Timer_t = X__timer_t /* types.h:221:19 */ - -type Mqd_t = X__mqd_t /* types.h:226:17 */ - -type U_register_t = X__u_register_t /* types.h:230:24 */ - -type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) - -type Cap_ioctl_t = uint32 /* types.h:244:23 */ - -// Types suitable for exporting physical addresses, virtual addresses -// (pointers), and memory object sizes from the kernel independent of native -// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and -// size_t in structs which contain such types that are shared with userspace. -type Kpaddr_t = X__uint64_t /* types.h:260:20 */ -type Kvaddr_t = X__uint64_t /* types.h:261:20 */ -type Ksize_t = X__uint64_t /* types.h:262:20 */ -type Kssize_t = X__int64_t /* types.h:263:19 */ - -type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ -type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ -type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ -type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ -type Vm_size_t = X__vm_size_t /* types.h:269:21 */ - -type Rman_res_t = X__rman_res_t /* types.h:271:25 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 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. -// 3. 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 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. -// 3. 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// $FreeBSD$ +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// - -// SPDX-License-Identifier: BSD-3-Clause +// POSIX macros, these checks must follow the XOPEN ones above. // -// Copyright (c) 1982, 1986, 1993 -// The Regents of the University of California. All rights reserved. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -1441,29 +456,29 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // 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. 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. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-3-Clause +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -1494,14 +509,12 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -1511,62 +524,26 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // 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. 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. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ - -type X__fd_mask = uint32 /* select.h:44:23 */ -type Fd_mask = X__fd_mask /* select.h:46:19 */ - -type Sigset_t = X__sigset_t /* select.h:51:20 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. -type Fd_set = Fd_set1 /* select.h:75:3 */ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -1593,20 +570,13 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 1993 +// Copyright (c) 1990, 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 @@ -1632,36 +602,252 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -// These macros are shared between time.h and sys/time.h. +// Tell sys/endian.h we have MD variants of the swap macros. -// Note: The values shown below as a comment for the __POSIX_VISIBLE values are -// the ones FreeBSD traditionally used based on our reading of the POSIX -// standards. However, glibc uses 199309 for all of them, even those many were -// not defined there. To remain bug compatible with glibc means more software -// that relied on the glibc behavior will compile easily on FreeBSD. -// -// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl -// port until it can be updated properly. It incorrectly assumes that this was a -// standard value. It will be moved back to the __BSD_VISIBLE section once the -// issue is corrected. +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -// FreeBSD-specific clocks. +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -// Linux compatible names. +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 -} /* time.h:43:1 */ +} /* time.h:72:1 */ -type Bintime = struct { - Fsec Time_t - Ffrac Uint64_t -} /* time.h:56:1 */ +// Operations on timevals. -// Operations on timespecs +// Operations on timespecs. // Names of the interval timers, and structure // defining a timer setting. @@ -1675,22 +861,22 @@ type Itimerval = struct { Ftv_sec Time_t Ftv_usec Suseconds_t } -} /* time.h:459:1 */ +} /* time.h:148:1 */ -// Getkerninfo clock information structure +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) type Clockinfo = struct { Fhz int32 Ftick int32 - Fspare int32 Fstathz int32 Fprofhz int32 -} /* time.h:467:1 */ +} /* time.h:157:1 */ -// - -// SPDX-License-Identifier: BSD-3-Clause +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ + +// Copyright (c) 1989 The Regents of the University of California. +// All rights reserved. // -// Copyright (c) 1989, 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 @@ -1721,13 +907,11 @@ type Clockinfo = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 +// @(#)time.h 5.12 (Berkeley) 3/9/91 -// $FreeBSD$ +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -1758,77 +942,18 @@ type Clockinfo = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2003 Marcel Moolenaar -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 1993 +// Copyright (c) 1990, 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 @@ -1854,18 +979,13 @@ type Clockinfo = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 +// @(#)types.h 8.3 (Berkeley) 1/5/94 // Frequency of the clock ticks reported by times(). Deprecated - use // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) -// Frequency of the clock ticks reported by clock(). +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $ -// New in POSIX 1003.1b-1993. - -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // @@ -1892,10 +1012,24 @@ type Clockinfo = struct { // 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ type Tm = struct { Ftm_sec int32 @@ -1909,78 +1043,37 @@ type Tm = struct { Ftm_isdst int32 Ftm_gmtoff int32 Ftm_zone uintptr -} /* time.h:101:1 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. -// -// This software was developed by David Chisnall under sponsorship from -// the FreeBSD Foundation. -// -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Locale_t = uintptr /* _time.h:36:25 */ +} /* time.h:111:1 */ type Stat = struct { - Fst_dev Dev_t - Fst_ino Ino_t - Fst_nlink Nlink_t - Fst_mode Mode_t - Fst_padding0 X__int16_t - Fst_uid Uid_t - Fst_gid Gid_t - Fst_padding1 X__int32_t - Fst_rdev Dev_t - Fst_atim_ext X__int32_t - Fst_atim struct { + Fst_mode Mode_t + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_rdev Dev_t + Fst_atim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_mtim_ext X__int32_t - Fst_mtim struct { + Fst_mtim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_ctim_ext X__int32_t - Fst_ctim struct { + Fst_ctim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_btim_ext X__int32_t - Fst_birthtim struct { + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags U_int32_t + Fst_gen U_int32_t + F__st_birthtim struct { Ftv_sec Time_t Ftv_nsec int32 } - Fst_size Off_t - Fst_blocks Blkcnt_t - Fst_blksize Blksize_t - Fst_flags Fflags_t - Fst_gen X__uint64_t - Fst_spare [10]X__uint64_t -} /* stat.h:160:1 */ +} /* stat.h:45:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go index 6a328abbae..18ad3aa5d1 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go @@ -86,8 +86,8 @@ const ( UTIME_OMIT = -1 // stat.h:189:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -100,16 +100,16 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -120,16 +120,16 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -150,7 +150,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - @@ -188,7 +188,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)stat.h 8.9 (Berkeley) 8/17/94 -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -252,7 +252,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -549,7 +549,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -709,18 +709,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -802,27 +801,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -960,7 +958,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go b/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go index 6a328abbae..3eee0e2cce 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_amd64.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_arm64.go -pkgname stat', DO NOT EDIT. package stat @@ -85,9 +85,9 @@ const ( UTIME_NOW = -2 // stat.h:188:1: UTIME_OMIT = -1 // stat.h:189:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -96,21 +96,21 @@ const ( X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_SELECT_H_ = 0 // select.h:35:1: @@ -120,16 +120,16 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -150,7 +150,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - @@ -188,7 +188,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)stat.h 8.9 (Berkeley) 8/17/94 -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -252,7 +252,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -325,10 +325,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -549,7 +546,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -581,8 +578,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -624,66 +620,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -709,18 +707,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -802,27 +799,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -960,7 +956,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/sys/stat/stat_windows_386.go b/vendor/modernc.org/libc/sys/stat/stat_windows_386.go index c62921b4e4..b02e3b52ec 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_windows_386.go +++ b/vendor/modernc.org/libc/sys/stat/stat_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname stat', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/stat/stat_windows_386.go -pkgname stat', DO NOT EDIT. package stat @@ -15,157 +15,157 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - F_OK = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - R_OK = 4 - S_IEXEC = 64 - S_IFBLK = 12288 - S_IFCHR = 8192 - S_IFDIR = 16384 - S_IFIFO = 4096 - S_IFMT = 61440 - S_IFREG = 32768 - S_IREAD = 256 - S_IRGRP = 32 - S_IROTH = 4 - S_IRUSR = 256 - S_IRWXG = 56 - S_IRWXO = 7 - S_IRWXU = 448 - S_IWGRP = 16 - S_IWOTH = 2 - S_IWRITE = 128 - S_IWUSR = 128 - S_IXGRP = 8 - S_IXOTH = 1 - S_IXUSR = 64 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - W_OK = 2 - X_OK = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_A_ARCH = 0x20 - X_A_HIDDEN = 0x02 - X_A_NORMAL = 0x00 - X_A_RDONLY = 0x01 - X_A_SUBDIR = 0x10 - X_A_SYSTEM = 0x04 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_MEMORY_DEFINED = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_LSEEK = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FINDDATA_T_DEFINED = 0 - X_FSIZE_T_DEFINED = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STAT = 0 - X_INC_STRING = 0 - X_INC_STRING_S = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IO_H_ = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_NLSCMPERROR = 2147483647 - X_NLSCMP_DEFINED = 0 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_STAT_DEFINED = 0 - X_S_IEXEC = 0x0040 - X_S_IFBLK = 0x3000 - X_S_IFCHR = 0x2000 - X_S_IFDIR = 0x4000 - X_S_IFIFO = 0x1000 - X_S_IFMT = 0xF000 - X_S_IFREG = 0x8000 - X_S_IREAD = 0x0100 - X_S_IRUSR = 256 - X_S_IRWXU = 448 - X_S_IWRITE = 0x0080 - X_S_IWUSR = 128 - X_S_IXUSR = 64 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WConst_return = 0 - X_WFINDDATA_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WIO_DEFINED = 0 - X_WSTAT_DEFINED = 0 - X_WSTRING_DEFINED = 0 - X_WSTRING_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + F_OK = 0 // io.h:182:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + R_OK = 4 // io.h:185:1: + S_IEXEC = 64 // stat.h:141:1: + S_IFBLK = 12288 // stat.h:143:1: + S_IFCHR = 8192 // stat.h:137:1: + S_IFDIR = 16384 // stat.h:136:1: + S_IFIFO = 4096 // stat.h:142:1: + S_IFMT = 61440 // stat.h:135:1: + S_IFREG = 32768 // stat.h:138:1: + S_IREAD = 256 // stat.h:139:1: + S_IRGRP = 32 // stat.h:155:1: + S_IROTH = 4 // stat.h:160:1: + S_IRUSR = 256 // stat.h:152:1: + S_IRWXG = 56 // stat.h:158:1: + S_IRWXO = 7 // stat.h:163:1: + S_IRWXU = 448 // stat.h:149:1: + S_IWGRP = 16 // stat.h:156:1: + S_IWOTH = 2 // stat.h:161:1: + S_IWRITE = 128 // stat.h:140:1: + S_IWUSR = 128 // stat.h:151:1: + S_IXGRP = 8 // stat.h:157:1: + S_IXOTH = 1 // stat.h:162:1: + S_IXUSR = 64 // stat.h:150:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + W_OK = 2 // io.h:184:1: + X_OK = 1 // io.h:183:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_A_ARCH = 0x20 // io.h:156:1: + X_A_HIDDEN = 0x02 // io.h:153:1: + X_A_NORMAL = 0x00 // io.h:151:1: + X_A_RDONLY = 0x01 // io.h:152:1: + X_A_SUBDIR = 0x10 // io.h:155:1: + X_A_SYSTEM = 0x04 // io.h:154:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_MEMORY_DEFINED = 0 // string.h:44:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FINDDATA_T_DEFINED = 0 // io.h:89:1: + X_FSIZE_T_DEFINED = 0 // io.h:30:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STAT = 0 // stat.h:7:1: + X_INC_STRING = 0 // string.h:7:1: + X_INC_STRING_S = 0 // string_s.h:7:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IO_H_ = 0 // io.h:7:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NLSCMPERROR = 2147483647 // string.h:26:1: + X_NLSCMP_DEFINED = 0 // string.h:25:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_STAT_DEFINED = 0 // _mingw_stat64.h:101:1: + X_S_IEXEC = 0x0040 // stat.h:67:1: + X_S_IFBLK = 0x3000 // stat.h:133:1: + X_S_IFCHR = 0x2000 // stat.h:62:1: + X_S_IFDIR = 0x4000 // stat.h:61:1: + X_S_IFIFO = 0x1000 // stat.h:63:1: + X_S_IFMT = 0xF000 // stat.h:60:1: + X_S_IFREG = 0x8000 // stat.h:64:1: + X_S_IREAD = 0x0100 // stat.h:65:1: + X_S_IRUSR = 256 // stat.h:153:1: + X_S_IRWXU = 448 // stat.h:145:1: + X_S_IWRITE = 0x0080 // stat.h:66:1: + X_S_IWUSR = 128 // stat.h:147:1: + X_S_IXUSR = 64 // stat.h:146:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WConst_return = 0 // string.h:41:1: + X_WFINDDATA_T_DEFINED = 0 // io.h:148:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WIO_DEFINED = 0 // io.h:295:1: + X_WSTAT_DEFINED = 0 // stat.h:125:1: + X_WSTRING_DEFINED = 0 // string.h:129:1: + X_WSTRING_S_DEFINED = 0 // string_s.h:48:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -199,6 +199,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -219,6 +224,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -259,26 +270,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -304,29 +317,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_fsize_t = uint32 /* io.h:29:25 */ type X_finddata32_t = struct { @@ -460,7 +473,7 @@ type Itimerspec = struct { type X_sigset_t = uint32 /* types.h:106:23 */ -type X_stat = struct { +type X_stat32 = struct { Fst_dev X_dev_t Fst_ino X_ino_t Fst_mode uint16 @@ -473,7 +486,7 @@ type X_stat = struct { Fst_atime X__time32_t Fst_mtime X__time32_t Fst_ctime X__time32_t -} /* _mingw_stat64.h:28:3 */ +} /* _mingw_stat64.h:25:3 */ type Stat = struct { Fst_dev X_dev_t @@ -488,7 +501,7 @@ type Stat = struct { Fst_atime Time_t Fst_mtime Time_t Fst_ctime Time_t -} /* _mingw_stat64.h:43:3 */ +} /* _mingw_stat64.h:40:3 */ type X_stati64 = struct { Fst_dev X_dev_t @@ -505,7 +518,7 @@ type X_stati64 = struct { Fst_mtime X__time32_t Fst_ctime X__time32_t F__ccgo_pad3 [4]byte -} /* _mingw_stat64.h:58:3 */ +} /* _mingw_stat64.h:55:3 */ type X_stat64i32 = struct { Fst_dev X_dev_t @@ -520,7 +533,7 @@ type X_stat64i32 = struct { Fst_atime X__time64_t Fst_mtime X__time64_t Fst_ctime X__time64_t -} /* _mingw_stat64.h:72:3 */ +} /* _mingw_stat64.h:69:3 */ type X_stat64 = struct { Fst_dev X_dev_t @@ -536,6 +549,6 @@ type X_stat64 = struct { Fst_atime X__time64_t Fst_mtime X__time64_t Fst_ctime X__time64_t -} /* _mingw_stat64.h:86:3 */ +} /* _mingw_stat64.h:83:3 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go b/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go index b3e96e3d53..b8090d4d6d 100644 --- a/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_darwin_amd64.go -pkgname types', DO NOT EDIT. package types diff --git a/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go b/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go index f6f73fbe77..95864f112f 100644 --- a/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/types/types_freebsd_386.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_openbsd_386.go -pkgname types', DO NOT EDIT. package types diff --git a/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go b/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go index cb6b3f12c0..286023eb23 100644 --- a/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/types/types_openbsd_amd64.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_openbsd_arm64.go -pkgname types', DO NOT EDIT. package types diff --git a/vendor/modernc.org/libc/sys/types/capi_windows_386.go b/vendor/modernc.org/libc/sys/types/capi_windows_386.go index 9b50442d78..0fb3e383f5 100644 --- a/vendor/modernc.org/libc/sys/types/capi_windows_386.go +++ b/vendor/modernc.org/libc/sys/types/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_windows_386.go -pkgname types', DO NOT EDIT. package types diff --git a/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go b/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go index c1949396d8..705a04d4ac 100644 --- a/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_darwin_amd64.go -pkgname types', DO NOT EDIT. package types @@ -15,86 +15,86 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - FD_SETSIZE = 1024 - LITTLE_ENDIAN = 1234 - NBBY = 8 - PDP_ENDIAN = 3412 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_SUSECONDS_T = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + NBBY = 8 // types.h:186:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/sys/types/types_openbsd_386.go b/vendor/modernc.org/libc/sys/types/types_openbsd_386.go index cd4e9c10ce..2e1e92caaa 100644 --- a/vendor/modernc.org/libc/sys/types/types_openbsd_386.go +++ b/vendor/modernc.org/libc/sys/types/types_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/types/types_freebsd_386.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_openbsd_386.go -pkgname types', DO NOT EDIT. package types @@ -15,90 +15,46 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // _endian.h:70:1: - BYTE_ORDER = 1234 // _endian.h:72:1: - FD_SETSIZE = 1024 // select.h:61:1: - LITTLE_ENDIAN = 1234 // _endian.h:69:1: - PDP_ENDIAN = 3412 // _endian.h:71:1: - X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // _endian.h:47:1: - X_BLKCNT_T_DECLARED = 0 // types.h:90:1: - X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // _endian.h:40:1: - X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: - X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: - X_CLOCKID_T_DECLARED = 0 // types.h:100:1: - X_CLOCK_T_DECLARED = 0 // types.h:95:1: - X_DEV_T_DECLARED = 0 // types.h:108:1: - X_FFLAGS_T_DECLARED = 0 // types.h:113:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: - X_FTRUNCATE_DECLARED = 0 // types.h:417:1: - X_GID_T_DECLARED = 0 // types.h:126:1: - X_ID_T_DECLARED = 0 // types.h:141:1: - X_ILP32 = 1 // :1:1: - X_INO_T_DECLARED = 0 // types.h:146:1: - X_INT16_T_DECLARED = 0 // _stdint.h:42:1: - X_INT32_T_DECLARED = 0 // _stdint.h:47:1: - X_INT64_T_DECLARED = 0 // _stdint.h:52:1: - X_INT8_T_DECLARED = 0 // _stdint.h:37:1: - X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: - X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: - X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: - X_IN_PORT_T_DECLARED = 0 // types.h:136:1: - X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LSEEK_DECLARED = 0 // types.h:421:1: - X_LWPID_T_DECLARED = 0 // types.h:156:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MMAP_DECLARED = 0 // types.h:425:1: - X_MODE_T_DECLARED = 0 // types.h:161:1: - X_MQD_T_DECLARED = 0 // types.h:227:1: - X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF64_T_DECLARED = 0 // types.h:181:1: - X_OFF_T_DECLARED = 0 // types.h:176:1: - X_PDP_ENDIAN = 3412 // _endian.h:48:1: - X_PID_T_DECLARED = 0 // types.h:186:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // _endian.h:55:1: - X_QUAD_LOWWORD = 0 // _endian.h:56:1: - X_RLIM_T_DECLARED = 0 // types.h:193:1: - X_SELECT_DECLARED = 0 // select.h:103:1: - X_SIGSET_T_DECLARED = 0 // select.h:50:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // types.h:202:1: - X_SSIZE_T_DECLARED = 0 // types.h:207:1: - X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SELECT_H_ = 0 // select.h:35:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS_TYPES_H_ = 0 // types.h:41:1: - X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // types.h:222:1: - X_TIME_T_DECLARED = 0 // types.h:217:1: - X_TRUNCATE_DECLARED = 0 // types.h:429:1: - X_UID_T_DECLARED = 0 // types.h:234:1: - X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: - X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: - X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: - X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: - X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: - X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: - X_USECONDS_T_DECLARED = 0 // types.h:239:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -110,10 +66,11 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// Copyright (c) 1982, 1986, 1991, 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 @@ -145,12 +102,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)types.h 8.6 (Berkeley) 2/19/95 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -181,63 +137,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -266,123 +198,78 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// Machine type dependent parameters. -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1987, 1991 Regents of the University of California. -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -392,57 +279,29 @@ type X__float128 = float64 /* :47:21 */ // 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. 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. // -// @(#)endian.h 7.8 (Berkeley) 4/3/91 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // -// $FreeBSD$ +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -473,19 +332,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -495,38 +347,26 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// This file is in the public domain. -// $FreeBSD$ +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -553,195 +393,13 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - -type X__uint64_t = uint64 /* _types.h:68:28 */ - -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ - -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ - -// Additional type definitions: -// -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ - -type U_char = uint8 /* types.h:52:23 */ -type U_short = uint16 /* types.h:53:24 */ -type U_int = uint32 /* types.h:54:22 */ -type U_long = uint32 /* types.h:55:23 */ -type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility -type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility - -// XXX POSIX sized integrals that should appear only in . // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011 David E. O'Brien -// Copyright (c) 2001 Mike Barcroft -// All rights reserved. +// Copyright (c) 1990, 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 @@ -751,11 +409,14 @@ type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -764,644 +425,217 @@ type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ - -type Int8_t = X__int8_t /* _stdint.h:36:19 */ - -type Int16_t = X__int16_t /* _stdint.h:41:20 */ - -type Int32_t = X__int32_t /* _stdint.h:46:20 */ - -type Int64_t = X__int64_t /* _stdint.h:51:20 */ - -type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ - -type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ - -type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ - -type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ - -type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ -type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ -type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ -type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ - -type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) -type U_int16_t = X__uint16_t /* types.h:68:20 */ -type U_int32_t = X__uint32_t /* types.h:69:20 */ -type U_int64_t = X__uint64_t /* types.h:70:20 */ - -type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) -type Quad_t = X__int64_t /* types.h:73:19 */ -type Qaddr_t = uintptr /* types.h:74:16 */ - -type Caddr_t = uintptr /* types.h:76:14 */ // core address -type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const - -type Blksize_t = X__blksize_t /* types.h:80:21 */ - -type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ -type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ -type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ - -type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ - -type Clock_t = X__clock_t /* types.h:94:19 */ - -type Clockid_t = X__clockid_t /* types.h:99:21 */ - -type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value -type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address - -type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev - -type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags - -type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number - -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -type Gid_t = X__gid_t /* types.h:125:18 */ // group id +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address +// Tell sys/endian.h we have MD variants of the swap macros. -type In_port_t = X__uint16_t /* types.h:135:20 */ +// Note that these macros evaluate their arguments several times. -type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t +// Public names -type Ino_t = X__ino_t /* types.h:145:18 */ // inode number +// These are specified to be function-like macros to match the spec -type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) +// POSIX names -type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) +// original BSD names -type Mode_t = X__mode_t /* types.h:160:18 */ // permissions +// these were exposed here before -type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions +// ancient stuff -type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -type Off_t = X__off_t /* types.h:175:18 */ // file offset +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -type Pid_t = X__pid_t /* types.h:185:18 */ // process id +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type Register_t = X__register_t /* types.h:189:22 */ +type Int8_t = X__int8_t /* types.h:75:19 */ -type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit +type Uint8_t = X__uint8_t /* types.h:80:20 */ -type Sbintime_t = X__int64_t /* types.h:196:19 */ +type Int16_t = X__int16_t /* types.h:85:20 */ -type Segsz_t = X__segsz_t /* types.h:198:19 */ +type Uint16_t = X__uint16_t /* types.h:90:21 */ -type Ssize_t = X__ssize_t /* types.h:206:19 */ +type Int32_t = X__int32_t /* types.h:95:20 */ -type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) +type Uint32_t = X__uint32_t /* types.h:100:21 */ -type Time_t = X__time_t /* types.h:216:18 */ +type Int64_t = X__int64_t /* types.h:105:20 */ -type Timer_t = X__timer_t /* types.h:221:19 */ +type Uint64_t = X__uint64_t /* types.h:110:21 */ -type Mqd_t = X__mqd_t /* types.h:226:17 */ +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ -type U_register_t = X__u_register_t /* types.h:230:24 */ +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ -type Uid_t = X__uid_t /* types.h:233:18 */ // user id +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -type Cap_ioctl_t = uint32 /* types.h:244:23 */ +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ -// Types suitable for exporting physical addresses, virtual addresses -// (pointers), and memory object sizes from the kernel independent of native -// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and -// size_t in structs which contain such types that are shared with userspace. -type Kpaddr_t = X__uint64_t /* types.h:260:20 */ -type Kvaddr_t = X__uint64_t /* types.h:261:20 */ -type Ksize_t = X__uint64_t /* types.h:262:20 */ -type Kssize_t = X__int64_t /* types.h:263:19 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ -type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ -type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ -type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ -type Vm_size_t = X__vm_size_t /* types.h:269:21 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Rman_res_t = X__rman_res_t /* types.h:271:25 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 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. -// 3. 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. -// -// $FreeBSD$ +type Time_t = X__time_t /* types.h:183:18 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +type Timer_t = X__timer_t /* types.h:188:19 */ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +type Off_t = X__off_t /* types.h:193:18 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 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. -// 3. 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// Structure returned by gettimeofday(2) system call, and used in other calls. -type Timeval = struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t -} /* _timeval.h:49:1 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ - -type X__fd_mask = uint32 /* select.h:44:23 */ -type Fd_mask = X__fd_mask /* select.h:46:19 */ - -type Sigset_t = X__sigset_t /* select.h:51:20 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set = Fd_set1 /* select.h:75:3 */ +// Major, minor numbers, dev_t's. var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go b/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go index 09b37cb290..c7a4ff34f9 100644 --- a/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go @@ -21,8 +21,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -34,27 +34,27 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -75,7 +75,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -372,7 +372,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -532,18 +532,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -625,27 +624,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go b/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go index 09b37cb290..5a43fddad5 100644 --- a/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go +++ b/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o sys/types/types_openbsd_amd64.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_openbsd_arm64.go -pkgname types', DO NOT EDIT. package types @@ -20,9 +20,9 @@ const ( LITTLE_ENDIAN = 1234 // endian.h:44:1: PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -30,31 +30,31 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -75,7 +75,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -148,10 +148,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -372,7 +369,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -404,8 +401,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -447,66 +443,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -532,18 +530,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -625,27 +622,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/sys/types/types_windows_386.go b/vendor/modernc.org/libc/sys/types/types_windows_386.go index 37fddc7aaa..fd2bdee590 100644 --- a/vendor/modernc.org/libc/sys/types/types_windows_386.go +++ b/vendor/modernc.org/libc/sys/types/types_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname types', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o sys/types/types_windows_386.go -pkgname types', DO NOT EDIT. package types @@ -15,95 +15,95 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -137,6 +137,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -157,6 +162,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -197,26 +208,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -242,29 +255,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_ino_t = uint16 /* types.h:43:24 */ type Ino_t = uint16 /* types.h:45:24 */ diff --git a/vendor/modernc.org/libc/termios/capi_darwin_amd64.go b/vendor/modernc.org/libc/termios/capi_darwin_amd64.go index d69811899f..32f78c410b 100644 --- a/vendor/modernc.org/libc/termios/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/termios/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname termios', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o termios/termios_darwin_amd64.go -pkgname termios', DO NOT EDIT. package termios diff --git a/vendor/modernc.org/libc/termios/capi_openbsd_386.go b/vendor/modernc.org/libc/termios/capi_openbsd_386.go index 711998d72d..c0305187fe 100644 --- a/vendor/modernc.org/libc/termios/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/termios/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o termios/termios_freebsd_386.go -pkgname termios', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o termios/termios_openbsd_386.go -pkgname termios', DO NOT EDIT. package termios diff --git a/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go b/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go index 07936e9b69..c81df665e0 100644 --- a/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o termios/termios_openbsd_amd64.go -pkgname termios', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o termios/termios_openbsd_arm64.go -pkgname termios', DO NOT EDIT. package termios diff --git a/vendor/modernc.org/libc/termios/termios_darwin_amd64.go b/vendor/modernc.org/libc/termios/termios_darwin_amd64.go index 9172c98d01..82928beba4 100644 --- a/vendor/modernc.org/libc/termios/termios_darwin_amd64.go +++ b/vendor/modernc.org/libc/termios/termios_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname termios', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o termios/termios_darwin_amd64.go -pkgname termios', DO NOT EDIT. package termios @@ -15,214 +15,214 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ALTWERASE = 0x00000200 - B0 = 0 - B110 = 110 - B115200 = 115200 - B1200 = 1200 - B134 = 134 - B14400 = 14400 - B150 = 150 - B1800 = 1800 - B19200 = 19200 - B200 = 200 - B230400 = 230400 - B2400 = 2400 - B28800 = 28800 - B300 = 300 - B38400 = 38400 - B4800 = 4800 - B50 = 50 - B57600 = 57600 - B600 = 600 - B7200 = 7200 - B75 = 75 - B76800 = 76800 - B9600 = 9600 - BRKINT = 0x00000002 - BS0 = 0x00000000 - BS1 = 0x00008000 - BSDLY = 0x00008000 - CBRK = 255 - CCAR_OFLOW = 0x00100000 - CCTS_OFLOW = 0x00010000 - CDISCARD = 15 - CDSR_OFLOW = 0x00080000 - CDSUSP = 25 - CDTR_IFLOW = 0x00040000 - CEOF = 4 - CEOL = 0xff - CEOT = 4 - CERASE = 0177 - CFLUSH = 15 - CIGNORE = 0x00000001 - CINTR = 3 - CKILL = 21 - CLNEXT = 22 - CLOCAL = 0x00008000 - CMIN = 1 - CQUIT = 034 - CR0 = 0x00000000 - CR1 = 0x00001000 - CR2 = 0x00002000 - CR3 = 0x00003000 - CRDLY = 0x00003000 - CREAD = 0x00000800 - CREPRINT = 18 - CRPRNT = 18 - CRTSCTS = 196608 - CRTS_IFLOW = 0x00020000 - CS5 = 0x00000000 - CS6 = 0x00000100 - CS7 = 0x00000200 - CS8 = 0x00000300 - CSIZE = 0x00000300 - CSTART = 17 - CSTATUS = 20 - CSTOP = 19 - CSTOPB = 0x00000400 - CSUSP = 26 - CTIME = 0 - CWERASE = 23 - ECHO = 0x00000008 - ECHOCTL = 0x00000040 - ECHOE = 0x00000002 - ECHOK = 0x00000004 - ECHOKE = 0x00000001 - ECHONL = 0x00000010 - ECHOPRT = 0x00000020 - EXTA = 19200 - EXTB = 38400 - EXTPROC = 0x00000800 - FF0 = 0x00000000 - FF1 = 0x00004000 - FFDLY = 0x00004000 - FLUSHO = 0x00800000 - HUPCL = 0x00004000 - ICANON = 0x00000100 - ICRNL = 0x00000100 - IEXTEN = 0x00000400 - IGNBRK = 0x00000001 - IGNCR = 0x00000080 - IGNPAR = 0x00000004 - IMAXBEL = 0x00002000 - INLCR = 0x00000040 - INPCK = 0x00000010 - IOCPARM_MASK = 0x1fff - IOCPARM_MAX = 8192 - ISIG = 0x00000080 - ISTRIP = 0x00000020 - IUTF8 = 0x00004000 - IXANY = 0x00000800 - IXOFF = 0x00000400 - IXON = 0x00000200 - MDMBUF = 0x00100000 - NCCS = 20 - NL0 = 0x00000000 - NL1 = 0x00000100 - NL2 = 0x00000200 - NL3 = 0x00000300 - NLDLY = 0x00000300 - NOFLSH = 0x80000000 - NOKERNINFO = 0x02000000 - OCRNL = 0x00000010 - OFDEL = 0x00020000 - OFILL = 0x00000080 - ONLCR = 0x00000002 - ONLRET = 0x00000040 - ONOCR = 0x00000020 - ONOEOT = 0x00000008 - OPOST = 0x00000001 - OXTABS = 0x00000004 - PARENB = 0x00001000 - PARMRK = 0x00000008 - PARODD = 0x00002000 - PENDIN = 0x20000000 - PPPDISC = 5 - SLIPDISC = 4 - TAB0 = 0x00000000 - TAB1 = 0x00000400 - TAB2 = 0x00000800 - TAB3 = 0x00000004 - TABDLY = 0x00000c04 - TABLDISC = 3 - TCIFLUSH = 1 - TCIOFF = 3 - TCIOFLUSH = 3 - TCION = 4 - TCOFLUSH = 2 - TCOOFF = 1 - TCOON = 2 - TCSADRAIN = 1 - TCSAFLUSH = 2 - TCSANOW = 0 - TCSASOFT = 0x10 - TIOCM_CAR = 0100 - TIOCM_CD = 64 - TIOCM_CTS = 0040 - TIOCM_DSR = 0400 - TIOCM_DTR = 0002 - TIOCM_LE = 0001 - TIOCM_RI = 128 - TIOCM_RNG = 0200 - TIOCM_RTS = 0004 - TIOCM_SR = 0020 - TIOCM_ST = 0010 - TIOCPKT_DATA = 0x00 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x01 - TIOCPKT_FLUSHWRITE = 0x02 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x08 - TIOCPKT_STOP = 0x04 - TOSTOP = 0x00400000 - TTYDEF_CFLAG = 19200 - TTYDEF_IFLAG = 11010 - TTYDEF_LFLAG = 1483 - TTYDEF_OFLAG = 3 - TTYDEF_SPEED = 9600 - TTYDISC = 0 - VDISCARD = 15 - VDSUSP = 11 - VEOF = 0 - VEOL = 1 - VEOL2 = 2 - VERASE = 3 - VINTR = 8 - VKILL = 5 - VLNEXT = 14 - VMIN = 16 - VQUIT = 9 - VREPRINT = 6 - VSTART = 12 - VSTATUS = 18 - VSTOP = 13 - VSUSP = 10 - VT0 = 0x00000000 - VT1 = 0x00010000 - VTDLY = 0x00010000 - VTIME = 17 - VWERASE = 4 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PID_T = 0 - X_SYS_IOCCOM_H_ = 0 - X_SYS_TERMIOS_H_ = 0 - X_SYS_TTYCOM_H_ = 0 - X_SYS_TTYDEFAULTS_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 + ALTWERASE = 0x00000200 // termios.h:249:1: + B0 = 0 // termios.h:291:1: + B110 = 110 // termios.h:294:1: + B115200 = 115200 // termios.h:313:1: + B1200 = 1200 // termios.h:300:1: + B134 = 134 // termios.h:295:1: + B14400 = 14400 // termios.h:309:1: + B150 = 150 // termios.h:296:1: + B1800 = 1800 // termios.h:301:1: + B19200 = 19200 // termios.h:305:1: + B200 = 200 // termios.h:297:1: + B230400 = 230400 // termios.h:314:1: + B2400 = 2400 // termios.h:302:1: + B28800 = 28800 // termios.h:310:1: + B300 = 300 // termios.h:298:1: + B38400 = 38400 // termios.h:306:1: + B4800 = 4800 // termios.h:303:1: + B50 = 50 // termios.h:292:1: + B57600 = 57600 // termios.h:311:1: + B600 = 600 // termios.h:299:1: + B7200 = 7200 // termios.h:308:1: + B75 = 75 // termios.h:293:1: + B76800 = 76800 // termios.h:312:1: + B9600 = 9600 // termios.h:304:1: + BRKINT = 0x00000002 // termios.h:120:1: + BS0 = 0x00000000 // termios.h:190:1: + BS1 = 0x00008000 // termios.h:191:1: + BSDLY = 0x00008000 // termios.h:159:1: + CBRK = 255 // ttydefaults.h:107:1: + CCAR_OFLOW = 0x00100000 // termios.h:222:1: + CCTS_OFLOW = 0x00010000 // termios.h:217:1: + CDISCARD = 15 // ttydefaults.h:102:1: + CDSR_OFLOW = 0x00080000 // termios.h:221:1: + CDSUSP = 25 // ttydefaults.h:98:1: + CDTR_IFLOW = 0x00040000 // termios.h:220:1: + CEOF = 4 // ttydefaults.h:88:1: + CEOL = 0xff // ttydefaults.h:89:1: + CEOT = 4 // ttydefaults.h:105:1: + CERASE = 0177 // ttydefaults.h:90:1: + CFLUSH = 15 // ttydefaults.h:109:1: + CIGNORE = 0x00000001 // termios.h:203:1: + CINTR = 3 // ttydefaults.h:91:1: + CKILL = 21 // ttydefaults.h:93:1: + CLNEXT = 22 // ttydefaults.h:101:1: + CLOCAL = 0x00008000 // termios.h:215:1: + CMIN = 1 // ttydefaults.h:94:1: + CQUIT = 034 // ttydefaults.h:95:1: + CR0 = 0x00000000 // termios.h:184:1: + CR1 = 0x00001000 // termios.h:185:1: + CR2 = 0x00002000 // termios.h:186:1: + CR3 = 0x00003000 // termios.h:187:1: + CRDLY = 0x00003000 // termios.h:157:1: + CREAD = 0x00000800 // termios.h:211:1: + CREPRINT = 18 // ttydefaults.h:104:1: + CRPRNT = 18 // ttydefaults.h:108:1: + CRTSCTS = 196608 // termios.h:218:1: + CRTS_IFLOW = 0x00020000 // termios.h:219:1: + CS5 = 0x00000000 // termios.h:206:1: + CS6 = 0x00000100 // termios.h:207:1: + CS7 = 0x00000200 // termios.h:208:1: + CS8 = 0x00000300 // termios.h:209:1: + CSIZE = 0x00000300 // termios.h:205:1: + CSTART = 17 // ttydefaults.h:99:1: + CSTATUS = 20 // ttydefaults.h:92:1: + CSTOP = 19 // ttydefaults.h:100:1: + CSTOPB = 0x00000400 // termios.h:210:1: + CSUSP = 26 // ttydefaults.h:96:1: + CTIME = 0 // ttydefaults.h:97:1: + CWERASE = 23 // ttydefaults.h:103:1: + ECHO = 0x00000008 // termios.h:240:1: + ECHOCTL = 0x00000040 // termios.h:244:1: + ECHOE = 0x00000002 // termios.h:238:1: + ECHOK = 0x00000004 // termios.h:239:1: + ECHOKE = 0x00000001 // termios.h:236:1: + ECHONL = 0x00000010 // termios.h:241:1: + ECHOPRT = 0x00000020 // termios.h:243:1: + EXTA = 19200 // termios.h:315:1: + EXTB = 38400 // termios.h:316:1: + EXTPROC = 0x00000800 // termios.h:253:1: + FF0 = 0x00000000 // termios.h:188:1: + FF1 = 0x00004000 // termios.h:189:1: + FFDLY = 0x00004000 // termios.h:158:1: + FLUSHO = 0x00800000 // termios.h:257:1: + HUPCL = 0x00004000 // termios.h:214:1: + ICANON = 0x00000100 // termios.h:247:1: + ICRNL = 0x00000100 // termios.h:127:1: + IEXTEN = 0x00000400 // termios.h:251:1: + IGNBRK = 0x00000001 // termios.h:119:1: + IGNCR = 0x00000080 // termios.h:126:1: + IGNPAR = 0x00000004 // termios.h:121:1: + IMAXBEL = 0x00002000 // termios.h:132:1: + INLCR = 0x00000040 // termios.h:125:1: + INPCK = 0x00000010 // termios.h:123:1: + IOCPARM_MASK = 0x1fff // ioccom.h:74:1: + IOCPARM_MAX = 8192 // ioccom.h:79:1: + ISIG = 0x00000080 // termios.h:246:1: + ISTRIP = 0x00000020 // termios.h:124:1: + IUTF8 = 0x00004000 // termios.h:133:1: + IXANY = 0x00000800 // termios.h:130:1: + IXOFF = 0x00000400 // termios.h:129:1: + IXON = 0x00000200 // termios.h:128:1: + MDMBUF = 0x00100000 // termios.h:223:1: + NCCS = 20 // termios.h:108:1: + NL0 = 0x00000000 // termios.h:173:1: + NL1 = 0x00000100 // termios.h:174:1: + NL2 = 0x00000200 // termios.h:176:1: + NL3 = 0x00000300 // termios.h:177:1: + NLDLY = 0x00000300 // termios.h:155:1: + NOFLSH = 0x80000000 // termios.h:261:1: + NOKERNINFO = 0x02000000 // termios.h:258:1: + OCRNL = 0x00000010 // termios.h:151:1: + OFDEL = 0x00020000 // termios.h:161:1: + OFILL = 0x00000080 // termios.h:154:1: + ONLCR = 0x00000002 // termios.h:140:1: + ONLRET = 0x00000040 // termios.h:153:1: + ONOCR = 0x00000020 // termios.h:152:1: + ONOEOT = 0x00000008 // termios.h:143:1: + OPOST = 0x00000001 // termios.h:139:1: + OXTABS = 0x00000004 // termios.h:142:1: + PARENB = 0x00001000 // termios.h:212:1: + PARMRK = 0x00000008 // termios.h:122:1: + PARODD = 0x00002000 // termios.h:213:1: + PENDIN = 0x20000000 // termios.h:259:1: + PPPDISC = 5 // ttycom.h:171:1: + SLIPDISC = 4 // ttycom.h:170:1: + TAB0 = 0x00000000 // termios.h:179:1: + TAB1 = 0x00000400 // termios.h:180:1: + TAB2 = 0x00000800 // termios.h:181:1: + TAB3 = 0x00000004 // termios.h:183:1: + TABDLY = 0x00000c04 // termios.h:156:1: + TABLDISC = 3 // ttycom.h:169:1: + TCIFLUSH = 1 // termios.h:320:1: + TCIOFF = 3 // termios.h:325:1: + TCIOFLUSH = 3 // termios.h:322:1: + TCION = 4 // termios.h:326:1: + TCOFLUSH = 2 // termios.h:321:1: + TCOOFF = 1 // termios.h:323:1: + TCOON = 2 // termios.h:324:1: + TCSADRAIN = 1 // termios.h:282:1: + TCSAFLUSH = 2 // termios.h:283:1: + TCSANOW = 0 // termios.h:281:1: + TCSASOFT = 0x10 // termios.h:285:1: + TIOCM_CAR = 0100 // ttycom.h:97:1: + TIOCM_CD = 64 // ttycom.h:98:1: + TIOCM_CTS = 0040 // ttycom.h:96:1: + TIOCM_DSR = 0400 // ttycom.h:101:1: + TIOCM_DTR = 0002 // ttycom.h:92:1: + TIOCM_LE = 0001 // ttycom.h:91:1: + TIOCM_RI = 128 // ttycom.h:100:1: + TIOCM_RNG = 0200 // ttycom.h:99:1: + TIOCM_RTS = 0004 // ttycom.h:93:1: + TIOCM_SR = 0020 // ttycom.h:95:1: + TIOCM_ST = 0010 // ttycom.h:94:1: + TIOCPKT_DATA = 0x00 // ttycom.h:128:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:134:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:129:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:130:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:135:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:133:1: + TIOCPKT_START = 0x08 // ttycom.h:132:1: + TIOCPKT_STOP = 0x04 // ttycom.h:131:1: + TOSTOP = 0x00400000 // termios.h:255:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:81:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:78:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:80:1: + TTYDEF_OFLAG = 3 // ttydefaults.h:79:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:82:1: + TTYDISC = 0 // ttycom.h:168:1: + VDISCARD = 15 // termios.h:100:1: + VDSUSP = 11 // termios.h:94:1: + VEOF = 0 // termios.h:76:1: + VEOL = 1 // termios.h:77:1: + VEOL2 = 2 // termios.h:79:1: + VERASE = 3 // termios.h:81:1: + VINTR = 8 // termios.h:90:1: + VKILL = 5 // termios.h:85:1: + VLNEXT = 14 // termios.h:99:1: + VMIN = 16 // termios.h:102:1: + VQUIT = 9 // termios.h:91:1: + VREPRINT = 6 // termios.h:87:1: + VSTART = 12 // termios.h:96:1: + VSTATUS = 18 // termios.h:105:1: + VSTOP = 13 // termios.h:97:1: + VSUSP = 10 // termios.h:92:1: + VT0 = 0x00000000 // termios.h:192:1: + VT1 = 0x00010000 // termios.h:193:1: + VTDLY = 0x00010000 // termios.h:160:1: + VTIME = 17 // termios.h:103:1: + VWERASE = 4 // termios.h:83:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_LP64 = 1 // :1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:65:1: + X_SYS_TERMIOS_H_ = 0 // termios.h:65:1: + X_SYS_TTYCOM_H_ = 0 // ttycom.h:70:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:73:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/termios/termios_openbsd_386.go b/vendor/modernc.org/libc/termios/termios_openbsd_386.go index 963133a188..db235e65c2 100644 --- a/vendor/modernc.org/libc/termios/termios_openbsd_386.go +++ b/vendor/modernc.org/libc/termios/termios_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o termios/termios_freebsd_386.go -pkgname termios', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o termios/termios_openbsd_386.go -pkgname termios', DO NOT EDIT. package termios @@ -15,213 +15,190 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ALTWERASE = 0x00000200 // _termios.h:171:1: - B0 = 0 // _termios.h:186:1: - B1000000 = 1000000 // _termios.h:213:1: - B110 = 110 // _termios.h:189:1: - B115200 = 115200 // _termios.h:208:1: - B1200 = 1200 // _termios.h:195:1: - B134 = 134 // _termios.h:190:1: - B14400 = 14400 // _termios.h:204:1: - B150 = 150 // _termios.h:191:1: - B1500000 = 1500000 // _termios.h:214:1: - B1800 = 1800 // _termios.h:196:1: - B19200 = 19200 // _termios.h:200:1: - B200 = 200 // _termios.h:192:1: - B2000000 = 2000000 // _termios.h:215:1: - B230400 = 230400 // _termios.h:209:1: - B2400 = 2400 // _termios.h:197:1: - B2500000 = 2500000 // _termios.h:216:1: - B28800 = 28800 // _termios.h:205:1: - B300 = 300 // _termios.h:193:1: - B3000000 = 3000000 // _termios.h:217:1: - B3500000 = 3500000 // _termios.h:218:1: - B38400 = 38400 // _termios.h:201:1: - B4000000 = 4000000 // _termios.h:219:1: - B460800 = 460800 // _termios.h:210:1: - B4800 = 4800 // _termios.h:198:1: - B50 = 50 // _termios.h:187:1: - B500000 = 500000 // _termios.h:211:1: - B57600 = 57600 // _termios.h:206:1: - B600 = 600 // _termios.h:194:1: - B7200 = 7200 // _termios.h:203:1: - B75 = 75 // _termios.h:188:1: - B76800 = 76800 // _termios.h:207:1: - B921600 = 921600 // _termios.h:212:1: - B9600 = 9600 // _termios.h:199:1: - BRKINT = 0x00000002 // _termios.h:86:1: - CBRK = 255 // ttydefaults.h:89:1: - CCAR_OFLOW = 0x00100000 // _termios.h:145:1: - CCTS_OFLOW = 0x00010000 // _termios.h:140:1: - CDISCARD = 15 // ttydefaults.h:84:1: - CDSR_OFLOW = 0x00080000 // _termios.h:144:1: - CDSUSP = 25 // ttydefaults.h:80:1: - CDTR_IFLOW = 0x00040000 // _termios.h:143:1: - CEOF = 4 // ttydefaults.h:69:1: - CEOL = 0xff // ttydefaults.h:70:1: - CEOT = 4 // ttydefaults.h:87:1: - CERASE = 127 // ttydefaults.h:71:1: - CERASE2 = 8 // ttydefaults.h:72:1: - CFLUSH = 15 // ttydefaults.h:91:1: - CIGNORE = 0x00000001 // _termios.h:126:1: - CINTR = 3 // ttydefaults.h:73:1: - CKILL = 21 // ttydefaults.h:75:1: - CLNEXT = 22 // ttydefaults.h:83:1: - CLOCAL = 0x00008000 // _termios.h:138:1: - CMIN = 1 // ttydefaults.h:76:1: - CNO_RTSDTR = 0x00200000 // _termios.h:146:1: - CQUIT = 28 // ttydefaults.h:77:1: - CREAD = 0x00000800 // _termios.h:134:1: - CREPRINT = 18 // ttydefaults.h:86:1: - CRPRNT = 18 // ttydefaults.h:90:1: - CRTSCTS = 196608 // _termios.h:141:1: - CRTS_IFLOW = 0x00020000 // _termios.h:142:1: - CS5 = 0x00000000 // _termios.h:129:1: - CS6 = 0x00000100 // _termios.h:130:1: - CS7 = 0x00000200 // _termios.h:131:1: - CS8 = 0x00000300 // _termios.h:132:1: - CSIZE = 0x00000300 // _termios.h:128:1: - CSTART = 17 // ttydefaults.h:81:1: - CSTATUS = 20 // ttydefaults.h:74:1: - CSTOP = 19 // ttydefaults.h:82:1: - CSTOPB = 0x00000400 // _termios.h:133:1: - CSUSP = 26 // ttydefaults.h:78:1: - CTIME = 0 // ttydefaults.h:79:1: - CWERASE = 23 // ttydefaults.h:85:1: - ECHO = 0x00000008 // _termios.h:162:1: - ECHOCTL = 0x00000040 // _termios.h:166:1: - ECHOE = 0x00000002 // _termios.h:160:1: - ECHOK = 0x00000004 // _termios.h:161:1: - ECHOKE = 0x00000001 // _termios.h:158:1: - ECHONL = 0x00000010 // _termios.h:163:1: - ECHOPRT = 0x00000020 // _termios.h:165:1: - EXTA = 19200 // _termios.h:220:1: - EXTB = 38400 // _termios.h:221:1: - EXTPROC = 0x00000800 // _termios.h:174:1: - FLUSHO = 0x00800000 // _termios.h:177:1: - H4DISC = 7 // ttycom.h:135:1: - HUPCL = 0x00004000 // _termios.h:137:1: - ICANON = 0x00000100 // _termios.h:169:1: - ICRNL = 0x00000100 // _termios.h:93:1: - IEXTEN = 0x00000400 // _termios.h:173:1: - IGNBRK = 0x00000001 // _termios.h:85:1: - IGNCR = 0x00000080 // _termios.h:92:1: - IGNPAR = 0x00000004 // _termios.h:87:1: - IMAXBEL = 0x00002000 // _termios.h:100:1: - INLCR = 0x00000040 // _termios.h:91:1: - INPCK = 0x00000010 // _termios.h:89:1: - IOCPARM_MASK = 8191 // ioccom.h:49:1: - IOCPARM_MAX = 8192 // ioccom.h:54:1: - IOCPARM_SHIFT = 13 // ioccom.h:48:1: - IOC_DIRMASK = 3758096384 // ioccom.h:60:1: - IOC_IN = 0x80000000 // ioccom.h:58:1: - IOC_INOUT = 3221225472 // ioccom.h:59:1: - IOC_OUT = 0x40000000 // ioccom.h:57:1: - IOC_VOID = 0x20000000 // ioccom.h:56:1: - ISIG = 0x00000080 // _termios.h:168:1: - ISTRIP = 0x00000020 // _termios.h:90:1: - IXANY = 0x00000800 // _termios.h:97:1: - IXOFF = 0x00000400 // _termios.h:95:1: - IXON = 0x00000200 // _termios.h:94:1: - MDMBUF = 1048576 // termios.h:52:1: - NCCS = 20 // _termios.h:78:1: - NETGRAPHDISC = 6 // ttycom.h:134:1: - NOFLSH = 0x80000000 // _termios.h:181:1: - NOKERNINFO = 0x02000000 // _termios.h:178:1: - OCRNL = 0x00000010 // _termios.h:117:1: - ONLCR = 0x00000002 // _termios.h:108:1: - ONLRET = 0x00000040 // _termios.h:119:1: - ONOCR = 0x00000020 // _termios.h:118:1: - ONOEOT = 0x00000008 // _termios.h:114:1: - OPOST = 0x00000001 // _termios.h:106:1: - OXTABS = 4 // termios.h:51:1: - PARENB = 0x00001000 // _termios.h:135:1: - PARMRK = 0x00000008 // _termios.h:88:1: - PARODD = 0x00002000 // _termios.h:136:1: - PENDIN = 0x20000000 // _termios.h:179:1: - PPPDISC = 5 // ttycom.h:133:1: - SLIPDISC = 4 // ttycom.h:132:1: - TAB0 = 0x00000000 // _termios.h:112:1: - TAB3 = 0x00000004 // _termios.h:113:1: - TABDLY = 0x00000004 // _termios.h:111:1: - TCIFLUSH = 1 // termios.h:69:1: - TCIOFF = 3 // termios.h:74:1: - TCIOFLUSH = 3 // termios.h:71:1: - TCION = 4 // termios.h:75:1: - TCOFLUSH = 2 // termios.h:70:1: - TCOOFF = 1 // termios.h:72:1: - TCOON = 2 // termios.h:73:1: - TCSADRAIN = 1 // termios.h:63:1: - TCSAFLUSH = 2 // termios.h:64:1: - TCSANOW = 0 // termios.h:62:1: - TCSASOFT = 0x10 // termios.h:66:1: - TIOCM_CAR = 64 // ttycom.h:103:1: - TIOCM_CD = 64 // ttycom.h:102:1: - TIOCM_CTS = 0040 // ttycom.h:98:1: - TIOCM_DCD = 0100 // ttycom.h:99:1: - TIOCM_DSR = 0400 // ttycom.h:101:1: - TIOCM_DTR = 0002 // ttycom.h:94:1: - TIOCM_LE = 0001 // ttycom.h:93:1: - TIOCM_RI = 0200 // ttycom.h:100:1: - TIOCM_RNG = 128 // ttycom.h:104:1: - TIOCM_RTS = 0004 // ttycom.h:95:1: - TIOCM_SR = 0020 // ttycom.h:97:1: - TIOCM_ST = 0010 // ttycom.h:96:1: - TIOCPKT_DATA = 0x00 // ttycom.h:111:1: - TIOCPKT_DOSTOP = 0x20 // ttycom.h:117:1: - TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:112:1: - TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:113:1: - TIOCPKT_IOCTL = 0x40 // ttycom.h:118:1: - TIOCPKT_NOSTOP = 0x10 // ttycom.h:116:1: - TIOCPKT_START = 0x08 // ttycom.h:115:1: - TIOCPKT_STOP = 0x04 // ttycom.h:114:1: - TOSTOP = 0x00400000 // _termios.h:175:1: - TTYDEF_CFLAG = 19200 // ttydefaults.h:55:1: + ALTWERASE = 0x00000200 // termios.h:172:1: + B0 = 0 // termios.h:212:1: + B110 = 110 // termios.h:215:1: + B115200 = 115200 // termios.h:234:1: + B1200 = 1200 // termios.h:221:1: + B134 = 134 // termios.h:216:1: + B14400 = 14400 // termios.h:230:1: + B150 = 150 // termios.h:217:1: + B1800 = 1800 // termios.h:222:1: + B19200 = 19200 // termios.h:226:1: + B200 = 200 // termios.h:218:1: + B230400 = 230400 // termios.h:235:1: + B2400 = 2400 // termios.h:223:1: + B28800 = 28800 // termios.h:231:1: + B300 = 300 // termios.h:219:1: + B38400 = 38400 // termios.h:227:1: + B4800 = 4800 // termios.h:224:1: + B50 = 50 // termios.h:213:1: + B57600 = 57600 // termios.h:232:1: + B600 = 600 // termios.h:220:1: + B7200 = 7200 // termios.h:229:1: + B75 = 75 // termios.h:214:1: + B76800 = 76800 // termios.h:233:1: + B9600 = 9600 // termios.h:225:1: + BRKINT = 0x00000002 // termios.h:91:1: + CCTS_OFLOW = 65536 // termios.h:145:1: + CDISCARD = 15 // ttydefaults.h:73:1: + CDSUSP = 25 // ttydefaults.h:69:1: + CEOF = 4 // ttydefaults.h:59:1: + CEOT = 4 // ttydefaults.h:76:1: + CERASE = 0177 // ttydefaults.h:61:1: + CFLUSH = 15 // ttydefaults.h:80:1: + CHWFLOW = 1114112 // termios.h:147:1: + CIGNORE = 0x00000001 // termios.h:129:1: + CINTR = 3 // ttydefaults.h:62:1: + CKILL = 21 // ttydefaults.h:64:1: + CLNEXT = 22 // ttydefaults.h:72:1: + CLOCAL = 0x00008000 // termios.h:141:1: + CMIN = 1 // ttydefaults.h:65:1: + CQUIT = 034 // ttydefaults.h:66:1: + CREAD = 0x00000800 // termios.h:137:1: + CREPRINT = 18 // ttydefaults.h:75:1: + CRPRNT = 18 // ttydefaults.h:79:1: + CRTSCTS = 0x00010000 // termios.h:143:1: + CRTS_IFLOW = 65536 // termios.h:144:1: + CS5 = 0x00000000 // termios.h:132:1: + CS6 = 0x00000100 // termios.h:133:1: + CS7 = 0x00000200 // termios.h:134:1: + CS8 = 0x00000300 // termios.h:135:1: + CSIZE = 0x00000300 // termios.h:131:1: + CSTART = 17 // ttydefaults.h:70:1: + CSTOP = 19 // ttydefaults.h:71:1: + CSTOPB = 0x00000400 // termios.h:136:1: + CSUSP = 26 // ttydefaults.h:67:1: + CTIME = 0 // ttydefaults.h:68:1: + CWERASE = 23 // ttydefaults.h:74:1: + ECHO = 0x00000008 // termios.h:163:1: + ECHOCTL = 0x00000040 // termios.h:167:1: + ECHOE = 0x00000002 // termios.h:161:1: + ECHOK = 0x00000004 // termios.h:162:1: + ECHOKE = 0x00000001 // termios.h:159:1: + ECHONL = 0x00000010 // termios.h:164:1: + ECHOPRT = 0x00000020 // termios.h:166:1: + ENDRUNDISC = 9 // ttycom.h:149:1: + EXTA = 19200 // termios.h:236:1: + EXTB = 38400 // termios.h:237:1: + EXTPROC = 0x00000800 // termios.h:175:1: + FLUSHO = 0x00800000 // termios.h:178:1: + HUPCL = 0x00004000 // termios.h:140:1: + ICANON = 0x00000100 // termios.h:170:1: + ICRNL = 0x00000100 // termios.h:98:1: + IEXTEN = 0x00000400 // termios.h:174:1: + IGNBRK = 0x00000001 // termios.h:90:1: + IGNCR = 0x00000080 // termios.h:97:1: + IGNPAR = 0x00000004 // termios.h:92:1: + IMAXBEL = 0x00002000 // termios.h:104:1: + INLCR = 0x00000040 // termios.h:96:1: + INPCK = 0x00000010 // termios.h:94:1: + IOCPARM_MASK = 0x1fff // ioccom.h:43:1: + ISIG = 0x00000080 // termios.h:169:1: + ISTRIP = 0x00000020 // termios.h:95:1: + IUCLC = 0x00001000 // termios.h:103:1: + IXANY = 0x00000800 // termios.h:102:1: + IXOFF = 0x00000400 // termios.h:100:1: + IXON = 0x00000200 // termios.h:99:1: + MDMBUF = 0x00100000 // termios.h:146:1: + MSTSDISC = 8 // ttycom.h:148:1: + NCCS = 20 // termios.h:79:1: + NMEADISC = 7 // ttycom.h:147:1: + NOFLSH = 0x80000000 // termios.h:183:1: + NOKERNINFO = 0x02000000 // termios.h:180:1: + OCRNL = 0x00000010 // termios.h:119:1: + OLCUC = 0x00000020 // termios.h:120:1: + ONLCR = 0x00000002 // termios.h:112:1: + ONLRET = 0x00000080 // termios.h:122:1: + ONOCR = 0x00000040 // termios.h:121:1: + ONOEOT = 0x00000008 // termios.h:116:1: + OPOST = 0x00000001 // termios.h:110:1: + OXTABS = 0x00000004 // termios.h:115:1: + PARENB = 0x00001000 // termios.h:138:1: + PARMRK = 0x00000008 // termios.h:93:1: + PARODD = 0x00002000 // termios.h:139:1: + PENDIN = 0x20000000 // termios.h:181:1: + PPPDISC = 5 // ttycom.h:145:1: + SLIPDISC = 4 // ttycom.h:144:1: + STRIPDISC = 6 // ttycom.h:146:1: + TABLDISC = 3 // ttycom.h:143:1: + TCIFLUSH = 1 // termios.h:242:1: + TCIOFF = 3 // termios.h:247:1: + TCIOFLUSH = 3 // termios.h:244:1: + TCION = 4 // termios.h:248:1: + TCOFLUSH = 2 // termios.h:243:1: + TCOOFF = 1 // termios.h:245:1: + TCOON = 2 // termios.h:246:1: + TCSADRAIN = 1 // termios.h:203:1: + TCSAFLUSH = 2 // termios.h:204:1: + TCSANOW = 0 // termios.h:202:1: + TCSASOFT = 0x10 // termios.h:206:1: + TIOCFLAG_CLOCAL = 0x02 // ttycom.h:131:1: + TIOCFLAG_CRTSCTS = 0x04 // ttycom.h:132:1: + TIOCFLAG_MDMBUF = 0x08 // ttycom.h:133:1: + TIOCFLAG_PPS = 0x10 // ttycom.h:134:1: + TIOCFLAG_SOFTCAR = 0x01 // ttycom.h:130:1: + TIOCM_CAR = 0100 // ttycom.h:69:1: + TIOCM_CD = 64 // ttycom.h:70:1: + TIOCM_CTS = 0040 // ttycom.h:68:1: + TIOCM_DSR = 0400 // ttycom.h:73:1: + TIOCM_DTR = 0002 // ttycom.h:64:1: + TIOCM_LE = 0001 // ttycom.h:63:1: + TIOCM_RI = 128 // ttycom.h:72:1: + TIOCM_RNG = 0200 // ttycom.h:71:1: + TIOCM_RTS = 0004 // ttycom.h:65:1: + TIOCM_SR = 0020 // ttycom.h:67:1: + TIOCM_ST = 0010 // ttycom.h:66:1: + TIOCPKT_DATA = 0x00 // ttycom.h:100:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:106:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:101:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:102:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:107:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:105:1: + TIOCPKT_START = 0x08 // ttycom.h:104:1: + TIOCPKT_STOP = 0x04 // ttycom.h:103:1: + TOSTOP = 0x00400000 // termios.h:176:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:52:1: TTYDEF_IFLAG = 11010 // ttydefaults.h:49:1: - TTYDEF_LFLAG = 1483 // ttydefaults.h:54:1: - TTYDEF_LFLAG_ECHO = 1483 // ttydefaults.h:52:1: - TTYDEF_LFLAG_NOECHO = 1408 // ttydefaults.h:51:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:51:1: TTYDEF_OFLAG = 3 // ttydefaults.h:50:1: - TTYDEF_SPEED = 9600 // ttydefaults.h:56:1: - TTYDISC = 0 // ttycom.h:131:1: - VDISCARD = 15 // _termios.h:70:1: - VDSUSP = 11 // _termios.h:64:1: - VEOF = 0 // _termios.h:45:1: - VEOL = 1 // _termios.h:46:1: - VEOL2 = 2 // _termios.h:48:1: - VERASE = 3 // _termios.h:50:1: - VERASE2 = 7 // _termios.h:57:1: - VINTR = 8 // _termios.h:60:1: - VKILL = 5 // _termios.h:54:1: - VLNEXT = 14 // _termios.h:69:1: - VMIN = 16 // _termios.h:72:1: - VQUIT = 9 // _termios.h:61:1: - VREPRINT = 6 // _termios.h:56:1: - VSTART = 12 // _termios.h:66:1: - VSTATUS = 18 // _termios.h:75:1: - VSTOP = 13 // _termios.h:67:1: - VSUSP = 10 // _termios.h:62:1: - VTIME = 17 // _termios.h:73:1: - VWERASE = 4 // _termios.h:52:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:53:1: + TTYDISC = 0 // ttycom.h:142:1: + VDISCARD = 15 // termios.h:71:1: + VDSUSP = 11 // termios.h:65:1: + VEOF = 0 // termios.h:47:1: + VEOL = 1 // termios.h:48:1: + VEOL2 = 2 // termios.h:50:1: + VERASE = 3 // termios.h:52:1: + VINTR = 8 // termios.h:61:1: + VKILL = 5 // termios.h:56:1: + VLNEXT = 14 // termios.h:70:1: + VMIN = 16 // termios.h:73:1: + VQUIT = 9 // termios.h:62:1: + VREPRINT = 6 // termios.h:58:1: + VSTART = 12 // termios.h:67:1: + VSTATUS = 18 // termios.h:76:1: + VSTOP = 13 // termios.h:68:1: + VSUSP = 10 // termios.h:63:1: + VTIME = 17 // termios.h:74:1: + VWERASE = 4 // termios.h:54:1: + XCASE = 0x01000000 // termios.h:179:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PID_T_DECLARED = 0 // termios.h:47:1: - X_POSIX_VDISABLE = 0xff // _termios.h:80:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_PID_T_DEFINED_ = 0 // termios.h:254:1: + X_POSIX_VDISABLE = 255 // termios.h:81:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1: + X_SYS_TERMIOS_H_ = 0 // termios.h:36:1: X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: - X_SYS__TERMIOS_H_ = 0 // _termios.h:36:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_SYS__WINSIZE_H_ = 0 // _winsize.h:36:1: - X_TERMIOS_H_ = 0 // termios.h:36:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -233,9 +210,9 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// $OpenBSD: termios.h,v 1.13 2016/09/20 21:10:22 fcambus Exp $ +// $NetBSD: termios.h,v 1.14 1996/04/09 20:55:41 cgd Exp $ + // Copyright (c) 1988, 1989, 1993, 1994 // The Regents of the University of California. All rights reserved. // @@ -264,11 +241,10 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // @(#)termios.h 8.3 (Berkeley) 3/28/94 -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -299,63 +275,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Testing against Clang-specific extensions. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. - -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -384,152 +336,80 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. +// Delete pseudo-keywords wherever they are not available or needed. -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. - -// Function releases a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function asserts that an exclusive or shared lock is held. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function requires that an exclusive or shared lock is or is not held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function should not be analyzed. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1989, 1993, 1994 -// 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. -// 3. 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. -// -// @(#)termios.h 8.3 (Berkeley) 3/28/94 -// $FreeBSD$ +// Default values. // Special Control Characters // // Index into c_cc[] character array. // // Name Subscript Enabled by -// 7 ex-spare 1 +// 7 spare 1 // 19 spare 2 // Input flags - software input processing @@ -544,11 +424,9 @@ type X__float128 = float64 /* :47:21 */ // the letter "I" and look like they belong in the // input flag. -// Standard speeds - -type Tcflag_t = uint32 /* _termios.h:224:22 */ -type Cc_t = uint8 /* _termios.h:225:23 */ -type Speed_t = uint32 /* _termios.h:226:22 */ +type Tcflag_t = uint32 /* termios.h:185:22 */ +type Cc_t = uint8 /* termios.h:186:23 */ +type Speed_t = uint32 /* termios.h:187:22 */ type Termios = struct { Fc_iflag Tcflag_t @@ -556,83 +434,17 @@ type Termios = struct { Fc_cflag Tcflag_t Fc_lflag Tcflag_t Fc_cc [20]Cc_t - Fc_ispeed Speed_t - Fc_ospeed Speed_t -} /* _termios.h:228:1 */ + Fc_ispeed int32 + Fc_ospeed int32 +} /* termios.h:189:1 */ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// Commands passed to tcsetattr() for setting the termios structure. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// Standard speeds -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -644,11 +456,7 @@ type Termios = struct { // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -664,18 +472,12 @@ type Termios = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -702,160 +504,132 @@ type Termios = struct { // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ type X__uint64_t = uint64 /* _types.h:68:28 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint32 F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +} /* _types.h:75:3 */ -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +type Pid_t = X__pid_t /* termios.h:255:18 */ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +// Include tty ioctl's that aren't just for backwards compatibility +// with the old tty driver. These ioctl definitions were previously +// in . +// $OpenBSD: ttycom.h,v 1.17 2018/06/16 13:55:03 deraadt Exp $ +// $NetBSD: ttycom.h,v 1.4 1996/05/19 17:17:53 jonathan Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1989, 1993, 1994 +// Copyright (c) 1982, 1986, 1990, 1993, 1994 // 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 @@ -882,23 +656,12 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // SUCH DAMAGE. // // @(#)ttycom.h 8.1 (Berkeley) 3/28/94 -// $FreeBSD$ - -// Window/terminal size structure. This information is stored by the kernel -// in order to provide a consistent interface, but is not used by the kernel. -type Winsize = struct { - Fws_row uint16 - Fws_col uint16 - Fws_xpixel uint16 - Fws_ypixel uint16 -} /* _winsize.h:42:1 */ -type Pid_t = X__pid_t /* termios.h:46:18 */ +// $OpenBSD: ioccom.h,v 1.5 2013/03/22 21:22:05 deraadt Exp $ +// $NetBSD: ioccom.h,v 1.4 1994/10/30 21:49:56 cgd Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1989, 1993, 1994 +// Copyright (c) 1982, 1986, 1990, 1993, 1994 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -925,31 +688,50 @@ type Pid_t = X__pid_t /* termios.h:46:18 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 -// $FreeBSD$ +// @(#)ioccom.h 8.2 (Berkeley) 3/28/94 + +// Ioctl's have the command encoded in the lower word, and the size of +// any in or out parameters in the upper word. The high 3 bits of the +// upper word are used to encode the in/out status of the parameter. + +// no parameters +// copy parameters out +// copy parameters in +// copy parameters in and out +// mask for IN/OUT/VOID + +// this should be _IORW, but stdio got there first + +// Tty ioctl's. + +// Window/terminal size structure. This information is stored by the kernel +// in order to provide a consistent interface, but is not used by the kernel. +type Winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* ttycom.h:51:1 */ -// Tty ioctl's except for those supported only for backwards compatibility -// with the old tty driver. +type Tstamps = struct { + Fts_set int32 + Fts_clr int32 +} /* ttycom.h:58:1 */ -// 0-2 compat -// 3-7 unused // 8-10 compat -// 11-12 unused +// 15 unused // 17-18 compat -// 23-25 unused -// 29-85 unused -// 88 unused -// 89-91 conflicts: tun and tap -// 92-93 tun and tap -// 94-97 conflicts: tun and tap -// 100 unused -// 105 unused -// 116-117 compat -// 124-127 compat +// 127-124 compat +// 117-116 compat + +// Backwards compatibility + +// END OF PROTECTED INCLUDE. + +// $OpenBSD: ttydefaults.h,v 1.7 2019/03/12 11:01:25 nicm Exp $ +// $NetBSD: ttydefaults.h,v 1.8 1996/04/09 20:55:45 cgd Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // (c) UNIX System Laboratories, Inc. @@ -983,17 +765,12 @@ type Pid_t = X__pid_t /* termios.h:46:18 */ // SUCH DAMAGE. // // @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 -// $FreeBSD$ // System wide defaults for terminal state. // Defaults on "first" open. // Control Character Defaults -// XXX: A lot of code uses lowercase characters, but control-character -// conversion is actually only valid when applied to uppercase -// characters. We just treat lowercase characters as if they were -// inserted as uppercase. // compat // PROTECTED INCLUSION ENDS HERE diff --git a/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go b/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go index 323ef61be1..baf9ce5137 100644 --- a/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go +++ b/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go @@ -198,7 +198,7 @@ const ( X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -451,7 +451,7 @@ type Termios = struct { // Standard speeds -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -611,18 +611,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Pid_t = X__pid_t /* termios.h:255:18 */ diff --git a/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go b/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go index 323ef61be1..08360192c9 100644 --- a/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go +++ b/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o termios/termios_openbsd_amd64.go -pkgname termios', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o termios/termios_openbsd_arm64.go -pkgname termios', DO NOT EDIT. package termios @@ -185,20 +185,20 @@ const ( XCASE = 0x01000000 // termios.h:179:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_PID_T_DEFINED_ = 0 // termios.h:254:1: X_POSIX_VDISABLE = 255 // termios.h:81:1: X_RET_PROTECTOR = 1 // :2:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1: X_SYS_TERMIOS_H_ = 0 // termios.h:36:1: X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -286,10 +286,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -451,7 +448,7 @@ type Termios = struct { // Standard speeds -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -483,8 +480,7 @@ type Termios = struct { // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -526,66 +522,68 @@ type Termios = struct { // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -611,18 +609,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Pid_t = X__pid_t /* termios.h:255:18 */ diff --git a/vendor/modernc.org/libc/time/capi_darwin_amd64.go b/vendor/modernc.org/libc/time/capi_darwin_amd64.go index ef5b65c2b9..375a251a93 100644 --- a/vendor/modernc.org/libc/time/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/time/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_darwin_amd64.go -pkgname time', DO NOT EDIT. package time diff --git a/vendor/modernc.org/libc/time/capi_openbsd_386.go b/vendor/modernc.org/libc/time/capi_openbsd_386.go index bfb70b5c30..4fd3ec68a3 100644 --- a/vendor/modernc.org/libc/time/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/time/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o time/time_freebsd_386.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_openbsd_386.go -pkgname time', DO NOT EDIT. package time diff --git a/vendor/modernc.org/libc/time/capi_openbsd_arm64.go b/vendor/modernc.org/libc/time/capi_openbsd_arm64.go index e7893a7f85..6cb62d5180 100644 --- a/vendor/modernc.org/libc/time/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/time/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o time/time_openbsd_amd64.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_openbsd_arm64.go -pkgname time', DO NOT EDIT. package time diff --git a/vendor/modernc.org/libc/time/capi_windows_386.go b/vendor/modernc.org/libc/time/capi_windows_386.go index b379fa17ad..914065dbf9 100644 --- a/vendor/modernc.org/libc/time/capi_windows_386.go +++ b/vendor/modernc.org/libc/time/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_windows_386.go -pkgname time', DO NOT EDIT. package time diff --git a/vendor/modernc.org/libc/time/time_darwin_amd64.go b/vendor/modernc.org/libc/time/time_darwin_amd64.go index f11856c48e..e8be98b2b3 100644 --- a/vendor/modernc.org/libc/time/time_darwin_amd64.go +++ b/vendor/modernc.org/libc/time/time_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_darwin_amd64.go -pkgname time', DO NOT EDIT. package time @@ -15,38 +15,38 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLOCKS_PER_SEC = 1000000 - TIME_UTC = 1 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SIZE_T = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_H_ = 0 - X_TIME_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + CLOCKS_PER_SEC = 1000000 // time.h:90:1: + TIME_UTC = 1 // time.h:197:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_H_ = 0 // time.h:64:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) const ( /* time.h:153:1: */ diff --git a/vendor/modernc.org/libc/time/time_netbsd_amd64.go b/vendor/modernc.org/libc/time/time_netbsd_amd64.go index 69bd3dba0e..a6c2c51e9d 100644 --- a/vendor/modernc.org/libc/time/time_netbsd_amd64.go +++ b/vendor/modernc.org/libc/time/time_netbsd_amd64.go @@ -1924,6 +1924,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/time/time_netbsd_arm.go b/vendor/modernc.org/libc/time/time_netbsd_arm.go index a4062ac67e..e03b8c34fe 100644 --- a/vendor/modernc.org/libc/time/time_netbsd_arm.go +++ b/vendor/modernc.org/libc/time/time_netbsd_arm.go @@ -1897,6 +1897,7 @@ type Timezone = struct { // hide bintime for _STANDALONE because this header is used for hpcboot.exe, // which is built with compilers which don't recognize LL suffix. +// // http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/time/time_openbsd_386.go b/vendor/modernc.org/libc/time/time_openbsd_386.go index 0eaeee6900..3a627a064c 100644 --- a/vendor/modernc.org/libc/time/time_openbsd_386.go +++ b/vendor/modernc.org/libc/time/time_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o time/time_freebsd_386.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_openbsd_386.go -pkgname time', DO NOT EDIT. package time @@ -15,51 +15,37 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLK_TCK = 128 // time.h:56:1: - CLOCKS_PER_SEC = 128 // time.h:60:1: - CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: - CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: - CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: - CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: - CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: - CLOCK_PROF = 2 // _clock_id.h:64:1: - CLOCK_REALTIME = 0 // _clock_id.h:60:1: - CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: - CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: - CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: - CLOCK_SECOND = 13 // _clock_id.h:80:1: - CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: - CLOCK_UPTIME = 5 // _clock_id.h:74:1: - CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: - CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: - CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: - TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: - TIMER_RELTIME = 0x0 // _clock_id.h:98:1: - TIME_UTC = 1 // time.h:188:1: - X_CLOCKID_T_DECLARED = 0 // time.h:83:1: - X_CLOCK_T_DECLARED = 0 // time.h:64:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + X_CLOCKID_T_DEFINED_ = 0 // time.h:87:1: + X_CLOCK_T_DEFINED_ = 0 // time.h:49:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_ILP32 = 1 // :1:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_PID_T_DECLARED = 0 // time.h:97:1: - X_SIZE_T_DECLARED = 0 // time.h:74:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_PID_T_DEFINED_ = 0 // time.h:99:1: + X_SIZE_T_DEFINED_ = 0 // time.h:59:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // time.h:88:1: - X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // time.h:69:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // time.h:92:1: + X_TIMESPEC_DECLARED = 0 // time.h:75:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // time.h:54:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -71,11 +57,12 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-3-Clause +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ + +// Copyright (c) 1989 The Regents of the University of California. +// All rights reserved. // -// Copyright (c) 1989, 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 @@ -106,13 +93,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 +// @(#)time.h 5.12 (Berkeley) 3/9/91 -// $FreeBSD$ +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -143,63 +128,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -228,180 +189,85 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function attempts to acquire an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function releases a lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function asserts that an exclusive or shared lock is held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function requires that an exclusive or shared lock is or is not held. +// Default values. -// Function should not be analyzed. +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. +// Written by Todd C. Miller, September 9, 2016 +// Public domain. -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2003 Marcel Moolenaar -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -426,17 +292,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -448,48 +308,6 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. -// -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ - -// - -// This file is in the public domain. -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. // 3. 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. @@ -506,226 +324,130 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ type X__uint64_t = uint64 /* _types.h:68:28 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint32 F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1989, 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. -// 3. 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. -// -// @(#)time.h 8.3 (Berkeley) 1/21/94 +} /* _types.h:75:3 */ -// These macros are shared between time.h and sys/time.h. - -// Note: The values shown below as a comment for the __POSIX_VISIBLE values are -// the ones FreeBSD traditionally used based on our reading of the POSIX -// standards. However, glibc uses 199309 for all of them, even those many were -// not defined there. To remain bug compatible with glibc means more software -// that relied on the glibc behavior will compile easily on FreeBSD. -// -// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl -// port until it can be updated properly. It incorrectly assumes that this was a -// standard value. It will be moved back to the __BSD_VISIBLE section once the -// issue is corrected. +type Clock_t = X__clock_t /* time.h:50:19 */ -// FreeBSD-specific clocks. - -// Linux compatible names. +type Time_t = X__time_t /* time.h:55:18 */ // Frequency of the clock ticks reported by times(). Deprecated - use // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) -// Frequency of the clock ticks reported by clock(). - -type Clock_t = X__clock_t /* time.h:63:19 */ - -type Time_t = X__time_t /* time.h:68:18 */ - -// New in POSIX 1003.1b-1993. -type Clockid_t = X__clockid_t /* time.h:82:21 */ +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* time.h:76:1 */ -type Timer_t = X__timer_t /* time.h:87:19 */ +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1982, 1986, 1993 // The Regents of the University of California. All rights reserved. // @@ -752,117 +474,12 @@ type Timer_t = X__timer_t /* time.h:87:19 */ // 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. type Itimerspec = struct { Fit_interval struct { Ftv_sec Time_t @@ -872,9 +489,15 @@ type Itimerspec = struct { Ftv_sec Time_t Ftv_nsec int32 } -} /* timespec.h:60:1 */ +} /* _time.h:56:1 */ + +type Clockid_t = X__clockid_t /* time.h:88:21 */ + +type Timer_t = X__timer_t /* time.h:93:19 */ + +type Pid_t = X__pid_t /* time.h:100:18 */ -type Pid_t = X__pid_t /* time.h:96:18 */ +type Locale_t = uintptr /* time.h:107:14 */ type Tm = struct { Ftm_sec int32 @@ -888,40 +511,6 @@ type Tm = struct { Ftm_isdst int32 Ftm_gmtoff int32 Ftm_zone uintptr -} /* time.h:101:1 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. -// -// This software was developed by David Chisnall under sponsorship from -// the FreeBSD Foundation. -// -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Locale_t = uintptr /* _time.h:36:25 */ +} /* time.h:111:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_openbsd_amd64.go b/vendor/modernc.org/libc/time/time_openbsd_amd64.go index 3b007cbef5..7b9ca30134 100644 --- a/vendor/modernc.org/libc/time/time_openbsd_amd64.go +++ b/vendor/modernc.org/libc/time/time_openbsd_amd64.go @@ -45,7 +45,7 @@ const ( X_TIMESPEC_DECLARED = 0 // time.h:75:1: X_TIME_H_ = 0 // time.h:42:1: X_TIME_T_DEFINED_ = 0 // time.h:54:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -271,7 +271,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -431,18 +431,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Clock_t = X__clock_t /* time.h:50:19 */ diff --git a/vendor/modernc.org/libc/time/time_openbsd_arm64.go b/vendor/modernc.org/libc/time/time_openbsd_arm64.go index 3b007cbef5..1e41bb7bea 100644 --- a/vendor/modernc.org/libc/time/time_openbsd_arm64.go +++ b/vendor/modernc.org/libc/time/time_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o time/time_openbsd_amd64.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_openbsd_arm64.go -pkgname time', DO NOT EDIT. package time @@ -31,13 +31,13 @@ const ( X_FILE_OFFSET_BITS = 64 // :25:1: X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_PID_T_DEFINED_ = 0 // time.h:99:1: X_RET_PROTECTOR = 1 // :2:1: X_SIZE_T_DEFINED_ = 0 // time.h:59:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: @@ -45,7 +45,7 @@ const ( X_TIMESPEC_DECLARED = 0 // time.h:75:1: X_TIME_H_ = 0 // time.h:42:1: X_TIME_T_DEFINED_ = 0 // time.h:54:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -139,10 +139,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -271,7 +268,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -303,8 +300,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -346,66 +342,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -431,18 +429,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Clock_t = X__clock_t /* time.h:50:19 */ diff --git a/vendor/modernc.org/libc/time/time_windows_386.go b/vendor/modernc.org/libc/time/time_windows_386.go index c947a39298..c66c7c6309 100644 --- a/vendor/modernc.org/libc/time/time_windows_386.go +++ b/vendor/modernc.org/libc/time/time_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname time', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o time/time_windows_386.go -pkgname time', DO NOT EDIT. package time @@ -15,109 +15,109 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLK_TCK = 1000 - CLOCKS_PER_SEC = 1000 - CLOCK_MONOTONIC = 1 - CLOCK_PROCESS_CPUTIME_ID = 2 - CLOCK_REALTIME = 0 - CLOCK_THREAD_CPUTIME_ID = 3 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - TIMER_ABSTIME = 1 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - WINPTHREAD_API = 0 - WIN_PTHREADS_TIME_H = 0 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CLOCK_T_DEFINED = 0 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC_WTIME_INL = 0 - X_INC_WTIME_S_INL = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_POSIX_CPUTIME = 200809 - X_POSIX_MONOTONIC_CLOCK = 200809 - X_POSIX_THREAD_CPUTIME = 200809 - X_POSIX_TIMERS = 200809 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMEB_DEFINED = 0 - X_TIMEB_H_ = 0 - X_TIMEB_H_S = 0 - X_TIMESPEC_DEFINED = 0 - X_TIMEVAL_DEFINED = 0 - X_TIMEZONE_DEFINED = 0 - X_TIME_H_ = 0 - X_TIME_T_DEFINED = 0 - X_TM_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WTIME_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + CLK_TCK = 1000 // time.h:245:1: + CLOCKS_PER_SEC = 1000 // time.h:110:1: + CLOCK_MONOTONIC = 1 // pthread_time.h:62:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // pthread_time.h:66:1: + CLOCK_REALTIME = 0 // pthread_time.h:58:1: + CLOCK_THREAD_CPUTIME_ID = 3 // pthread_time.h:70:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + TIMER_ABSTIME = 1 // pthread_time.h:54:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + WINPTHREAD_API = 0 // pthread_time.h:80:1: + WIN_PTHREADS_TIME_H = 0 // pthread_time.h:26:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CLOCK_T_DEFINED = 0 // time.h:59:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC_WTIME_INL = 0 // time.h:190:1: + X_INC_WTIME_S_INL = 0 // time.h:202:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_POSIX_CPUTIME = 200809 // pthread_time.h:40:1: + X_POSIX_MONOTONIC_CLOCK = 200809 // pthread_time.h:35:1: + X_POSIX_THREAD_CPUTIME = 200809 // pthread_time.h:45:1: + X_POSIX_TIMERS = 200809 // pthread_time.h:30:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMEB_DEFINED = 0 // timeb.h:51:1: + X_TIMEB_H_ = 0 // timeb.h:7:1: + X_TIMEB_H_S = 0 // timeb_s.h:8:1: + X_TIMESPEC_DEFINED = 0 // timeb.h:90:1: + X_TIMEVAL_DEFINED = 0 // _timeval.h:8:1: + X_TIMEZONE_DEFINED = 0 // time.h:265:1: + X_TIME_H_ = 0 // time.h:7:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_TM_DEFINED = 0 // time.h:96:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WTIME_DEFINED = 0 // time.h:213:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -151,6 +151,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -171,6 +176,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -211,26 +222,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -256,29 +269,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type Clock_t = int32 /* time.h:60:16 */ @@ -294,10 +307,9 @@ type Tm = struct { Ftm_isdst int32 } /* time.h:97:3 */ -var Xdaylight int32 /* time.h:278:22: */ - -var Xtimezone int32 /* time.h:281:23: */ -var Xtzname [2]uintptr /* time.h:282:23: */ +var Xdaylight int32 /* time.h:256:22: */ +var Xtimezone int32 /* time.h:257:23: */ +var Xtzname [2]uintptr /* time.h:258:23: */ // * // This file has no copyright assigned and is placed in the Public Domain. @@ -312,7 +324,7 @@ type Timeval = struct { type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 -} /* time.h:290:1 */ +} /* time.h:266:1 */ // Adding timespec definition. // * @@ -352,7 +364,7 @@ type X__timeb64 = struct { type Timespec = struct { Ftv_sec Time_t Ftv_nsec int32 -} /* timeb.h:90:1 */ +} /* timeb.h:91:1 */ type Itimerspec = struct { Fit_interval struct { @@ -363,7 +375,7 @@ type Itimerspec = struct { Ftv_sec Time_t Ftv_nsec int32 } -} /* timeb.h:95:1 */ +} /* timeb.h:96:1 */ // POSIX 2008 says clock_gettime and timespec are defined in time.h header, // but other systems - like Linux, Solaris, etc - tend to declare such diff --git a/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go b/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go index f1a2922ac6..a25427f299 100644 --- a/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_darwin_amd64.go -pkgname unistd', DO NOT EDIT. package unistd diff --git a/vendor/modernc.org/libc/unistd/capi_openbsd_386.go b/vendor/modernc.org/libc/unistd/capi_openbsd_386.go index 8477d61f4f..bb76cbbf9c 100644 --- a/vendor/modernc.org/libc/unistd/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/unistd/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o unistd/unistd_freebsd_386.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_openbsd_386.go -pkgname unistd', DO NOT EDIT. package unistd diff --git a/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go b/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go index 9e64a79c09..1d67ce0ab1 100644 --- a/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o unistd/unistd_openbsd_amd64.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_openbsd_arm64.go -pkgname unistd', DO NOT EDIT. package unistd diff --git a/vendor/modernc.org/libc/unistd/capi_windows_386.go b/vendor/modernc.org/libc/unistd/capi_windows_386.go index 119657c4e9..177be6d8ad 100644 --- a/vendor/modernc.org/libc/unistd/capi_windows_386.go +++ b/vendor/modernc.org/libc/unistd/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_windows_386.go -pkgname unistd', DO NOT EDIT. package unistd diff --git a/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go b/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go index cc2e8280aa..0150b6dd63 100644 --- a/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go +++ b/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_darwin_amd64.go -pkgname unistd', DO NOT EDIT. package unistd @@ -15,370 +15,370 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSX_MAX_DESCRIPTORS = 100 - ACCESSX_MAX_TABLESIZE = 16384 - FD_SETSIZE = 1024 - 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_DATA = 4 - SEEK_END = 2 - SEEK_HOLE = 3 - SEEK_SET = 0 - STDERR_FILENO = 2 - STDIN_FILENO = 0 - STDOUT_FILENO = 1 - SYNC_VOLUME_FULLSYNC = 0x01 - SYNC_VOLUME_WAIT = 0x02 - W_OK = 2 - X_OK = 1 - X_ACCESS_EXTENDED_MASK = 4193792 - X_APPEND_OK = 8192 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CHOWN_OK = 2097152 - X_CS_DARWIN_USER_CACHE_DIR = 65538 - X_CS_DARWIN_USER_DIR = 65536 - X_CS_DARWIN_USER_TEMP_DIR = 65537 - X_CS_PATH = 1 - X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 - X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 - X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 - X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 - X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 - X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 - X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 - X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 - X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 - X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 - X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 - X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 - X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 - X_CS_XBS5_ILP32_OFF32_CFLAGS = 20 - X_CS_XBS5_ILP32_OFF32_LDFLAGS = 21 - X_CS_XBS5_ILP32_OFF32_LIBS = 22 - X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 23 - X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 24 - X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25 - X_CS_XBS5_ILP32_OFFBIG_LIBS = 26 - X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27 - X_CS_XBS5_LP64_OFF64_CFLAGS = 28 - X_CS_XBS5_LP64_OFF64_LDFLAGS = 29 - X_CS_XBS5_LP64_OFF64_LIBS = 30 - X_CS_XBS5_LP64_OFF64_LINTFLAGS = 31 - X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32 - X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33 - X_CS_XBS5_LPBIG_OFFBIG_LIBS = 34 - X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35 - X_CTERMID_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DELETE_OK = 4096 - X_DEV_T = 0 - X_EXECUTE_OK = 2048 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_GID_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_PC_2_SYMLINKS = 15 - X_PC_ALLOC_SIZE_MIN = 16 - X_PC_ASYNC_IO = 17 - X_PC_AUTH_OPAQUE_NP = 14 - X_PC_CASE_PRESERVING = 12 - X_PC_CASE_SENSITIVE = 11 - X_PC_CHOWN_RESTRICTED = 7 - X_PC_EXTENDED_SECURITY_NP = 13 - X_PC_FILESIZEBITS = 18 - X_PC_LINK_MAX = 1 - X_PC_MAX_CANON = 2 - X_PC_MAX_INPUT = 3 - X_PC_MIN_HOLE_SIZE = 27 - X_PC_NAME_CHARS_MAX = 10 - X_PC_NAME_MAX = 4 - X_PC_NO_TRUNC = 8 - X_PC_PATH_MAX = 5 - X_PC_PIPE_BUF = 6 - X_PC_PRIO_IO = 19 - X_PC_REC_INCR_XFER_SIZE = 20 - X_PC_REC_MAX_XFER_SIZE = 21 - X_PC_REC_MIN_XFER_SIZE = 22 - X_PC_REC_XFER_ALIGN = 23 - X_PC_SYMLINK_MAX = 24 - X_PC_SYNC_IO = 25 - X_PC_VDISABLE = 9 - X_PC_XATTR_SIZE_BITS = 26 - X_PID_T = 0 - X_POSIX2_CHAR_TERM = 200112 - X_POSIX2_C_BIND = 200112 - X_POSIX2_C_DEV = 200112 - X_POSIX2_FORT_DEV = -1 - X_POSIX2_FORT_RUN = 200112 - X_POSIX2_LOCALEDEF = 200112 - X_POSIX2_PBS = -1 - X_POSIX2_PBS_ACCOUNTING = -1 - X_POSIX2_PBS_CHECKPOINT = -1 - X_POSIX2_PBS_LOCATE = -1 - X_POSIX2_PBS_MESSAGE = -1 - X_POSIX2_PBS_TRACK = -1 - X_POSIX2_SW_DEV = 200112 - X_POSIX2_UPE = 200112 - X_POSIX2_VERSION = 200112 - X_POSIX_ADVISORY_INFO = -1 - X_POSIX_ASYNCHRONOUS_IO = -1 - X_POSIX_BARRIERS = -1 - X_POSIX_CHOWN_RESTRICTED = 200112 - X_POSIX_CLOCK_SELECTION = -1 - X_POSIX_CPUTIME = -1 - X_POSIX_FSYNC = 200112 - X_POSIX_IPV6 = 200112 - X_POSIX_JOB_CONTROL = 200112 - X_POSIX_MAPPED_FILES = 200112 - X_POSIX_MEMLOCK = -1 - X_POSIX_MEMLOCK_RANGE = -1 - X_POSIX_MEMORY_PROTECTION = 200112 - X_POSIX_MESSAGE_PASSING = -1 - X_POSIX_MONOTONIC_CLOCK = -1 - X_POSIX_NO_TRUNC = 200112 - X_POSIX_PRIORITIZED_IO = -1 - X_POSIX_PRIORITY_SCHEDULING = -1 - X_POSIX_RAW_SOCKETS = -1 - X_POSIX_READER_WRITER_LOCKS = 200112 - X_POSIX_REALTIME_SIGNALS = -1 - X_POSIX_REGEXP = 200112 - X_POSIX_SAVED_IDS = 200112 - X_POSIX_SEMAPHORES = -1 - X_POSIX_SHARED_MEMORY_OBJECTS = -1 - X_POSIX_SHELL = 200112 - X_POSIX_SPAWN = -1 - X_POSIX_SPIN_LOCKS = -1 - X_POSIX_SPORADIC_SERVER = -1 - X_POSIX_SYNCHRONIZED_IO = -1 - X_POSIX_THREADS = 200112 - X_POSIX_THREAD_ATTR_STACKADDR = 200112 - X_POSIX_THREAD_ATTR_STACKSIZE = 200112 - X_POSIX_THREAD_CPUTIME = -1 - X_POSIX_THREAD_KEYS_MAX = 128 - X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 - X_POSIX_THREAD_PRIO_INHERIT = -1 - X_POSIX_THREAD_PRIO_PROTECT = -1 - X_POSIX_THREAD_PROCESS_SHARED = 200112 - X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 - X_POSIX_THREAD_SPORADIC_SERVER = -1 - X_POSIX_TIMEOUTS = -1 - X_POSIX_TIMERS = -1 - 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_VERSION = 200112 - X_RATTR_OK = 32768 - X_READ_OK = 512 - X_REXT_OK = 131072 - X_RMFILE_OK = 16384 - X_RPERM_OK = 524288 - X_SC_2_CHAR_TERM = 20 - X_SC_2_C_BIND = 18 - X_SC_2_C_DEV = 19 - X_SC_2_FORT_DEV = 21 - X_SC_2_FORT_RUN = 22 - X_SC_2_LOCALEDEF = 23 - X_SC_2_PBS = 59 - X_SC_2_PBS_ACCOUNTING = 60 - X_SC_2_PBS_CHECKPOINT = 61 - X_SC_2_PBS_LOCATE = 62 - X_SC_2_PBS_MESSAGE = 63 - X_SC_2_PBS_TRACK = 64 - X_SC_2_SW_DEV = 24 - X_SC_2_UPE = 25 - X_SC_2_VERSION = 17 - X_SC_ADVISORY_INFO = 65 - X_SC_AIO_LISTIO_MAX = 42 - X_SC_AIO_MAX = 43 - X_SC_AIO_PRIO_DELTA_MAX = 44 - X_SC_ARG_MAX = 1 - X_SC_ASYNCHRONOUS_IO = 28 - X_SC_ATEXIT_MAX = 107 - X_SC_BARRIERS = 66 - X_SC_BC_BASE_MAX = 9 - X_SC_BC_DIM_MAX = 10 - X_SC_BC_SCALE_MAX = 11 - X_SC_BC_STRING_MAX = 12 - X_SC_CHILD_MAX = 2 - X_SC_CLK_TCK = 3 - X_SC_CLOCK_SELECTION = 67 - X_SC_COLL_WEIGHTS_MAX = 13 - X_SC_CPUTIME = 68 - X_SC_DELAYTIMER_MAX = 45 - X_SC_EXPR_NEST_MAX = 14 - X_SC_FILE_LOCKING = 69 - X_SC_FSYNC = 38 - X_SC_GETGR_R_SIZE_MAX = 70 - X_SC_GETPW_R_SIZE_MAX = 71 - X_SC_HOST_NAME_MAX = 72 - X_SC_IOV_MAX = 56 - X_SC_IPV6 = 118 - X_SC_JOB_CONTROL = 6 - X_SC_LINE_MAX = 15 - X_SC_LOGIN_NAME_MAX = 73 - X_SC_MAPPED_FILES = 47 - X_SC_MEMLOCK = 30 - X_SC_MEMLOCK_RANGE = 31 - X_SC_MEMORY_PROTECTION = 32 - X_SC_MESSAGE_PASSING = 33 - X_SC_MONOTONIC_CLOCK = 74 - X_SC_MQ_OPEN_MAX = 46 - X_SC_MQ_PRIO_MAX = 75 - X_SC_NGROUPS_MAX = 4 - X_SC_NPROCESSORS_CONF = 57 - X_SC_NPROCESSORS_ONLN = 58 - X_SC_OPEN_MAX = 5 - X_SC_PAGESIZE = 29 - X_SC_PAGE_SIZE = 29 - X_SC_PASS_MAX = 131 - X_SC_PHYS_PAGES = 200 - X_SC_PRIORITIZED_IO = 34 - X_SC_PRIORITY_SCHEDULING = 35 - X_SC_RAW_SOCKETS = 119 - X_SC_READER_WRITER_LOCKS = 76 - X_SC_REALTIME_SIGNALS = 36 - X_SC_REGEXP = 77 - X_SC_RE_DUP_MAX = 16 - X_SC_RTSIG_MAX = 48 - X_SC_SAVED_IDS = 7 - X_SC_SEMAPHORES = 37 - X_SC_SEM_NSEMS_MAX = 49 - X_SC_SEM_VALUE_MAX = 50 - X_SC_SHARED_MEMORY_OBJECTS = 39 - X_SC_SHELL = 78 - X_SC_SIGQUEUE_MAX = 51 - X_SC_SPAWN = 79 - X_SC_SPIN_LOCKS = 80 - X_SC_SPORADIC_SERVER = 81 - X_SC_SS_REPL_MAX = 126 - X_SC_STREAM_MAX = 26 - X_SC_SYMLOOP_MAX = 120 - X_SC_SYNCHRONIZED_IO = 40 - X_SC_THREADS = 96 - X_SC_THREAD_ATTR_STACKADDR = 82 - X_SC_THREAD_ATTR_STACKSIZE = 83 - X_SC_THREAD_CPUTIME = 84 - X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 - X_SC_THREAD_KEYS_MAX = 86 - X_SC_THREAD_PRIORITY_SCHEDULING = 89 - X_SC_THREAD_PRIO_INHERIT = 87 - X_SC_THREAD_PRIO_PROTECT = 88 - X_SC_THREAD_PROCESS_SHARED = 90 - X_SC_THREAD_SAFE_FUNCTIONS = 91 - X_SC_THREAD_SPORADIC_SERVER = 92 - X_SC_THREAD_STACK_MIN = 93 - X_SC_THREAD_THREADS_MAX = 94 - X_SC_TIMEOUTS = 95 - X_SC_TIMERS = 41 - X_SC_TIMER_MAX = 52 - X_SC_TRACE = 97 - X_SC_TRACE_EVENT_FILTER = 98 - X_SC_TRACE_EVENT_NAME_MAX = 127 - X_SC_TRACE_INHERIT = 99 - X_SC_TRACE_LOG = 100 - X_SC_TRACE_NAME_MAX = 128 - X_SC_TRACE_SYS_MAX = 129 - X_SC_TRACE_USER_EVENT_MAX = 130 - X_SC_TTY_NAME_MAX = 101 - X_SC_TYPED_MEMORY_OBJECTS = 102 - X_SC_TZNAME_MAX = 27 - X_SC_V6_ILP32_OFF32 = 103 - X_SC_V6_ILP32_OFFBIG = 104 - X_SC_V6_LP64_OFF64 = 105 - X_SC_V6_LPBIG_OFFBIG = 106 - X_SC_VERSION = 8 - X_SC_XBS5_ILP32_OFF32 = 122 - X_SC_XBS5_ILP32_OFFBIG = 123 - X_SC_XBS5_LP64_OFF64 = 124 - X_SC_XBS5_LPBIG_OFFBIG = 125 - X_SC_XOPEN_CRYPT = 108 - X_SC_XOPEN_ENH_I18N = 109 - X_SC_XOPEN_LEGACY = 110 - X_SC_XOPEN_REALTIME = 111 - X_SC_XOPEN_REALTIME_THREADS = 112 - X_SC_XOPEN_SHM = 113 - X_SC_XOPEN_STREAMS = 114 - X_SC_XOPEN_UNIX = 115 - X_SC_XOPEN_VERSION = 116 - X_SC_XOPEN_XCU_VERSION = 121 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_SUSECONDS_T = 0 - X_SYS_SELECT_H_ = 0 - X_SYS_UNISTD_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__SELECT_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINT32_T = 0 - X_UINT64_T = 0 - X_UINTPTR_T = 0 - X_UNISTD_H_ = 0 - X_USECONDS_T = 0 - X_UUID_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_V6_ILP32_OFF32 = -1 - X_V6_ILP32_OFFBIG = -1 - X_V6_LP64_OFF64 = 1 - X_V6_LPBIG_OFFBIG = 1 - X_WATTR_OK = 65536 - X_WEXT_OK = 262144 - X_WPERM_OK = 1048576 - X_WRITE_OK = 1024 - X_XBS5_ILP32_OFF32 = -1 - X_XBS5_ILP32_OFFBIG = -1 - X_XBS5_LP64_OFF64 = 1 - X_XBS5_LPBIG_OFFBIG = 1 - X_XOPEN_CRYPT = 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_STREAMS = -1 - X_XOPEN_UNIX = 1 - X_XOPEN_VERSION = 600 - X_XOPEN_XCU_VERSION = 4 + ACCESSX_MAX_DESCRIPTORS = 100 // unistd.h:137:1: + ACCESSX_MAX_TABLESIZE = 16384 // unistd.h:138:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + F_LOCK = 1 // unistd.h:528:1: + F_OK = 0 // unistd.h:89:1: + F_TEST = 3 // unistd.h:530:1: + F_TLOCK = 2 // unistd.h:529:1: + F_ULOCK = 0 // unistd.h:527:1: + L_INCR = 1 // unistd.h:127:1: + L_SET = 0 // unistd.h:126:1: + L_XTND = 2 // unistd.h:128:1: + R_OK = 4 // unistd.h:92:1: + SEEK_CUR = 1 // _seek_set.h:34:1: + SEEK_DATA = 4 // _seek_set.h:44:1: + SEEK_END = 2 // _seek_set.h:35:1: + SEEK_HOLE = 3 // _seek_set.h:40:1: + SEEK_SET = 0 // _seek_set.h:33:1: + STDERR_FILENO = 2 // unistd.h:88:1: + STDIN_FILENO = 0 // unistd.h:86:1: + STDOUT_FILENO = 1 // unistd.h:87:1: + SYNC_VOLUME_FULLSYNC = 0x01 // unistd.h:776:1: + SYNC_VOLUME_WAIT = 0x02 // unistd.h:777:1: + W_OK = 2 // unistd.h:91:1: + X_OK = 1 // unistd.h:90:1: + X_ACCESS_EXTENDED_MASK = 4193792 // unistd.h:114:1: + X_APPEND_OK = 8192 // unistd.h:104:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CHOWN_OK = 2097152 // unistd.h:112:1: + X_CS_DARWIN_USER_CACHE_DIR = 65538 // unistd.h:415:1: + X_CS_DARWIN_USER_DIR = 65536 // unistd.h:413:1: + X_CS_DARWIN_USER_TEMP_DIR = 65537 // unistd.h:414:1: + X_CS_PATH = 1 // unistd.h:175:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:377:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:378:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:379:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:380:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:381:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:382:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:383:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:384:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:385:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:386:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:387:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:388:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:389:1: + X_CS_XBS5_ILP32_OFF32_CFLAGS = 20 // unistd.h:394:1: + X_CS_XBS5_ILP32_OFF32_LDFLAGS = 21 // unistd.h:395:1: + X_CS_XBS5_ILP32_OFF32_LIBS = 22 // unistd.h:396:1: + X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 23 // unistd.h:397:1: + X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 24 // unistd.h:398:1: + X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25 // unistd.h:399:1: + X_CS_XBS5_ILP32_OFFBIG_LIBS = 26 // unistd.h:400:1: + X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27 // unistd.h:401:1: + X_CS_XBS5_LP64_OFF64_CFLAGS = 28 // unistd.h:402:1: + X_CS_XBS5_LP64_OFF64_LDFLAGS = 29 // unistd.h:403:1: + X_CS_XBS5_LP64_OFF64_LIBS = 30 // unistd.h:404:1: + X_CS_XBS5_LP64_OFF64_LINTFLAGS = 31 // unistd.h:405:1: + X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32 // unistd.h:406:1: + X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33 // unistd.h:407:1: + X_CS_XBS5_LPBIG_OFFBIG_LIBS = 34 // unistd.h:408:1: + X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35 // unistd.h:409:1: + X_CTERMID_H_ = 0 // _ctermid.h:25:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DELETE_OK = 4096 // unistd.h:103:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_EXECUTE_OK = 2048 // unistd.h:102:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_PC_2_SYMLINKS = 15 // unistd.h:160:1: + X_PC_ALLOC_SIZE_MIN = 16 // unistd.h:161:1: + X_PC_ASYNC_IO = 17 // unistd.h:162:1: + X_PC_AUTH_OPAQUE_NP = 14 // unistd.h:157:1: + X_PC_CASE_PRESERVING = 12 // unistd.h:155:1: + X_PC_CASE_SENSITIVE = 11 // unistd.h:154:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:148:1: + X_PC_EXTENDED_SECURITY_NP = 13 // unistd.h:156:1: + X_PC_FILESIZEBITS = 18 // unistd.h:163:1: + X_PC_LINK_MAX = 1 // unistd.h:142:1: + X_PC_MAX_CANON = 2 // unistd.h:143:1: + X_PC_MAX_INPUT = 3 // unistd.h:144:1: + X_PC_MIN_HOLE_SIZE = 27 // unistd.h:172:1: + X_PC_NAME_CHARS_MAX = 10 // unistd.h:153:1: + X_PC_NAME_MAX = 4 // unistd.h:145:1: + X_PC_NO_TRUNC = 8 // unistd.h:149:1: + X_PC_PATH_MAX = 5 // unistd.h:146:1: + X_PC_PIPE_BUF = 6 // unistd.h:147:1: + X_PC_PRIO_IO = 19 // unistd.h:164:1: + X_PC_REC_INCR_XFER_SIZE = 20 // unistd.h:165:1: + X_PC_REC_MAX_XFER_SIZE = 21 // unistd.h:166:1: + X_PC_REC_MIN_XFER_SIZE = 22 // unistd.h:167:1: + X_PC_REC_XFER_ALIGN = 23 // unistd.h:168:1: + X_PC_SYMLINK_MAX = 24 // unistd.h:169:1: + X_PC_SYNC_IO = 25 // unistd.h:170:1: + X_PC_VDISABLE = 9 // unistd.h:150:1: + X_PC_XATTR_SIZE_BITS = 26 // unistd.h:171:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_POSIX2_CHAR_TERM = 200112 // unistd.h:152:1: + X_POSIX2_C_BIND = 200112 // unistd.h:150:1: + X_POSIX2_C_DEV = 200112 // unistd.h:151:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:153:1: + X_POSIX2_FORT_RUN = 200112 // unistd.h:154:1: + X_POSIX2_LOCALEDEF = 200112 // unistd.h:155:1: + X_POSIX2_PBS = -1 // unistd.h:156:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:157:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:158:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:159:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:160:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:161:1: + X_POSIX2_SW_DEV = 200112 // unistd.h:162:1: + X_POSIX2_UPE = 200112 // unistd.h:163:1: + X_POSIX2_VERSION = 200112 // unistd.h:80:1: + X_POSIX_ADVISORY_INFO = -1 // unistd.h:98:1: + X_POSIX_ASYNCHRONOUS_IO = -1 // unistd.h:99:1: + X_POSIX_BARRIERS = -1 // unistd.h:100:1: + X_POSIX_CHOWN_RESTRICTED = 200112 // unistd.h:101:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:102:1: + X_POSIX_CPUTIME = -1 // unistd.h:103:1: + X_POSIX_FSYNC = 200112 // unistd.h:104:1: + X_POSIX_IPV6 = 200112 // unistd.h:105:1: + X_POSIX_JOB_CONTROL = 200112 // unistd.h:106:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:107:1: + X_POSIX_MEMLOCK = -1 // unistd.h:108:1: + X_POSIX_MEMLOCK_RANGE = -1 // unistd.h:109:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:110:1: + X_POSIX_MESSAGE_PASSING = -1 // unistd.h:111:1: + X_POSIX_MONOTONIC_CLOCK = -1 // unistd.h:112:1: + X_POSIX_NO_TRUNC = 200112 // unistd.h:113:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:114:1: + X_POSIX_PRIORITY_SCHEDULING = -1 // unistd.h:115:1: + X_POSIX_RAW_SOCKETS = -1 // unistd.h:116:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:117:1: + X_POSIX_REALTIME_SIGNALS = -1 // unistd.h:118:1: + X_POSIX_REGEXP = 200112 // unistd.h:119:1: + X_POSIX_SAVED_IDS = 200112 // unistd.h:120:1: + X_POSIX_SEMAPHORES = -1 // unistd.h:121:1: + X_POSIX_SHARED_MEMORY_OBJECTS = -1 // unistd.h:122:1: + X_POSIX_SHELL = 200112 // unistd.h:123:1: + X_POSIX_SPAWN = -1 // unistd.h:124:1: + X_POSIX_SPIN_LOCKS = -1 // unistd.h:125:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:126:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:127:1: + X_POSIX_THREADS = 200112 // unistd.h:137:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:128:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:129:1: + X_POSIX_THREAD_CPUTIME = -1 // unistd.h:130:1: + X_POSIX_THREAD_KEYS_MAX = 128 // unistd.h:86:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 // unistd.h:133:1: + X_POSIX_THREAD_PRIO_INHERIT = -1 // unistd.h:131:1: + X_POSIX_THREAD_PRIO_PROTECT = -1 // unistd.h:132:1: + X_POSIX_THREAD_PROCESS_SHARED = 200112 // unistd.h:134:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:135:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:136:1: + X_POSIX_TIMEOUTS = -1 // unistd.h:138:1: + X_POSIX_TIMERS = -1 // unistd.h:139:1: + X_POSIX_TRACE = -1 // unistd.h:140:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:141:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:142:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:143:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:144:1: + X_POSIX_V6_ILP32_OFF32 = -1 // unistd.h:173:1: + X_POSIX_V6_ILP32_OFFBIG = -1 // unistd.h:174:1: + X_POSIX_V6_LP64_OFF64 = 1 // unistd.h:175:1: + X_POSIX_V6_LPBIG_OFFBIG = 1 // unistd.h:176:1: + X_POSIX_V7_ILP32_OFF32 = -1 // unistd.h:180:1: + X_POSIX_V7_ILP32_OFFBIG = -1 // unistd.h:181:1: + X_POSIX_V7_LP64_OFF64 = 1 // unistd.h:182:1: + X_POSIX_V7_LPBIG_OFFBIG = 1 // unistd.h:183:1: + X_POSIX_VERSION = 200112 // unistd.h:79:1: + X_RATTR_OK = 32768 // unistd.h:106:1: + X_READ_OK = 512 // unistd.h:100:1: + X_REXT_OK = 131072 // unistd.h:108:1: + X_RMFILE_OK = 16384 // unistd.h:105:1: + X_RPERM_OK = 524288 // unistd.h:110:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:232:1: + X_SC_2_C_BIND = 18 // unistd.h:230:1: + X_SC_2_C_DEV = 19 // unistd.h:231:1: + X_SC_2_FORT_DEV = 21 // unistd.h:233:1: + X_SC_2_FORT_RUN = 22 // unistd.h:234:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:235:1: + X_SC_2_PBS = 59 // unistd.h:275:1: + X_SC_2_PBS_ACCOUNTING = 60 // unistd.h:276:1: + X_SC_2_PBS_CHECKPOINT = 61 // unistd.h:277:1: + X_SC_2_PBS_LOCATE = 62 // unistd.h:278:1: + X_SC_2_PBS_MESSAGE = 63 // unistd.h:279:1: + X_SC_2_PBS_TRACK = 64 // unistd.h:280:1: + X_SC_2_SW_DEV = 24 // unistd.h:236:1: + X_SC_2_UPE = 25 // unistd.h:237:1: + X_SC_2_VERSION = 17 // unistd.h:229:1: + X_SC_ADVISORY_INFO = 65 // unistd.h:281:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:256:1: + X_SC_AIO_MAX = 43 // unistd.h:257:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:258:1: + X_SC_ARG_MAX = 1 // unistd.h:213:1: + X_SC_ASYNCHRONOUS_IO = 28 // unistd.h:242:1: + X_SC_ATEXIT_MAX = 107 // unistd.h:329:1: + X_SC_BARRIERS = 66 // unistd.h:282:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:221:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:222:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:223:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:224:1: + X_SC_CHILD_MAX = 2 // unistd.h:214:1: + X_SC_CLK_TCK = 3 // unistd.h:215:1: + X_SC_CLOCK_SELECTION = 67 // unistd.h:283:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:225:1: + X_SC_CPUTIME = 68 // unistd.h:284:1: + X_SC_DELAYTIMER_MAX = 45 // unistd.h:259:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:226:1: + X_SC_FILE_LOCKING = 69 // unistd.h:285:1: + X_SC_FSYNC = 38 // unistd.h:252:1: + X_SC_GETGR_R_SIZE_MAX = 70 // unistd.h:286:1: + X_SC_GETPW_R_SIZE_MAX = 71 // unistd.h:287:1: + X_SC_HOST_NAME_MAX = 72 // unistd.h:288:1: + X_SC_IOV_MAX = 56 // unistd.h:330:1: + X_SC_IPV6 = 118 // unistd.h:323:1: + X_SC_JOB_CONTROL = 6 // unistd.h:218:1: + X_SC_LINE_MAX = 15 // unistd.h:227:1: + X_SC_LOGIN_NAME_MAX = 73 // unistd.h:289:1: + X_SC_MAPPED_FILES = 47 // unistd.h:261:1: + X_SC_MEMLOCK = 30 // unistd.h:244:1: + X_SC_MEMLOCK_RANGE = 31 // unistd.h:245:1: + X_SC_MEMORY_PROTECTION = 32 // unistd.h:246:1: + X_SC_MESSAGE_PASSING = 33 // unistd.h:247:1: + X_SC_MONOTONIC_CLOCK = 74 // unistd.h:290:1: + X_SC_MQ_OPEN_MAX = 46 // unistd.h:260:1: + X_SC_MQ_PRIO_MAX = 75 // unistd.h:291:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:216:1: + X_SC_NPROCESSORS_CONF = 57 // unistd.h:270:1: + X_SC_NPROCESSORS_ONLN = 58 // unistd.h:271:1: + X_SC_OPEN_MAX = 5 // unistd.h:217:1: + X_SC_PAGESIZE = 29 // unistd.h:243:1: + X_SC_PAGE_SIZE = 29 // unistd.h:331:1: + X_SC_PASS_MAX = 131 // unistd.h:362:1: + X_SC_PHYS_PAGES = 200 // unistd.h:367:1: + X_SC_PRIORITIZED_IO = 34 // unistd.h:248:1: + X_SC_PRIORITY_SCHEDULING = 35 // unistd.h:249:1: + X_SC_RAW_SOCKETS = 119 // unistd.h:324:1: + X_SC_READER_WRITER_LOCKS = 76 // unistd.h:292:1: + X_SC_REALTIME_SIGNALS = 36 // unistd.h:250:1: + X_SC_REGEXP = 77 // unistd.h:293:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:228:1: + X_SC_RTSIG_MAX = 48 // unistd.h:262:1: + X_SC_SAVED_IDS = 7 // unistd.h:219:1: + X_SC_SEMAPHORES = 37 // unistd.h:251:1: + X_SC_SEM_NSEMS_MAX = 49 // unistd.h:263:1: + X_SC_SEM_VALUE_MAX = 50 // unistd.h:264:1: + X_SC_SHARED_MEMORY_OBJECTS = 39 // unistd.h:253:1: + X_SC_SHELL = 78 // unistd.h:294:1: + X_SC_SIGQUEUE_MAX = 51 // unistd.h:265:1: + X_SC_SPAWN = 79 // unistd.h:295:1: + X_SC_SPIN_LOCKS = 80 // unistd.h:296:1: + X_SC_SPORADIC_SERVER = 81 // unistd.h:297:1: + X_SC_SS_REPL_MAX = 126 // unistd.h:353:1: + X_SC_STREAM_MAX = 26 // unistd.h:238:1: + X_SC_SYMLOOP_MAX = 120 // unistd.h:325:1: + X_SC_SYNCHRONIZED_IO = 40 // unistd.h:254:1: + X_SC_THREADS = 96 // unistd.h:312:1: + X_SC_THREAD_ATTR_STACKADDR = 82 // unistd.h:298:1: + X_SC_THREAD_ATTR_STACKSIZE = 83 // unistd.h:299:1: + X_SC_THREAD_CPUTIME = 84 // unistd.h:300:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 // unistd.h:301:1: + X_SC_THREAD_KEYS_MAX = 86 // unistd.h:302:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 89 // unistd.h:305:1: + X_SC_THREAD_PRIO_INHERIT = 87 // unistd.h:303:1: + X_SC_THREAD_PRIO_PROTECT = 88 // unistd.h:304:1: + X_SC_THREAD_PROCESS_SHARED = 90 // unistd.h:306:1: + X_SC_THREAD_SAFE_FUNCTIONS = 91 // unistd.h:307:1: + X_SC_THREAD_SPORADIC_SERVER = 92 // unistd.h:308:1: + X_SC_THREAD_STACK_MIN = 93 // unistd.h:309:1: + X_SC_THREAD_THREADS_MAX = 94 // unistd.h:310:1: + X_SC_TIMEOUTS = 95 // unistd.h:311:1: + X_SC_TIMERS = 41 // unistd.h:255:1: + X_SC_TIMER_MAX = 52 // unistd.h:266:1: + X_SC_TRACE = 97 // unistd.h:313:1: + X_SC_TRACE_EVENT_FILTER = 98 // unistd.h:314:1: + X_SC_TRACE_EVENT_NAME_MAX = 127 // unistd.h:354:1: + X_SC_TRACE_INHERIT = 99 // unistd.h:315:1: + X_SC_TRACE_LOG = 100 // unistd.h:316:1: + X_SC_TRACE_NAME_MAX = 128 // unistd.h:355:1: + X_SC_TRACE_SYS_MAX = 129 // unistd.h:356:1: + X_SC_TRACE_USER_EVENT_MAX = 130 // unistd.h:357:1: + X_SC_TTY_NAME_MAX = 101 // unistd.h:317:1: + X_SC_TYPED_MEMORY_OBJECTS = 102 // unistd.h:318:1: + X_SC_TZNAME_MAX = 27 // unistd.h:239:1: + X_SC_V6_ILP32_OFF32 = 103 // unistd.h:319:1: + X_SC_V6_ILP32_OFFBIG = 104 // unistd.h:320:1: + X_SC_V6_LP64_OFF64 = 105 // unistd.h:321:1: + X_SC_V6_LPBIG_OFFBIG = 106 // unistd.h:322:1: + X_SC_VERSION = 8 // unistd.h:220:1: + X_SC_XBS5_ILP32_OFF32 = 122 // unistd.h:346:1: + X_SC_XBS5_ILP32_OFFBIG = 123 // unistd.h:347:1: + X_SC_XBS5_LP64_OFF64 = 124 // unistd.h:348:1: + X_SC_XBS5_LPBIG_OFFBIG = 125 // unistd.h:349:1: + X_SC_XOPEN_CRYPT = 108 // unistd.h:332:1: + X_SC_XOPEN_ENH_I18N = 109 // unistd.h:333:1: + X_SC_XOPEN_LEGACY = 110 // unistd.h:334:1: + X_SC_XOPEN_REALTIME = 111 // unistd.h:335:1: + X_SC_XOPEN_REALTIME_THREADS = 112 // unistd.h:336:1: + X_SC_XOPEN_SHM = 113 // unistd.h:337:1: + X_SC_XOPEN_STREAMS = 114 // unistd.h:338:1: + X_SC_XOPEN_UNIX = 115 // unistd.h:339:1: + X_SC_XOPEN_VERSION = 116 // unistd.h:340:1: + X_SC_XOPEN_XCU_VERSION = 121 // unistd.h:341:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SELECT_H_ = 0 // select.h:64:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:65:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__SELECT_H_ = 0 // _select.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINT32_T = 0 // _uint32_t.h:30:1: + X_UINT64_T = 0 // _uint64_t.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_UNISTD_H_ = 0 // unistd.h:69:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_V6_ILP32_OFF32 = -1 // unistd.h:187:1: + X_V6_ILP32_OFFBIG = -1 // unistd.h:188:1: + X_V6_LP64_OFF64 = 1 // unistd.h:189:1: + X_V6_LPBIG_OFFBIG = 1 // unistd.h:190:1: + X_WATTR_OK = 65536 // unistd.h:107:1: + X_WEXT_OK = 262144 // unistd.h:109:1: + X_WPERM_OK = 1048576 // unistd.h:111:1: + X_WRITE_OK = 1024 // unistd.h:101:1: + X_XBS5_ILP32_OFF32 = -1 // unistd.h:195:1: + X_XBS5_ILP32_OFFBIG = -1 // unistd.h:196:1: + X_XBS5_LP64_OFF64 = 1 // unistd.h:197:1: + X_XBS5_LPBIG_OFFBIG = 1 // unistd.h:198:1: + X_XOPEN_CRYPT = 1 // unistd.h:202:1: + X_XOPEN_ENH_I18N = 1 // unistd.h:203:1: + X_XOPEN_LEGACY = -1 // unistd.h:204:1: + X_XOPEN_REALTIME = -1 // unistd.h:205:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:206:1: + X_XOPEN_SHM = 1 // unistd.h:207:1: + X_XOPEN_STREAMS = -1 // unistd.h:208:1: + X_XOPEN_UNIX = 1 // unistd.h:209:1: + X_XOPEN_VERSION = 600 // unistd.h:93:1: + X_XOPEN_XCU_VERSION = 4 // unistd.h:94:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go b/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go index 0897c89606..c9e3de37e3 100644 --- a/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go +++ b/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o unistd/unistd_freebsd_386.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_openbsd_386.go -pkgname unistd', DO NOT EDIT. package unistd @@ -15,377 +15,337 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // _endian.h:70:1: - BYTE_ORDER = 1234 // _endian.h:72:1: - FD_SETSIZE = 1024 // select.h:61:1: - F_LOCK = 1 // unistd.h:85:1: - F_OK = 0 // unistd.h:102:1: - F_TEST = 3 // unistd.h:87:1: - F_TLOCK = 2 // unistd.h:86:1: - F_ULOCK = 0 // unistd.h:84:1: - LITTLE_ENDIAN = 1234 // _endian.h:69:1: - L_INCR = 1 // unistd.h:121:1: - L_SET = 0 // unistd.h:120:1: - L_XTND = 2 // unistd.h:122:1: - PDP_ENDIAN = 3412 // _endian.h:71:1: - RFCENVG = 2048 // unistd.h:178:1: - RFCFDG = 4096 // unistd.h:179:1: - RFCNAMEG = 1024 // unistd.h:177:1: - RFENVG = 2 // unistd.h:171:1: - RFFDG = 4 // unistd.h:172:1: - RFFLAGS = 2416930932 // unistd.h:195:1: - RFHIGHPID = 262144 // unistd.h:184:1: - RFKERNELONLY = 268828672 // unistd.h:198:1: - RFLINUXTHPN = 65536 // unistd.h:182:1: - RFMEM = 32 // unistd.h:175:1: - RFNAMEG = 1 // unistd.h:170:1: - RFNOTEG = 8 // unistd.h:173:1: - RFNOWAIT = 64 // unistd.h:176:1: - RFPPWAIT = 2147483648 // unistd.h:192:1: - RFPROC = 16 // unistd.h:174:1: - RFPROCDESC = 268435456 // unistd.h:190:1: - RFSIGSHARE = 16384 // unistd.h:181:1: - RFSPAWN = 2147483648 // unistd.h:194:1: - RFSTOPPED = 131072 // unistd.h:183:1: - RFTHREAD = 8192 // unistd.h:180:1: - RFTSIGMASK = 0xFF // unistd.h:187:1: - RFTSIGSHIFT = 20 // unistd.h:186:1: - RFTSIGZMB = 524288 // unistd.h:185:1: - R_OK = 0x04 // unistd.h:105:1: - SEEK_CUR = 1 // unistd.h:110:1: - SEEK_DATA = 3 // unistd.h:114:1: - SEEK_END = 2 // unistd.h:111:1: - SEEK_HOLE = 4 // unistd.h:115:1: - SEEK_SET = 0 // unistd.h:109:1: - STDERR_FILENO = 2 // unistd.h:81:1: - STDIN_FILENO = 0 // unistd.h:79:1: - STDOUT_FILENO = 1 // unistd.h:80:1: - SWAPOFF_FORCE = 0x00000001 // unistd.h:200:1: - W_OK = 0x02 // unistd.h:104:1: - X_OK = 0x01 // unistd.h:103:1: - X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // _endian.h:47:1: - X_BLKCNT_T_DECLARED = 0 // types.h:90:1: - X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // _endian.h:40:1: - X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: - X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: - X_CLOCKID_T_DECLARED = 0 // types.h:100:1: - X_CLOCK_T_DECLARED = 0 // types.h:95:1: - X_CS_PATH = 1 // unistd.h:302:1: - X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:306:1: - X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:307:1: - X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:308:1: - X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:309:1: - X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:310:1: - X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:311:1: - X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:312:1: - X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:313:1: - X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:314:1: - X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:315:1: - X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:316:1: - X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:317:1: - X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:318:1: - X_DEV_T_DECLARED = 0 // types.h:108:1: - X_FFLAGS_T_DECLARED = 0 // types.h:113:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: - X_FTRUNCATE_DECLARED = 0 // types.h:417:1: - X_GETOPT_DECLARED = 0 // unistd.h:378:1: - X_GID_T_DECLARED = 0 // types.h:126:1: - X_ID_T_DECLARED = 0 // types.h:141:1: - X_ILP32 = 1 // :1:1: - X_INO_T_DECLARED = 0 // types.h:146:1: - X_INT16_T_DECLARED = 0 // _stdint.h:42:1: - X_INT32_T_DECLARED = 0 // _stdint.h:47:1: - X_INT64_T_DECLARED = 0 // _stdint.h:52:1: - X_INT8_T_DECLARED = 0 // _stdint.h:37:1: - X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: - X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: - X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: - X_IN_PORT_T_DECLARED = 0 // types.h:136:1: - X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LSEEK_DECLARED = 0 // types.h:421:1: - X_LWPID_T_DECLARED = 0 // types.h:156:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MKDTEMP_DECLARED = 0 // unistd.h:528:1: - X_MKNOD_DECLARED = 0 // unistd.h:532:1: - X_MKSTEMP_DECLARED = 0 // unistd.h:536:1: - X_MKTEMP_DECLARED = 0 // unistd.h:541:1: - X_MMAP_DECLARED = 0 // types.h:425:1: - X_MODE_T_DECLARED = 0 // types.h:161:1: - X_MQD_T_DECLARED = 0 // types.h:227:1: - X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF64_T_DECLARED = 0 // types.h:181:1: - X_OFF_T_DECLARED = 0 // types.h:176:1: - X_OPTRESET_DECLARED = 0 // unistd.h:592:1: - X_PC_ACL_EXTENDED = 59 // unistd.h:153:1: - X_PC_ACL_NFS4 = 64 // unistd.h:158:1: - X_PC_ACL_PATH_MAX = 60 // unistd.h:154:1: - X_PC_ALLOC_SIZE_MIN = 10 // unistd.h:143:1: - X_PC_ASYNC_IO = 53 // unistd.h:137:1: - X_PC_CAP_PRESENT = 61 // unistd.h:155:1: - X_PC_CHOWN_RESTRICTED = 7 // unistd.h:132:1: - X_PC_FILESIZEBITS = 12 // unistd.h:144:1: - X_PC_INF_PRESENT = 62 // unistd.h:156:1: - X_PC_LINK_MAX = 1 // unistd.h:126:1: - X_PC_MAC_PRESENT = 63 // unistd.h:157:1: - X_PC_MAX_CANON = 2 // unistd.h:127:1: - X_PC_MAX_INPUT = 3 // unistd.h:128:1: - X_PC_MIN_HOLE_SIZE = 21 // unistd.h:162:1: - X_PC_NAME_MAX = 4 // unistd.h:129:1: - X_PC_NO_TRUNC = 8 // unistd.h:133:1: - X_PC_PATH_MAX = 5 // unistd.h:130:1: - X_PC_PIPE_BUF = 6 // unistd.h:131:1: - X_PC_PRIO_IO = 54 // unistd.h:138:1: - X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:145:1: - X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:146:1: - X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:147:1: - X_PC_REC_XFER_ALIGN = 17 // unistd.h:148:1: - X_PC_SYMLINK_MAX = 18 // unistd.h:149:1: - X_PC_SYNC_IO = 55 // unistd.h:139:1: - X_PC_VDISABLE = 9 // unistd.h:134:1: - X_PDP_ENDIAN = 3412 // _endian.h:48:1: - X_PID_T_DECLARED = 0 // types.h:186:1: - X_POSIX2_CHAR_TERM = 1 // unistd.h:127:1: - X_POSIX2_C_BIND = 200112 // unistd.h:125:1: - X_POSIX2_C_DEV = -1 // unistd.h:126:1: - X_POSIX2_FORT_DEV = -1 // unistd.h:128:1: - X_POSIX2_FORT_RUN = 200112 // unistd.h:129:1: - X_POSIX2_LOCALEDEF = -1 // unistd.h:130:1: - X_POSIX2_PBS = -1 // unistd.h:131:1: - X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:132:1: - X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:133:1: - X_POSIX2_PBS_LOCATE = -1 // unistd.h:134:1: - X_POSIX2_PBS_MESSAGE = -1 // unistd.h:135:1: - X_POSIX2_PBS_TRACK = -1 // unistd.h:136:1: - X_POSIX2_SW_DEV = -1 // unistd.h:137:1: - X_POSIX2_UPE = 200112 // unistd.h:138:1: - X_POSIX2_VERSION = 199212 // unistd.h:154:1: - X_POSIX_ADVISORY_INFO = 200112 // unistd.h:54:1: - X_POSIX_ASYNCHRONOUS_IO = 200112 // unistd.h:55:1: - X_POSIX_BARRIERS = 200112 // unistd.h:104:1: - X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:56:1: - X_POSIX_CLOCK_SELECTION = -1 // unistd.h:57:1: - X_POSIX_CPUTIME = 200112 // unistd.h:105:1: - X_POSIX_FSYNC = 200112 // unistd.h:59:1: - X_POSIX_IPV6 = 0 // unistd.h:60:1: - X_POSIX_JOB_CONTROL = 1 // unistd.h:61:1: - X_POSIX_MAPPED_FILES = 200112 // unistd.h:62:1: - X_POSIX_MEMLOCK = -1 // unistd.h:63:1: - X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:64:1: - X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:65:1: - X_POSIX_MESSAGE_PASSING = 200112 // unistd.h:66:1: - X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:67:1: - X_POSIX_NO_TRUNC = 1 // unistd.h:68:1: - X_POSIX_PRIORITIZED_IO = -1 // unistd.h:69:1: - X_POSIX_PRIORITY_SCHEDULING = 0 // unistd.h:70:1: - X_POSIX_RAW_SOCKETS = 200112 // unistd.h:71:1: - X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:106:1: - X_POSIX_REALTIME_SIGNALS = 200112 // unistd.h:72:1: - X_POSIX_REGEXP = 1 // unistd.h:107:1: - X_POSIX_SEMAPHORES = 200112 // unistd.h:73:1: - X_POSIX_SHARED_MEMORY_OBJECTS = 200112 // unistd.h:74:1: - X_POSIX_SHELL = 1 // unistd.h:108:1: - X_POSIX_SPAWN = 200112 // unistd.h:109:1: - X_POSIX_SPIN_LOCKS = 200112 // unistd.h:110:1: - X_POSIX_SPORADIC_SERVER = -1 // unistd.h:75:1: - X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:76:1: - X_POSIX_THREADS = 200112 // unistd.h:120:1: - X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:111:1: - X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:112:1: - X_POSIX_THREAD_CPUTIME = 200112 // unistd.h:113:1: - X_POSIX_THREAD_PRIORITY_SCHEDULING = 200112 // unistd.h:116:1: - X_POSIX_THREAD_PRIO_INHERIT = 200112 // unistd.h:114:1: - X_POSIX_THREAD_PRIO_PROTECT = 200112 // unistd.h:115:1: - X_POSIX_THREAD_PROCESS_SHARED = 200112 // unistd.h:117:1: - X_POSIX_THREAD_SAFE_FUNCTIONS = -1 // unistd.h:118:1: - X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:119:1: - X_POSIX_TIMEOUTS = 200112 // unistd.h:77:1: - X_POSIX_TIMERS = 200112 // unistd.h:78:1: - X_POSIX_TRACE = -1 // unistd.h:121:1: - X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:122:1: - X_POSIX_TRACE_INHERIT = -1 // unistd.h:123:1: - X_POSIX_TRACE_LOG = -1 // unistd.h:124:1: - X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:79:1: - X_POSIX_VDISABLE = 0xff // unistd.h:80:1: - X_POSIX_VERSION = 200112 // unistd.h:99:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // _endian.h:55:1: - X_QUAD_LOWWORD = 0 // _endian.h:56:1: - X_RLIM_T_DECLARED = 0 // types.h:193:1: - X_SC_2_CHAR_TERM = 20 // unistd.h:184:1: - X_SC_2_C_BIND = 18 // unistd.h:182:1: - X_SC_2_C_DEV = 19 // unistd.h:183:1: - X_SC_2_FORT_DEV = 21 // unistd.h:185:1: - X_SC_2_FORT_RUN = 22 // unistd.h:186:1: - X_SC_2_LOCALEDEF = 23 // unistd.h:187:1: - X_SC_2_PBS = 59 // unistd.h:222:1: - X_SC_2_PBS_ACCOUNTING = 60 // unistd.h:223:1: - X_SC_2_PBS_CHECKPOINT = 61 // unistd.h:224:1: - X_SC_2_PBS_LOCATE = 62 // unistd.h:225:1: - X_SC_2_PBS_MESSAGE = 63 // unistd.h:226:1: - X_SC_2_PBS_TRACK = 64 // unistd.h:227:1: - X_SC_2_SW_DEV = 24 // unistd.h:188:1: - X_SC_2_UPE = 25 // unistd.h:189:1: - X_SC_2_VERSION = 17 // unistd.h:181:1: - X_SC_ADVISORY_INFO = 65 // unistd.h:228:1: - X_SC_AIO_LISTIO_MAX = 42 // unistd.h:208:1: - X_SC_AIO_MAX = 43 // unistd.h:209:1: - X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:210:1: - X_SC_ARG_MAX = 1 // unistd.h:165:1: - X_SC_ASYNCHRONOUS_IO = 28 // unistd.h:194:1: - X_SC_ATEXIT_MAX = 107 // unistd.h:276:1: - X_SC_BARRIERS = 66 // unistd.h:229:1: - X_SC_BC_BASE_MAX = 9 // unistd.h:173:1: - X_SC_BC_DIM_MAX = 10 // unistd.h:174:1: - X_SC_BC_SCALE_MAX = 11 // unistd.h:175:1: - X_SC_BC_STRING_MAX = 12 // unistd.h:176:1: - X_SC_CHILD_MAX = 2 // unistd.h:166:1: - X_SC_CLK_TCK = 3 // unistd.h:167:1: - X_SC_CLOCK_SELECTION = 67 // unistd.h:230:1: - X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:177:1: - X_SC_CPUSET_SIZE = 122 // unistd.h:294:1: - X_SC_CPUTIME = 68 // unistd.h:231:1: - X_SC_DELAYTIMER_MAX = 45 // unistd.h:211:1: - X_SC_EXPR_NEST_MAX = 14 // unistd.h:178:1: - X_SC_FILE_LOCKING = 69 // unistd.h:232:1: - X_SC_FSYNC = 38 // unistd.h:204:1: - X_SC_GETGR_R_SIZE_MAX = 70 // unistd.h:233:1: - X_SC_GETPW_R_SIZE_MAX = 71 // unistd.h:234:1: - X_SC_HOST_NAME_MAX = 72 // unistd.h:235:1: - X_SC_IOV_MAX = 56 // unistd.h:277:1: - X_SC_IPV6 = 118 // unistd.h:270:1: - X_SC_JOB_CONTROL = 6 // unistd.h:170:1: - X_SC_LINE_MAX = 15 // unistd.h:179:1: - X_SC_LOGIN_NAME_MAX = 73 // unistd.h:236:1: - X_SC_MAPPED_FILES = 29 // unistd.h:195:1: - X_SC_MEMLOCK = 30 // unistd.h:196:1: - X_SC_MEMLOCK_RANGE = 31 // unistd.h:197:1: - X_SC_MEMORY_PROTECTION = 32 // unistd.h:198:1: - X_SC_MESSAGE_PASSING = 33 // unistd.h:199:1: - X_SC_MONOTONIC_CLOCK = 74 // unistd.h:237:1: - X_SC_MQ_OPEN_MAX = 46 // unistd.h:212:1: - X_SC_MQ_PRIO_MAX = 75 // unistd.h:238:1: - X_SC_NGROUPS_MAX = 4 // unistd.h:168:1: - X_SC_NPROCESSORS_CONF = 57 // unistd.h:292:1: - X_SC_NPROCESSORS_ONLN = 58 // unistd.h:293:1: - X_SC_OPEN_MAX = 5 // unistd.h:169:1: - X_SC_PAGESIZE = 47 // unistd.h:213:1: - X_SC_PAGE_SIZE = 47 // unistd.h:278:1: - X_SC_PHYS_PAGES = 121 // unistd.h:298:1: - X_SC_PRIORITIZED_IO = 34 // unistd.h:200:1: - X_SC_PRIORITY_SCHEDULING = 35 // unistd.h:201:1: - X_SC_RAW_SOCKETS = 119 // unistd.h:271:1: - X_SC_READER_WRITER_LOCKS = 76 // unistd.h:239:1: - X_SC_REALTIME_SIGNALS = 36 // unistd.h:202:1: - X_SC_REGEXP = 77 // unistd.h:240:1: - X_SC_RE_DUP_MAX = 16 // unistd.h:180:1: - X_SC_RTSIG_MAX = 48 // unistd.h:214:1: - X_SC_SAVED_IDS = 7 // unistd.h:171:1: - X_SC_SEMAPHORES = 37 // unistd.h:203:1: - X_SC_SEM_NSEMS_MAX = 49 // unistd.h:215:1: - X_SC_SEM_VALUE_MAX = 50 // unistd.h:216:1: - X_SC_SHARED_MEMORY_OBJECTS = 39 // unistd.h:205:1: - X_SC_SHELL = 78 // unistd.h:241:1: - X_SC_SIGQUEUE_MAX = 51 // unistd.h:217:1: - X_SC_SPAWN = 79 // unistd.h:242:1: - X_SC_SPIN_LOCKS = 80 // unistd.h:243:1: - X_SC_SPORADIC_SERVER = 81 // unistd.h:244:1: - X_SC_STREAM_MAX = 26 // unistd.h:190:1: - X_SC_SYMLOOP_MAX = 120 // unistd.h:272:1: - X_SC_SYNCHRONIZED_IO = 40 // unistd.h:206:1: - X_SC_THREADS = 96 // unistd.h:259:1: - X_SC_THREAD_ATTR_STACKADDR = 82 // unistd.h:245:1: - X_SC_THREAD_ATTR_STACKSIZE = 83 // unistd.h:246:1: - X_SC_THREAD_CPUTIME = 84 // unistd.h:247:1: - X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 // unistd.h:248:1: - X_SC_THREAD_KEYS_MAX = 86 // unistd.h:249:1: - X_SC_THREAD_PRIORITY_SCHEDULING = 89 // unistd.h:252:1: - X_SC_THREAD_PRIO_INHERIT = 87 // unistd.h:250:1: - X_SC_THREAD_PRIO_PROTECT = 88 // unistd.h:251:1: - X_SC_THREAD_PROCESS_SHARED = 90 // unistd.h:253:1: - X_SC_THREAD_SAFE_FUNCTIONS = 91 // unistd.h:254:1: - X_SC_THREAD_SPORADIC_SERVER = 92 // unistd.h:255:1: - X_SC_THREAD_STACK_MIN = 93 // unistd.h:256:1: - X_SC_THREAD_THREADS_MAX = 94 // unistd.h:257:1: - X_SC_TIMEOUTS = 95 // unistd.h:258:1: - X_SC_TIMERS = 41 // unistd.h:207:1: - X_SC_TIMER_MAX = 52 // unistd.h:218:1: - X_SC_TRACE = 97 // unistd.h:260:1: - X_SC_TRACE_EVENT_FILTER = 98 // unistd.h:261:1: - X_SC_TRACE_INHERIT = 99 // unistd.h:262:1: - X_SC_TRACE_LOG = 100 // unistd.h:263:1: - X_SC_TTY_NAME_MAX = 101 // unistd.h:264:1: - X_SC_TYPED_MEMORY_OBJECTS = 102 // unistd.h:265:1: - X_SC_TZNAME_MAX = 27 // unistd.h:191:1: - X_SC_V6_ILP32_OFF32 = 103 // unistd.h:266:1: - X_SC_V6_ILP32_OFFBIG = 104 // unistd.h:267:1: - X_SC_V6_LP64_OFF64 = 105 // unistd.h:268:1: - X_SC_V6_LPBIG_OFFBIG = 106 // unistd.h:269:1: - X_SC_VERSION = 8 // unistd.h:172:1: - X_SC_XOPEN_CRYPT = 108 // unistd.h:279:1: - X_SC_XOPEN_ENH_I18N = 109 // unistd.h:280:1: - X_SC_XOPEN_LEGACY = 110 // unistd.h:281:1: - X_SC_XOPEN_REALTIME = 111 // unistd.h:282:1: - X_SC_XOPEN_REALTIME_THREADS = 112 // unistd.h:283:1: - X_SC_XOPEN_SHM = 113 // unistd.h:284:1: - X_SC_XOPEN_STREAMS = 114 // unistd.h:285:1: - X_SC_XOPEN_UNIX = 115 // unistd.h:286:1: - X_SC_XOPEN_VERSION = 116 // unistd.h:287:1: - X_SC_XOPEN_XCU_VERSION = 117 // unistd.h:288:1: - X_SELECT_DECLARED = 0 // select.h:103:1: - X_SIGSET_T_DECLARED = 0 // select.h:50:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // types.h:202:1: - X_SSIZE_T_DECLARED = 0 // types.h:207:1: - X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: - X_SWAB_DECLARED = 0 // unistd.h:461:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SELECT_H_ = 0 // select.h:35:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: - X_SYS_TYPES_H_ = 0 // types.h:41:1: - X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: - X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // types.h:222:1: - X_TIME_T_DECLARED = 0 // types.h:217:1: - X_TRUNCATE_DECLARED = 0 // types.h:429:1: - X_UID_T_DECLARED = 0 // types.h:234:1: - X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: - X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: - X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: - X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: - X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: - X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: - X_UNISTD_H_ = 0 // unistd.h:36:1: - X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_V6_ILP32_OFF32 = -1 // unistd.h:139:1: - X_V6_ILP32_OFFBIG = 0 // unistd.h:140:1: - X_V6_LP64_OFF64 = 0 // unistd.h:141:1: - X_V6_LPBIG_OFFBIG = -1 // unistd.h:142:1: - X_XOPEN_CRYPT = -1 // unistd.h:145:1: - X_XOPEN_ENH_I18N = -1 // unistd.h:146:1: - X_XOPEN_LEGACY = -1 // unistd.h:147:1: - X_XOPEN_REALTIME = -1 // unistd.h:148:1: - X_XOPEN_REALTIME_THREADS = -1 // unistd.h:149:1: - X_XOPEN_SHM = 1 // unistd.h:83:1: - X_XOPEN_STREAMS = -1 // unistd.h:84:1: - X_XOPEN_UNIX = -1 // unistd.h:150:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + F_LOCK = 1 // unistd.h:48:1: + F_OK = 0 // unistd.h:49:1: + F_TEST = 3 // unistd.h:50:1: + F_TLOCK = 2 // unistd.h:49:1: + F_ULOCK = 0 // unistd.h:47:1: + KBIND_BLOCK_MAX = 2 // unistd.h:77:1: + KBIND_DATA_MAX = 24 // unistd.h:78:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + L_INCR = 1 // unistd.h:62:1: + L_SET = 0 // unistd.h:61:1: + L_XTND = 2 // unistd.h:63:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + R_OK = 0x04 // unistd.h:52:1: + SEEK_CUR = 1 // unistd.h:56:1: + SEEK_END = 2 // unistd.h:57:1: + SEEK_SET = 0 // unistd.h:55:1: + STDERR_FILENO = 2 // unistd.h:44:1: + STDIN_FILENO = 0 // unistd.h:42:1: + STDOUT_FILENO = 1 // unistd.h:43:1: + W_OK = 0x02 // unistd.h:51:1: + X_OK = 0x01 // unistd.h:50:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_CS_PATH = 1 // unistd.h:286:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:289:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:290:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:291:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:292:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:293:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:294:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:295:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:296:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:297:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:298:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:299:1: + X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 16 // unistd.h:301:1: + X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 17 // unistd.h:302:1: + X_CS_POSIX_V7_ILP32_OFF32_LIBS = 18 // unistd.h:303:1: + X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 19 // unistd.h:304:1: + X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 20 // unistd.h:305:1: + X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 21 // unistd.h:306:1: + X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 22 // unistd.h:307:1: + X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 23 // unistd.h:308:1: + X_CS_POSIX_V7_LP64_OFF64_LIBS = 24 // unistd.h:309:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 25 // unistd.h:310:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 26 // unistd.h:311:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 27 // unistd.h:312:1: + X_CS_POSIX_V7_THREADS_CFLAGS = 28 // unistd.h:313:1: + X_CS_POSIX_V7_THREADS_LDFLAGS = 29 // unistd.h:314:1: + X_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 30 // unistd.h:315:1: + X_CS_V6_ENV = 15 // unistd.h:300:1: + X_CS_V7_ENV = 31 // unistd.h:316:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_GETOPT_DEFINED_ = 0 // unistd.h:385:1: + X_ILP32 = 1 // :1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_INTPTR_T_DEFINED_ = 0 // unistd.h:319:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PC_2_SYMLINKS = 10 // unistd.h:93:1: + X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: + X_PC_ASYNC_IO = 12 // unistd.h:95:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:90:1: + X_PC_FILESIZEBITS = 13 // unistd.h:96:1: + X_PC_LINK_MAX = 1 // unistd.h:84:1: + X_PC_MAX_CANON = 2 // unistd.h:85:1: + X_PC_MAX_INPUT = 3 // unistd.h:86:1: + X_PC_NAME_MAX = 4 // unistd.h:87:1: + X_PC_NO_TRUNC = 8 // unistd.h:91:1: + X_PC_PATH_MAX = 5 // unistd.h:88:1: + X_PC_PIPE_BUF = 6 // unistd.h:89:1: + X_PC_PRIO_IO = 14 // unistd.h:97:1: + X_PC_REC_INCR_XFER_SIZE = 15 // unistd.h:98:1: + X_PC_REC_MAX_XFER_SIZE = 16 // unistd.h:99:1: + X_PC_REC_MIN_XFER_SIZE = 17 // unistd.h:100:1: + X_PC_REC_XFER_ALIGN = 18 // unistd.h:101:1: + X_PC_SYMLINK_MAX = 19 // unistd.h:102:1: + X_PC_SYNC_IO = 20 // unistd.h:103:1: + X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: + X_PC_VDISABLE = 9 // unistd.h:92:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: + X_POSIX2_C_BIND = 200112 // unistd.h:114:1: + X_POSIX2_C_DEV = -1 // unistd.h:115:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:117:1: + X_POSIX2_FORT_RUN = -1 // unistd.h:118:1: + X_POSIX2_LOCALEDEF = -1 // unistd.h:119:1: + X_POSIX2_PBS = -1 // unistd.h:120:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:121:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:122:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:123:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:124:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:125:1: + X_POSIX2_SW_DEV = 200112 // unistd.h:126:1: + X_POSIX2_UPE = 200112 // unistd.h:127:1: + X_POSIX2_VERSION = 200809 // unistd.h:148:1: + X_POSIX_ADVISORY_INFO = -1 // unistd.h:65:1: + X_POSIX_ASYNCHRONOUS_IO = -1 // unistd.h:66:1: + X_POSIX_ASYNC_IO = -1 // unistd.h:41:1: + X_POSIX_BARRIERS = 200112 // unistd.h:67:1: + X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:68:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:69:1: + X_POSIX_CPUTIME = 200809 // unistd.h:70:1: + X_POSIX_FSYNC = 200112 // unistd.h:71:1: + X_POSIX_IPV6 = 0 // unistd.h:72:1: + X_POSIX_JOB_CONTROL = 1 // unistd.h:73:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:74:1: + X_POSIX_MEMLOCK = 200112 // unistd.h:75:1: + X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:76:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:77:1: + X_POSIX_MESSAGE_PASSING = -1 // unistd.h:78:1: + X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:79:1: + X_POSIX_NO_TRUNC = 1 // unistd.h:80:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:81:1: + X_POSIX_PRIORITY_SCHEDULING = -1 // unistd.h:82:1: + X_POSIX_PRIO_IO = -1 // unistd.h:42:1: + X_POSIX_RAW_SOCKETS = 200112 // unistd.h:83:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:84:1: + X_POSIX_REALTIME_SIGNALS = -1 // unistd.h:85:1: + X_POSIX_REGEXP = 1 // unistd.h:86:1: + X_POSIX_SAVED_IDS = 1 // unistd.h:87:1: + X_POSIX_SEMAPHORES = 200112 // unistd.h:88:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // unistd.h:89:1: + X_POSIX_SHELL = 1 // unistd.h:90:1: + X_POSIX_SPAWN = 200112 // unistd.h:91:1: + X_POSIX_SPIN_LOCKS = 200112 // unistd.h:92:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:93:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:94:1: + X_POSIX_SYNC_IO = -1 // unistd.h:43:1: + X_POSIX_THREADS = 200112 // unistd.h:106:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:95:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:96:1: + X_POSIX_THREAD_CPUTIME = 200809 // unistd.h:97:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 // unistd.h:100:1: + X_POSIX_THREAD_PRIO_INHERIT = -1 // unistd.h:98:1: + X_POSIX_THREAD_PRIO_PROTECT = -1 // unistd.h:99:1: + X_POSIX_THREAD_PROCESS_SHARED = -1 // unistd.h:101:1: + X_POSIX_THREAD_ROBUST_PRIO_INHERIT = -1 // unistd.h:102:1: + X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // unistd.h:103:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:104:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:105:1: + X_POSIX_TIMEOUTS = 200112 // unistd.h:107:1: + X_POSIX_TIMERS = -1 // unistd.h:108:1: + X_POSIX_TRACE = -1 // unistd.h:109:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:110:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:111:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:112:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:113:1: + X_POSIX_V6_ILP32_OFF32 = -1 // unistd.h:128:1: + X_POSIX_V6_ILP32_OFFBIG = 0 // unistd.h:129:1: + X_POSIX_V6_LP64_OFF64 = 0 // unistd.h:130:1: + X_POSIX_V6_LPBIG_OFFBIG = 0 // unistd.h:131:1: + X_POSIX_V7_ILP32_OFF32 = -1 // unistd.h:132:1: + X_POSIX_V7_ILP32_OFFBIG = 0 // unistd.h:133:1: + X_POSIX_V7_LP64_OFF64 = 0 // unistd.h:134:1: + X_POSIX_V7_LPBIG_OFFBIG = 0 // unistd.h:135:1: + X_POSIX_VDISABLE = 255 // unistd.h:40:1: + X_POSIX_VERSION = 200809 // unistd.h:46:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:172:1: + X_SC_2_C_BIND = 18 // unistd.h:170:1: + X_SC_2_C_DEV = 19 // unistd.h:171:1: + X_SC_2_FORT_DEV = 21 // unistd.h:173:1: + X_SC_2_FORT_RUN = 22 // unistd.h:174:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:175:1: + X_SC_2_PBS = 35 // unistd.h:188:1: + X_SC_2_PBS_ACCOUNTING = 36 // unistd.h:189:1: + X_SC_2_PBS_CHECKPOINT = 37 // unistd.h:190:1: + X_SC_2_PBS_LOCATE = 38 // unistd.h:191:1: + X_SC_2_PBS_MESSAGE = 39 // unistd.h:192:1: + X_SC_2_PBS_TRACK = 40 // unistd.h:193:1: + X_SC_2_SW_DEV = 24 // unistd.h:176:1: + X_SC_2_UPE = 25 // unistd.h:177:1: + X_SC_2_VERSION = 17 // unistd.h:169:1: + X_SC_ADVISORY_INFO = 41 // unistd.h:194:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:195:1: + X_SC_AIO_MAX = 43 // unistd.h:196:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:197:1: + X_SC_ARG_MAX = 1 // unistd.h:153:1: + X_SC_ASYNCHRONOUS_IO = 45 // unistd.h:198:1: + X_SC_ATEXIT_MAX = 46 // unistd.h:199:1: + X_SC_AVPHYS_PAGES = 501 // unistd.h:281:1: + X_SC_BARRIERS = 47 // unistd.h:200:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:161:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:162:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:163:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:164:1: + X_SC_CHILD_MAX = 2 // unistd.h:154:1: + X_SC_CLK_TCK = 3 // unistd.h:155:1: + X_SC_CLOCK_SELECTION = 48 // unistd.h:201:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:165:1: + X_SC_CPUTIME = 49 // unistd.h:202:1: + X_SC_DELAYTIMER_MAX = 50 // unistd.h:203:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:166:1: + X_SC_FSYNC = 29 // unistd.h:182:1: + X_SC_GETGR_R_SIZE_MAX = 100 // unistd.h:253:1: + X_SC_GETPW_R_SIZE_MAX = 101 // unistd.h:254:1: + X_SC_HOST_NAME_MAX = 33 // unistd.h:186:1: + X_SC_IOV_MAX = 51 // unistd.h:204:1: + X_SC_IPV6 = 52 // unistd.h:205:1: + X_SC_JOB_CONTROL = 6 // unistd.h:158:1: + X_SC_LINE_MAX = 15 // unistd.h:167:1: + X_SC_LOGIN_NAME_MAX = 102 // unistd.h:255:1: + X_SC_MAPPED_FILES = 53 // unistd.h:206:1: + X_SC_MEMLOCK = 54 // unistd.h:207:1: + X_SC_MEMLOCK_RANGE = 55 // unistd.h:208:1: + X_SC_MEMORY_PROTECTION = 56 // unistd.h:209:1: + X_SC_MESSAGE_PASSING = 57 // unistd.h:210:1: + X_SC_MONOTONIC_CLOCK = 34 // unistd.h:187:1: + X_SC_MQ_OPEN_MAX = 58 // unistd.h:211:1: + X_SC_MQ_PRIO_MAX = 59 // unistd.h:212:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:156:1: + X_SC_NPROCESSORS_CONF = 502 // unistd.h:282:1: + X_SC_NPROCESSORS_ONLN = 503 // unistd.h:283:1: + X_SC_OPEN_MAX = 5 // unistd.h:157:1: + X_SC_PAGESIZE = 28 // unistd.h:180:1: + X_SC_PAGE_SIZE = 28 // unistd.h:181:1: + X_SC_PHYS_PAGES = 500 // unistd.h:280:1: + X_SC_PRIORITIZED_IO = 60 // unistd.h:213:1: + X_SC_PRIORITY_SCHEDULING = 61 // unistd.h:214:1: + X_SC_RAW_SOCKETS = 62 // unistd.h:215:1: + X_SC_READER_WRITER_LOCKS = 63 // unistd.h:216:1: + X_SC_REALTIME_SIGNALS = 64 // unistd.h:217:1: + X_SC_REGEXP = 65 // unistd.h:218:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:168:1: + X_SC_RTSIG_MAX = 66 // unistd.h:219:1: + X_SC_SAVED_IDS = 7 // unistd.h:159:1: + X_SC_SEMAPHORES = 67 // unistd.h:220:1: + X_SC_SEM_NSEMS_MAX = 31 // unistd.h:184:1: + X_SC_SEM_VALUE_MAX = 32 // unistd.h:185:1: + X_SC_SHARED_MEMORY_OBJECTS = 68 // unistd.h:221:1: + X_SC_SHELL = 69 // unistd.h:222:1: + X_SC_SIGQUEUE_MAX = 70 // unistd.h:223:1: + X_SC_SPAWN = 71 // unistd.h:224:1: + X_SC_SPIN_LOCKS = 72 // unistd.h:225:1: + X_SC_SPORADIC_SERVER = 73 // unistd.h:226:1: + X_SC_SS_REPL_MAX = 74 // unistd.h:227:1: + X_SC_STREAM_MAX = 26 // unistd.h:178:1: + X_SC_SYMLOOP_MAX = 76 // unistd.h:229:1: + X_SC_SYNCHRONIZED_IO = 75 // unistd.h:228:1: + X_SC_THREADS = 91 // unistd.h:244:1: + X_SC_THREAD_ATTR_STACKADDR = 77 // unistd.h:230:1: + X_SC_THREAD_ATTR_STACKSIZE = 78 // unistd.h:231:1: + X_SC_THREAD_CPUTIME = 79 // unistd.h:232:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 80 // unistd.h:233:1: + X_SC_THREAD_KEYS_MAX = 81 // unistd.h:234:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 84 // unistd.h:237:1: + X_SC_THREAD_PRIO_INHERIT = 82 // unistd.h:235:1: + X_SC_THREAD_PRIO_PROTECT = 83 // unistd.h:236:1: + X_SC_THREAD_PROCESS_SHARED = 85 // unistd.h:238:1: + X_SC_THREAD_ROBUST_PRIO_INHERIT = 86 // unistd.h:239:1: + X_SC_THREAD_ROBUST_PRIO_PROTECT = 87 // unistd.h:240:1: + X_SC_THREAD_SAFE_FUNCTIONS = 103 // unistd.h:256:1: + X_SC_THREAD_SPORADIC_SERVER = 88 // unistd.h:241:1: + X_SC_THREAD_STACK_MIN = 89 // unistd.h:242:1: + X_SC_THREAD_THREADS_MAX = 90 // unistd.h:243:1: + X_SC_TIMEOUTS = 92 // unistd.h:245:1: + X_SC_TIMERS = 94 // unistd.h:247:1: + X_SC_TIMER_MAX = 93 // unistd.h:246:1: + X_SC_TRACE = 95 // unistd.h:248:1: + X_SC_TRACE_EVENT_FILTER = 96 // unistd.h:249:1: + X_SC_TRACE_EVENT_NAME_MAX = 97 // unistd.h:250:1: + X_SC_TRACE_INHERIT = 98 // unistd.h:251:1: + X_SC_TRACE_LOG = 99 // unistd.h:252:1: + X_SC_TRACE_NAME_MAX = 104 // unistd.h:257:1: + X_SC_TRACE_SYS_MAX = 105 // unistd.h:258:1: + X_SC_TRACE_USER_EVENT_MAX = 106 // unistd.h:259:1: + X_SC_TTY_NAME_MAX = 107 // unistd.h:260:1: + X_SC_TYPED_MEMORY_OBJECTS = 108 // unistd.h:261:1: + X_SC_TZNAME_MAX = 27 // unistd.h:179:1: + X_SC_V6_ILP32_OFF32 = 109 // unistd.h:262:1: + X_SC_V6_ILP32_OFFBIG = 110 // unistd.h:263:1: + X_SC_V6_LP64_OFF64 = 111 // unistd.h:264:1: + X_SC_V6_LPBIG_OFFBIG = 112 // unistd.h:265:1: + X_SC_V7_ILP32_OFF32 = 113 // unistd.h:266:1: + X_SC_V7_ILP32_OFFBIG = 114 // unistd.h:267:1: + X_SC_V7_LP64_OFF64 = 115 // unistd.h:268:1: + X_SC_V7_LPBIG_OFFBIG = 116 // unistd.h:269:1: + X_SC_VERSION = 8 // unistd.h:160:1: + X_SC_XOPEN_CRYPT = 117 // unistd.h:270:1: + X_SC_XOPEN_ENH_I18N = 118 // unistd.h:271:1: + X_SC_XOPEN_LEGACY = 119 // unistd.h:272:1: + X_SC_XOPEN_REALTIME = 120 // unistd.h:273:1: + X_SC_XOPEN_REALTIME_THREADS = 121 // unistd.h:274:1: + X_SC_XOPEN_SHM = 30 // unistd.h:183:1: + X_SC_XOPEN_STREAMS = 122 // unistd.h:275:1: + X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: + X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: + X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_UNISTD_H_ = 0 // unistd.h:36:1: + X_XOPEN_CRYPT = 1 // unistd.h:137:1: + X_XOPEN_ENH_I18N = -1 // unistd.h:138:1: + X_XOPEN_LEGACY = -1 // unistd.h:139:1: + X_XOPEN_REALTIME = -1 // unistd.h:140:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:141:1: + X_XOPEN_SHM = 1 // unistd.h:142:1: + X_XOPEN_STREAMS = -1 // unistd.h:143:1: + X_XOPEN_UNIX = -1 // unistd.h:145:1: + X_XOPEN_UUCP = -1 // unistd.h:144:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -397,11 +357,12 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: unistd.h,v 1.106 2018/07/13 09:25:22 beck Exp $ +// $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993, 1994 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1991 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 @@ -427,12 +388,54 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)unistd.h 8.12 (Berkeley) 4/27/95 -// $FreeBSD$ +// @(#)unistd.h 5.13 (Berkeley) 6/17/91 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 1982, 1986, 1991, 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. +// 3. 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. // +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -463,63 +466,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -548,123 +527,78 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. +// Delete pseudo-keywords wherever they are not available or needed. -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function acquires an exclusive or shared lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function attempts to acquire an exclusive or shared lock. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function releases a lock. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function asserts that an exclusive or shared lock is held. +// Default values. -// Function requires that an exclusive or shared lock is or is not held. - -// Function should not be analyzed. - -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1991, 1993, 1994 -// 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. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -674,28 +608,29 @@ type X__float128 = float64 /* :47:21 */ // 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. 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. // -// @(#)types.h 8.6 (Berkeley) 2/19/95 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-3-Clause +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -726,52 +661,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Machine type dependent parameters. -// - -// This file is in the public domain. -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1987, 1991 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. -// 3. 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. -// -// @(#)endian.h 7.8 (Berkeley) 4/3/91 -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -782,64 +677,24 @@ type X__float128 = float64 /* :47:21 */ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -851,11 +706,7 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 4. Neither the name of the University nor the names of its contributors +// 3. 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. // @@ -871,18 +722,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -909,349 +754,223 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ type X__uint64_t = uint64 /* _types.h:68:28 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint32 F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ - -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ - -// Additional type definitions: -// -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ - -type U_char = uint8 /* types.h:52:23 */ -type U_short = uint16 /* types.h:53:24 */ -type U_int = uint32 /* types.h:54:22 */ -type U_long = uint32 /* types.h:55:23 */ -type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility -type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility - -// XXX POSIX sized integrals that should appear only in . -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011 David E. O'Brien -// Copyright (c) 2001 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Int8_t = X__int8_t /* _stdint.h:36:19 */ - -type Int16_t = X__int16_t /* _stdint.h:41:20 */ - -type Int32_t = X__int32_t /* _stdint.h:46:20 */ - -type Int64_t = X__int64_t /* _stdint.h:51:20 */ - -type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ - -type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ - -type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ - -type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ - -type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ -type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ -type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ -type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ - -type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) -type U_int16_t = X__uint16_t /* types.h:68:20 */ -type U_int32_t = X__uint32_t /* types.h:69:20 */ -type U_int64_t = X__uint64_t /* types.h:70:20 */ - -type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) -type Quad_t = X__int64_t /* types.h:73:19 */ -type Qaddr_t = uintptr /* types.h:74:16 */ - -type Caddr_t = uintptr /* types.h:76:14 */ // core address -type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const - -type Blksize_t = X__blksize_t /* types.h:80:21 */ - -type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ -type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ -type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ - -type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ - -type Clock_t = X__clock_t /* types.h:94:19 */ +} /* _types.h:75:3 */ -type Clockid_t = X__clockid_t /* types.h:99:21 */ +// Tell sys/endian.h we have MD variants of the swap macros. -type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value -type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address +// Note that these macros evaluate their arguments several times. -type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev +// Public names -type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags +// These are specified to be function-like macros to match the spec -type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number +// POSIX names -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ +// original BSD names -type Gid_t = X__gid_t /* types.h:125:18 */ // group id +// these were exposed here before -type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address +// ancient stuff -type In_port_t = X__uint16_t /* types.h:135:20 */ +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -type Ino_t = X__ino_t /* types.h:145:18 */ // inode number +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) +type Int8_t = X__int8_t /* types.h:75:19 */ -type Mode_t = X__mode_t /* types.h:160:18 */ // permissions +type Uint8_t = X__uint8_t /* types.h:80:20 */ -type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions +type Int16_t = X__int16_t /* types.h:85:20 */ -type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count +type Uint16_t = X__uint16_t /* types.h:90:21 */ -type Off_t = X__off_t /* types.h:175:18 */ // file offset +type Int32_t = X__int32_t /* types.h:95:20 */ -type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) +type Uint32_t = X__uint32_t /* types.h:100:21 */ -type Pid_t = X__pid_t /* types.h:185:18 */ // process id +type Int64_t = X__int64_t /* types.h:105:20 */ -type Register_t = X__register_t /* types.h:189:22 */ +type Uint64_t = X__uint64_t /* types.h:110:21 */ -type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ -type Sbintime_t = X__int64_t /* types.h:196:19 */ +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ -type Segsz_t = X__segsz_t /* types.h:198:19 */ +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -type Ssize_t = X__ssize_t /* types.h:206:19 */ +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ -type Time_t = X__time_t /* types.h:216:18 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Timer_t = X__timer_t /* types.h:221:19 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Mqd_t = X__mqd_t /* types.h:226:17 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type U_register_t = X__u_register_t /* types.h:230:24 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Uid_t = X__uid_t /* types.h:233:18 */ // user id +type Timer_t = X__timer_t /* types.h:188:19 */ -type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) +type Off_t = X__off_t /* types.h:193:18 */ -type Cap_ioctl_t = uint32 /* types.h:244:23 */ +// Major, minor numbers, dev_t's. -// Types suitable for exporting physical addresses, virtual addresses -// (pointers), and memory object sizes from the kernel independent of native -// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and -// size_t in structs which contain such types that are shared with userspace. -type Kpaddr_t = X__uint64_t /* types.h:260:20 */ -type Kvaddr_t = X__uint64_t /* types.h:261:20 */ -type Ksize_t = X__uint64_t /* types.h:262:20 */ -type Kssize_t = X__int64_t /* types.h:263:19 */ +// $OpenBSD: unistd.h,v 1.31 2015/07/20 00:56:10 guenther Exp $ +// $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ -type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ -type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ -type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ -type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ -type Vm_size_t = X__vm_size_t /* types.h:269:21 */ - -type Rman_res_t = X__rman_res_t /* types.h:271:25 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 1993 +// 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 @@ -1278,11 +997,11 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// @(#)unistd.h 8.2 (Berkeley) 1/7/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -1313,458 +1032,52 @@ type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// Define the POSIX.1 version we target for compliance. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ +// access function -// sigset_t macros. +// whence values for lseek(2) -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ +// old BSD whence values for lseek(2); renamed by POSIX 1003.1 -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 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. -// 3. 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. -// -// $FreeBSD$ +// the parameters argument passed to the __tfork() syscall +type X__tfork = struct { + Ftf_tcb uintptr + Ftf_tid uintptr + Ftf_stack uintptr +} /* unistd.h:66:1 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// the parameters argument for the kbind() syscall +type X__kbind = struct { + Fkb_addr uintptr + Fkb_size Size_t +} /* unistd.h:73:1 */ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. +// the pathconf(2) variable values are part of the ABI -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// configurable pathname variables -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// All rights reserved. +// POSIX options and option groups we unconditionally do or don't +// implement. Please keep this list in alphabetical order. // -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ +// Anything which is defined as zero below **must** have an +// implementation for the corresponding sysconf() which is able to +// determine conclusively whether or not the feature is supported. +// Anything which is defined as other than -1 below **must** have +// complete headers, types, and function declarations as specified by +// the POSIX standard; however, if the relevant sysconf() function +// returns -1, the functions may be stubbed out. -// Structure returned by gettimeofday(2) system call, and used in other calls. -type Timeval = struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t -} /* _timeval.h:49:1 */ +// Define the POSIX.2 version we target for compliance. -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// the sysconf(3) variable values are part of the ABI -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// configurable system variables -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// configurable system strings -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ - -type X__fd_mask = uint32 /* select.h:44:23 */ -type Fd_mask = X__fd_mask /* select.h:46:19 */ - -type Sigset_t = X__sigset_t /* select.h:51:20 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set = Fd_set1 /* select.h:75:3 */ // select(2) - -type Crypt_data = struct { - Finitialized int32 - F__buf [256]int8 -} /* unistd.h:489:1 */ - -// getopt(3) external variable +type Intptr_t = X__intptr_t /* unistd.h:320:21 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go b/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go index 664249044b..58beafefa1 100644 --- a/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go +++ b/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go @@ -40,8 +40,8 @@ const ( X_OK = 0x01 // unistd.h:50:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_CS_PATH = 1 // unistd.h:286:1: X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: @@ -86,7 +86,7 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PC_2_SYMLINKS = 10 // unistd.h:93:1: X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: X_PC_ASYNC_IO = 12 // unistd.h:95:1: @@ -109,7 +109,7 @@ const ( X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: X_PC_VDISABLE = 9 // unistd.h:92:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: X_POSIX2_C_BIND = 200112 // unistd.h:114:1: X_POSIX2_C_DEV = -1 // unistd.h:115:1: @@ -320,8 +320,8 @@ const ( X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -329,8 +329,8 @@ const ( X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -345,7 +345,7 @@ const ( X_XOPEN_STREAMS = -1 // unistd.h:143:1: X_XOPEN_UNIX = -1 // unistd.h:145:1: X_XOPEN_UUCP = -1 // unistd.h:144:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -404,7 +404,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -701,7 +701,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -861,18 +861,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -954,27 +953,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go b/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go index 664249044b..1c18db4118 100644 --- a/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go +++ b/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o unistd/unistd_openbsd_amd64.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_openbsd_arm64.go -pkgname unistd', DO NOT EDIT. package unistd @@ -39,9 +39,9 @@ const ( W_OK = 0x02 // unistd.h:51:1: X_OK = 0x01 // unistd.h:50:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_CS_PATH = 1 // unistd.h:286:1: X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: @@ -82,11 +82,11 @@ const ( X_INTPTR_T_DEFINED_ = 0 // unistd.h:319:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PC_2_SYMLINKS = 10 // unistd.h:93:1: X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: X_PC_ASYNC_IO = 12 // unistd.h:95:1: @@ -109,7 +109,7 @@ const ( X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: X_PC_VDISABLE = 9 // unistd.h:92:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: X_POSIX2_C_BIND = 200112 // unistd.h:114:1: X_POSIX2_C_DEV = -1 // unistd.h:115:1: @@ -320,17 +320,17 @@ const ( X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -345,7 +345,7 @@ const ( X_XOPEN_STREAMS = -1 // unistd.h:143:1: X_XOPEN_UNIX = -1 // unistd.h:145:1: X_XOPEN_UUCP = -1 // unistd.h:144:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -404,7 +404,7 @@ type X__float128 = float64 /* :47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -477,10 +477,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -701,7 +698,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -733,8 +730,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -776,66 +772,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -861,18 +859,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -954,27 +951,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/unistd/unistd_windows_386.go b/vendor/modernc.org/libc/unistd/unistd_windows_386.go index 83efe51b88..db470a22fb 100644 --- a/vendor/modernc.org/libc/unistd/unistd_windows_386.go +++ b/vendor/modernc.org/libc/unistd/unistd_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname unistd', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o unistd/unistd_windows_386.go -pkgname unistd', DO NOT EDIT. package unistd @@ -15,164 +15,163 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - FTRUNCATE_DEFINED = 0 - F_OK = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - OLD_P_OVERLAY = 2 - P_DETACH = 4 - P_NOWAIT = 1 - P_NOWAITO = 3 - P_OVERLAY = 2 - P_WAIT = 0 - R_OK = 4 - SEEK_CUR = 1 - SEEK_END = 2 - SEEK_SET = 0 - STDERR_FILENO = 2 - STDIN_FILENO = 0 - STDOUT_FILENO = 1 - UNALIGNED = 0 - USE___UUIDOF = 0 - WAIT_CHILD = 0 - WAIT_GRANDCHILD = 1 - WIN32 = 1 - WINNT = 1 - WIN_PTHREADS_UNISTD_H = 0 - W_OK = 2 - X_OK = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_A_ARCH = 0x20 - X_A_HIDDEN = 0x02 - X_A_NORMAL = 0x00 - X_A_RDONLY = 0x01 - X_A_SUBDIR = 0x10 - X_A_SYSTEM = 0x04 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_GETPID_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_MEMORY_DEFINED = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_SWAB_DEFINED = 0 - X_CRT_SYSTEM_DEFINED = 0 - X_CRT_TERMINATE_DEFINED = 0 - X_CRT_WSYSTEM_DEFINED = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_FTRUNCATE = 0 - X_FILE_OFFSET_BITS_SET_LSEEK = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FINDDATA_T_DEFINED = 0 - X_FSIZE_T_DEFINED = 0 - X_INC_CORECRT_STARTUP = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_PROCESS = 0 - X_INC_STRING = 0 - X_INC_STRING_S = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IO_H_ = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_NLSCMPERROR = 2147483647 - X_NLSCMP_DEFINED = 0 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_OLD_P_OVERLAY = 2 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_POSIX_BARRIERS = 200112 - X_POSIX_CLOCK_SELECTION = 200112 - X_POSIX_READER_WRITER_LOCKS = 200112 - X_POSIX_SEMAPHORES = 200112 - X_POSIX_SPIN_LOCKS = 200112 - X_POSIX_THREADS = 200112 - X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 - X_POSIX_TIMEOUTS = 200112 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_P_DETACH = 4 - X_P_NOWAIT = 1 - X_P_NOWAITO = 3 - X_P_OVERLAY = 2 - X_P_WAIT = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIZE_T_DEFINED = 0 - X_SPAWNV_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_UNISTD_H = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WAIT_CHILD = 0 - X_WAIT_GRANDCHILD = 1 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WConst_return = 0 - X_WEXEC_DEFINED = 0 - X_WFINDDATA_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WIO_DEFINED = 0 - X_WSPAWN_DEFINED = 0 - X_WSTRING_DEFINED = 0 - X_WSTRING_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + FTRUNCATE_DEFINED = 0 // unistd.h:56:1: + F_OK = 0 // io.h:182:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + OLD_P_OVERLAY = 2 // process.h:149:1: + P_DETACH = 4 // process.h:151:1: + P_NOWAIT = 1 // process.h:147:1: + P_NOWAITO = 3 // process.h:150:1: + P_OVERLAY = 2 // process.h:148:1: + P_WAIT = 0 // process.h:146:1: + R_OK = 4 // io.h:185:1: + SEEK_CUR = 1 // unistd.h:17:1: + SEEK_END = 2 // unistd.h:18:1: + SEEK_SET = 0 // unistd.h:16:1: + STDERR_FILENO = 2 // unistd.h:25:1: + STDIN_FILENO = 0 // unistd.h:23:1: + STDOUT_FILENO = 1 // unistd.h:24:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WAIT_CHILD = 0 // process.h:152:1: + WAIT_GRANDCHILD = 1 // process.h:153:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + WIN_PTHREADS_UNISTD_H = 0 // pthread_unistd.h:24:1: + W_OK = 2 // io.h:184:1: + X_OK = 1 // io.h:183:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_A_ARCH = 0x20 // io.h:156:1: + X_A_HIDDEN = 0x02 // io.h:153:1: + X_A_NORMAL = 0x00 // io.h:151:1: + X_A_RDONLY = 0x01 // io.h:152:1: + X_A_SUBDIR = 0x10 // io.h:155:1: + X_A_SYSTEM = 0x04 // io.h:154:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1: + X_CRT_GETPID_DEFINED = 0 // process.h:157:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_MEMORY_DEFINED = 0 // string.h:44:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_SWAB_DEFINED = 0 // unistd.h:92:1: + X_CRT_SYSTEM_DEFINED = 0 // process.h:91:1: + X_CRT_TERMINATE_DEFINED = 0 // process.h:41:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WSYSTEM_DEFINED = 0 // process.h:120:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FILE_OFFSET_BITS_SET_FTRUNCATE = 0 // unistd.h:85:1: + X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FINDDATA_T_DEFINED = 0 // io.h:89:1: + X_FSIZE_T_DEFINED = 0 // io.h:30:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CORECRT_STARTUP = 0 // corecrt_startup.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_PROCESS = 0 // process.h:7:1: + X_INC_STRING = 0 // string.h:7:1: + X_INC_STRING_S = 0 // string_s.h:7:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IO_H_ = 0 // io.h:7:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NLSCMPERROR = 2147483647 // string.h:26:1: + X_NLSCMP_DEFINED = 0 // string.h:25:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_OLD_P_OVERLAY = 2 // process.h:23:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_POSIX_BARRIERS = 200112 // pthread_unistd.h:130:1: + X_POSIX_CLOCK_SELECTION = 200112 // pthread_unistd.h:173:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // pthread_unistd.h:101:1: + X_POSIX_SEMAPHORES = 200112 // pthread_unistd.h:190:1: + X_POSIX_SPIN_LOCKS = 200112 // pthread_unistd.h:115:1: + X_POSIX_THREADS = 200112 // pthread_unistd.h:81:1: + X_POSIX_TIMEOUTS = 200112 // pthread_unistd.h:145:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_P_DETACH = 4 // process.h:25:1: + X_P_NOWAIT = 1 // process.h:22:1: + X_P_NOWAITO = 3 // process.h:24:1: + X_P_OVERLAY = 2 // process.h:26:1: + X_P_WAIT = 0 // process.h:21:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPAWNV_DEFINED = 0 // process.h:83:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_UNISTD_H = 0 // unistd.h:7:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WAIT_CHILD = 0 // process.h:28:1: + X_WAIT_GRANDCHILD = 1 // process.h:29:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WConst_return = 0 // string.h:41:1: + X_WEXEC_DEFINED = 0 // process.h:96:1: + X_WFINDDATA_T_DEFINED = 0 // io.h:148:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WIO_DEFINED = 0 // io.h:295:1: + X_WSPAWN_DEFINED = 0 // process.h:108:1: + X_WSTRING_DEFINED = 0 // string.h:129:1: + X_WSTRING_S_DEFINED = 0 // string_s.h:48:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -211,6 +210,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -231,6 +235,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -271,26 +281,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -316,29 +328,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_fsize_t = uint32 /* io.h:29:25 */ type X_finddata32_t = struct { @@ -487,6 +499,11 @@ type Itimerspec = struct { type X_sigset_t = uint32 /* types.h:106:23 */ +type X_beginthread_proc_type = uintptr /* process.h:32:16 */ +type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */ + +type X_tls_callback_type = uintptr /* process.h:61:16 */ + // // Copyright (c) 2011-2016 mingw-w64 project // @@ -604,23 +621,6 @@ type X_sigset_t = uint32 /* types.h:106:23 */ // // are present. -// _SC_THREAD_SAFE_FUNCTIONS -// Affected functions are -// -// readdir_r(), -// getgrgid_r(), -// getgrnam_r(), -// getpwnam_r(), -// getpwuid_r(), -// flockfile(), -// ftrylockfile(), -// funlockfile(), -// getc_unlocked(), -// getchar_unlocked(), -// putc_unlocked(), -// putchar_unlocked(), -// strerror_r(), - // _SC_TIMEOUTS // The functions // diff --git a/vendor/modernc.org/libc/utime/capi_darwin_amd64.go b/vendor/modernc.org/libc/utime/capi_darwin_amd64.go index 0c77451610..5958f5d935 100644 --- a/vendor/modernc.org/libc/utime/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/utime/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_darwin_amd64.go -pkgname utime', DO NOT EDIT. package utime diff --git a/vendor/modernc.org/libc/utime/capi_openbsd_386.go b/vendor/modernc.org/libc/utime/capi_openbsd_386.go index 6ef1090324..a22ba57bfa 100644 --- a/vendor/modernc.org/libc/utime/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/utime/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o utime/utime_freebsd_386.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_openbsd_386.go -pkgname utime', DO NOT EDIT. package utime diff --git a/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go b/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go index 89e5113450..6b17f57633 100644 --- a/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o utime/utime_openbsd_amd64.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_openbsd_arm64.go -pkgname utime', DO NOT EDIT. package utime diff --git a/vendor/modernc.org/libc/utime/capi_windows_386.go b/vendor/modernc.org/libc/utime/capi_windows_386.go index 82bb0f63be..cd9c7c478e 100644 --- a/vendor/modernc.org/libc/utime/capi_windows_386.go +++ b/vendor/modernc.org/libc/utime/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_windows_386.go -pkgname utime', DO NOT EDIT. package utime diff --git a/vendor/modernc.org/libc/utime/utime_darwin_amd64.go b/vendor/modernc.org/libc/utime/utime_darwin_amd64.go index 7c48b350c7..b2f0ad2a31 100644 --- a/vendor/modernc.org/libc/utime/utime_darwin_amd64.go +++ b/vendor/modernc.org/libc/utime/utime_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_darwin_amd64.go -pkgname utime', DO NOT EDIT. package utime @@ -15,34 +15,34 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UINTPTR_T = 0 - X_UTIME_H_ = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // :1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_UTIME_H_ = 0 // utime.h:59:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/utime/utime_openbsd_386.go b/vendor/modernc.org/libc/utime/utime_openbsd_386.go index 69d3cc5e4c..7254516870 100644 --- a/vendor/modernc.org/libc/utime/utime_openbsd_386.go +++ b/vendor/modernc.org/libc/utime/utime_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o utime/utime_freebsd_386.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_openbsd_386.go -pkgname utime', DO NOT EDIT. package utime @@ -15,19 +15,18 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIME_T_DECLARED = 0 // utime.h:43:1: - X_UTIME_H_ = 0 // utime.h:36:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIME_T_DEFINED_ = 0 // utime.h:42:1: + X_UTIME_H_ = 0 // utime.h:36:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -39,11 +38,12 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: utime.h,v 1.7 2013/04/02 05:16:14 guenther Exp $ +// $NetBSD: utime.h,v 1.3 1994/10/26 00:56:39 cgd Exp $ + // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1990 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 @@ -69,12 +69,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)utime.h 8.1 (Berkeley) 6/2/93 -// $FreeBSD$ +// @(#)utime.h 5.4 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -105,63 +104,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -190,151 +165,80 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. +// Delete pseudo-keywords wherever they are not available or needed. -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: @@ -359,17 +263,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -381,48 +279,6 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. -// -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ - -// - -// This file is in the public domain. -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. // 3. 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. @@ -439,156 +295,117 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ type X__uint64_t = uint64 /* _types.h:68:28 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint32 F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers - -// When the following macro is defined, the system uses 64-bit inode numbers. -// Programs can use this to avoid including , with its associated -// namespace pollution. +} /* _types.h:75:3 */ -type Time_t = X__time_t /* utime.h:42:18 */ +type Time_t = X__time_t /* utime.h:43:18 */ type Utimbuf = struct { Factime Time_t diff --git a/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go b/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go index 51bb969676..5cf95baadf 100644 --- a/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go +++ b/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go @@ -26,7 +26,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:35:1: X_TIME_T_DEFINED_ = 0 // utime.h:42:1: X_UTIME_H_ = 0 // utime.h:36:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -242,7 +242,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -402,18 +402,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Time_t = X__time_t /* utime.h:43:18 */ diff --git a/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go b/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go index 51bb969676..202dd0e265 100644 --- a/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go +++ b/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o utime/utime_openbsd_amd64.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_openbsd_arm64.go -pkgname utime', DO NOT EDIT. package utime @@ -17,16 +17,16 @@ var _ unsafe.Pointer const ( X_FILE_OFFSET_BITS = 64 // :25:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_RET_PROTECTOR = 1 // :2:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: X_TIME_T_DEFINED_ = 0 // utime.h:42:1: X_UTIME_H_ = 0 // utime.h:36:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -115,10 +115,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -242,7 +239,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -274,8 +271,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -317,66 +313,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -402,18 +400,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Time_t = X__time_t /* utime.h:43:18 */ diff --git a/vendor/modernc.org/libc/utime/utime_windows_386.go b/vendor/modernc.org/libc/utime/utime_windows_386.go index 7716e26b02..b0326fe726 100644 --- a/vendor/modernc.org/libc/utime/utime_windows_386.go +++ b/vendor/modernc.org/libc/utime/utime_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname utime', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o utime/utime_windows_386.go -pkgname utime', DO NOT EDIT. package utime @@ -15,86 +15,86 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_UTIME = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_UTIMBUF_DEFINED = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_UTIME = 0 // utime.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_UTIMBUF_DEFINED = 0 // utime.h:56:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -132,6 +132,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -152,6 +157,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -192,26 +203,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -237,29 +250,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_utimbuf = struct { Factime Time_t diff --git a/vendor/modernc.org/libc/uuid/capi_openbsd_386.go b/vendor/modernc.org/libc/uuid/capi_openbsd_386.go index 3b55e224f2..b97fe52d4e 100644 --- a/vendor/modernc.org/libc/uuid/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/uuid/capi_openbsd_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_freebsd_386.go -pkgname uuid', DO NOT EDIT. +// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_openbsd_386.go -pkgname uuid', DO NOT EDIT. package uuid diff --git a/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go b/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go index 8592d341c2..71c46a73c4 100644 --- a/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_openbsd_amd64.go -pkgname uuid', DO NOT EDIT. +// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_openbsd_arm64.go -pkgname uuid', DO NOT EDIT. package uuid diff --git a/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go b/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go index d4db511464..9bfd13f29b 100644 --- a/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname uuid', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o uuid/uuid/uuid_darwin_amd64.go -pkgname uuid', DO NOT EDIT. package uuid diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go index ac5acdd96e..86525482d1 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname uuid', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o uuid/uuid/uuid_darwin_amd64.go -pkgname uuid', DO NOT EDIT. package uuid @@ -15,22 +15,22 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UUID_STRING_T = 0 - X_UUID_T = 0 - X_UUID_UUID_H = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_LP64 = 1 // :1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UUID_STRING_T = 0 // uuid.h:42:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go b/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go index eff20a32da..ba44d47948 100644 --- a/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go +++ b/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go @@ -1410,8 +1410,9 @@ type Pthread_key_t = int32 /* pthread_types.h:88:13 // Length of a printed UUID. // See also: -// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt -// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm // // A DCE 1.1 compatible source representation of UUIDs. type Uuid = struct { diff --git a/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go b/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go index 263448b67f..98fb8b8c46 100644 --- a/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go +++ b/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_freebsd_386.go -pkgname uuid', DO NOT EDIT. +// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_openbsd_386.go -pkgname uuid', DO NOT EDIT. package uuid @@ -15,97 +15,56 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // _endian.h:70:1: - BYTE_ORDER = 1234 // _endian.h:72:1: - FD_SETSIZE = 1024 // select.h:61:1: - LITTLE_ENDIAN = 1234 // _endian.h:69:1: - PDP_ENDIAN = 3412 // _endian.h:71:1: - X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // _endian.h:47:1: - X_BLKCNT_T_DECLARED = 0 // types.h:90:1: - X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // _endian.h:40:1: - X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: - X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: - X_CLOCKID_T_DECLARED = 0 // types.h:100:1: - X_CLOCK_T_DECLARED = 0 // types.h:95:1: - X_DEV_T_DECLARED = 0 // types.h:108:1: - X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + UUID_BUF_LEN = 38 // uuid.h:46:1: + UUID_STR_LEN = 36 // uuid.h:49:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: - X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: - X_FTRUNCATE_DECLARED = 0 // types.h:417:1: - X_GID_T_DECLARED = 0 // types.h:126:1: - X_ID_T_DECLARED = 0 // types.h:141:1: X_ILP32 = 1 // :1:1: - X_INO_T_DECLARED = 0 // types.h:146:1: - X_INT16_T_DECLARED = 0 // _stdint.h:42:1: - X_INT32_T_DECLARED = 0 // _stdint.h:47:1: - X_INT64_T_DECLARED = 0 // _stdint.h:52:1: - X_INT8_T_DECLARED = 0 // _stdint.h:37:1: - X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: - X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: - X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: - X_IN_PORT_T_DECLARED = 0 // types.h:136:1: - X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LSEEK_DECLARED = 0 // types.h:421:1: - X_LWPID_T_DECLARED = 0 // types.h:156:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_MMAP_DECLARED = 0 // types.h:425:1: - X_MODE_T_DECLARED = 0 // types.h:161:1: - X_MQD_T_DECLARED = 0 // types.h:227:1: - X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_OFF64_T_DECLARED = 0 // types.h:181:1: - X_OFF_T_DECLARED = 0 // types.h:176:1: - X_PDP_ENDIAN = 3412 // _endian.h:48:1: - X_PID_T_DECLARED = 0 // types.h:186:1: - X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // _endian.h:55:1: - X_QUAD_LOWWORD = 0 // _endian.h:56:1: - X_RLIM_T_DECLARED = 0 // types.h:193:1: - X_SELECT_DECLARED = 0 // select.h:103:1: - X_SIGSET_T_DECLARED = 0 // select.h:50:1: - X_SIG_MAXSIG = 128 // _sigset.h:47:1: - X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // types.h:202:1: - X_SSIZE_T_DECLARED = 0 // types.h:207:1: - X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS_SELECT_H_ = 0 // select.h:35:1: - X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: - X_SYS_UUID_H_ = 0 // uuid.h:32:1: - X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: - X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: - X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: - X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: - X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: - X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // types.h:222:1: - X_TIME_T_DECLARED = 0 // types.h:217:1: - X_TRUNCATE_DECLARED = 0 // types.h:429:1: - X_UID_T_DECLARED = 0 // types.h:234:1: - X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: - X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: - X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: - X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: - X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: - X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: - X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_UUID_H_ = 0 // uuid.h:33:1: - X_UUID_NODE_LEN = 6 // uuid.h:37:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: - Uuid_s_bad_version = 1 // uuid.h:46:1: - Uuid_s_invalid_string_uuid = 2 // uuid.h:47:1: - Uuid_s_no_memory = 3 // uuid.h:48:1: - Uuid_s_ok = 0 // uuid.h:45:1: + X_SYS_UUID_H_ = 0 // uuid.h:33:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_UUID_BUF_LEN = 38 // uuid.h:39:1: + X_UUID_H_ = 0 // uuid.h:34:1: + X_UUID_NODE_LEN = 6 // uuid.h:36:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: + Uuid_s_bad_version = 1 // uuid.h:41:1: + Uuid_s_invalid_string_uuid = 2 // uuid.h:42:1: + Uuid_s_no_memory = 3 // uuid.h:43:1: + Uuid_s_ok = 0 // uuid.h:40:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -117,10 +76,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002,2005 Marcel Moolenaar +// $OpenBSD: uuid.h,v 1.1 2014/08/31 09:36:36 miod Exp $ +// $NetBSD: uuid.h,v 1.2 2008/04/23 07:52:32 plunky Exp $ + +// Copyright (c) 2002 Marcel Moolenaar // Copyright (c) 2002 Hiten Mahesh Pandya // All rights reserved. // @@ -145,12 +104,13 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ +// $FreeBSD: src/include/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// Copyright (c) 1982, 1986, 1991, 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 @@ -182,12 +142,11 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)types.h 8.6 (Berkeley) 2/19/95 -// $FreeBSD$ +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -218,63 +177,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// Testing against Clang-specific extensions. +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -303,123 +238,78 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). - -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. -// -// Our macros begin with two underscores to avoid namespace screwage. - -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function releases a lock. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function asserts that an exclusive or shared lock is held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function requires that an exclusive or shared lock is or is not held. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function should not be analyzed. +// Default values. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// Machine type dependent parameters. -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1987, 1991 Regents of the University of California. -// All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -429,57 +319,29 @@ type X__float128 = float64 /* :47:21 */ // 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. 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. // -// @(#)endian.h 7.8 (Berkeley) 4/3/91 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +// Public definitions for little- and big-endian systems. +// This file should be included as in userspace and as +// in the kernel. // -// $FreeBSD$ +// System headers that need endian information but that can't or don't +// want to export the public names here should include +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -510,19 +372,12 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft -// Copyright (c) 1990, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -532,38 +387,26 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. // -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -// This file is in the public domain. -// $FreeBSD$ +// Internal endianness macros. This pulls in to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 1993 +// Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -590,195 +433,13 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - -type X__uint64_t = uint64 /* _types.h:68:28 */ - -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ +// @(#)types.h 8.3 (Berkeley) 1/5/94 -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ -type Pthread_once = struct { - Fstate int32 - Fmutex Pthread_mutex_t -} /* _pthreadtypes.h:52:1 */ - -// Primitive system data type definitions required by P1003.1c. -// -// Note that P1003.1c specifies that there are no defined comparison -// or assignment operators for the types pthread_attr_t, pthread_cond_t, -// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. -type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ -type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ -type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ -type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ -type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ -type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ -type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ -type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ -type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ -type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ -type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ -type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ -type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ - -// Additional type definitions: -// -// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for -// use in header symbols. -type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ -type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ - -type U_char = uint8 /* types.h:52:23 */ -type U_short = uint16 /* types.h:53:24 */ -type U_int = uint32 /* types.h:54:22 */ -type U_long = uint32 /* types.h:55:23 */ -type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility -type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility - -// XXX POSIX sized integrals that should appear only in . // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011 David E. O'Brien -// Copyright (c) 2001 Mike Barcroft -// All rights reserved. +// Copyright (c) 1990, 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 @@ -788,11 +449,14 @@ type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility // 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. 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -801,715 +465,252 @@ type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// $FreeBSD$ - -type Int8_t = X__int8_t /* _stdint.h:36:19 */ - -type Int16_t = X__int16_t /* _stdint.h:41:20 */ - -type Int32_t = X__int32_t /* _stdint.h:46:20 */ - -type Int64_t = X__int64_t /* _stdint.h:51:20 */ - -type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ - -type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ - -type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ - -type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ - -type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ -type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ -type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ -type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ - -type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) -type U_int16_t = X__uint16_t /* types.h:68:20 */ -type U_int32_t = X__uint32_t /* types.h:69:20 */ -type U_int64_t = X__uint64_t /* types.h:70:20 */ - -type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) -type Quad_t = X__int64_t /* types.h:73:19 */ -type Qaddr_t = uintptr /* types.h:74:16 */ - -type Caddr_t = uintptr /* types.h:76:14 */ // core address -type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const - -type Blksize_t = X__blksize_t /* types.h:80:21 */ - -type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ -type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ -type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ - -type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ - -type Clock_t = X__clock_t /* types.h:94:19 */ - -type Clockid_t = X__clockid_t /* types.h:99:21 */ +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ -type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value -type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ -type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev +// Tell sys/endian.h we have MD variants of the swap macros. -type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags +// Note that these macros evaluate their arguments several times. -type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number +// Public names -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ +// These are specified to be function-like macros to match the spec -type Gid_t = X__gid_t /* types.h:125:18 */ // group id +// POSIX names -type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address +// original BSD names -type In_port_t = X__uint16_t /* types.h:135:20 */ +// these were exposed here before -type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t +// ancient stuff -type Ino_t = X__ino_t /* types.h:145:18 */ // inode number +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ -type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility -type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type -type Mode_t = X__mode_t /* types.h:160:18 */ // permissions +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. -type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions +type Int8_t = X__int8_t /* types.h:75:19 */ -type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count +type Uint8_t = X__uint8_t /* types.h:80:20 */ -type Off_t = X__off_t /* types.h:175:18 */ // file offset +type Int16_t = X__int16_t /* types.h:85:20 */ -type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) +type Uint16_t = X__uint16_t /* types.h:90:21 */ -type Pid_t = X__pid_t /* types.h:185:18 */ // process id +type Int32_t = X__int32_t /* types.h:95:20 */ -type Register_t = X__register_t /* types.h:189:22 */ +type Uint32_t = X__uint32_t /* types.h:100:21 */ -type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit +type Int64_t = X__int64_t /* types.h:105:20 */ -type Sbintime_t = X__int64_t /* types.h:196:19 */ +type Uint64_t = X__uint64_t /* types.h:110:21 */ -type Segsz_t = X__segsz_t /* types.h:198:19 */ +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ -type Ssize_t = X__ssize_t /* types.h:206:19 */ +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ -type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ -type Time_t = X__time_t /* types.h:216:18 */ +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count -type Timer_t = X__timer_t /* types.h:221:19 */ +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ -type Mqd_t = X__mqd_t /* types.h:226:17 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type U_register_t = X__u_register_t /* types.h:230:24 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Uid_t = X__uid_t /* types.h:233:18 */ // user id +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) +type Time_t = X__time_t /* types.h:183:18 */ -type Cap_ioctl_t = uint32 /* types.h:244:23 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -// Types suitable for exporting physical addresses, virtual addresses -// (pointers), and memory object sizes from the kernel independent of native -// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and -// size_t in structs which contain such types that are shared with userspace. -type Kpaddr_t = X__uint64_t /* types.h:260:20 */ -type Kvaddr_t = X__uint64_t /* types.h:261:20 */ -type Ksize_t = X__uint64_t /* types.h:262:20 */ -type Kssize_t = X__int64_t /* types.h:263:19 */ +type Off_t = X__off_t /* types.h:193:18 */ -type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ -type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ -type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ -type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ -type Vm_size_t = X__vm_size_t /* types.h:269:21 */ +// Major, minor numbers, dev_t's. -type Rman_res_t = X__rman_res_t /* types.h:271:25 */ +// $OpenBSD: uuid.h,v 1.3 2014/08/31 09:36:39 miod Exp $ +// $NetBSD: uuid.h,v 1.5 2008/11/18 14:01:03 joerg Exp $ -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 2002 Marcel Moolenaar +// 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. -// 3. 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1992, 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. -// 3. 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1989, 1991, 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. -// 3. 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. -// -// @(#)signal.h 8.4 (Berkeley) 5/4/95 -// $FreeBSD$ - -// sigset_t macros. - -type X__sigset_t = X__sigset /* _sigset.h:55:3 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// Structure returned by gettimeofday(2) system call, and used in other calls. -type Timeval = struct { - Ftv_sec Time_t - Ftv_usec Suseconds_t -} /* _timeval.h:49:1 */ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 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. -// 3. 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. -// -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ - -// Structure defined by POSIX.1b to be like a itimerval, but with -// timespecs. Used in the timer_*() system calls. -type Itimerspec = struct { - Fit_interval struct { - Ftv_sec Time_t - Ftv_nsec int32 - } - Fit_value struct { - Ftv_sec Time_t - Ftv_nsec int32 - } -} /* timespec.h:60:1 */ - -type X__fd_mask = uint32 /* select.h:44:23 */ -type Fd_mask = X__fd_mask /* select.h:46:19 */ - -type Sigset_t = X__sigset_t /* select.h:51:20 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ - -// Select uses bit masks of file descriptors in longs. These macros -// manipulate such bit fields (the filesystem macros use chars). -// FD_SETSIZE may be defined by the user, but the default here should -// be enough for most uses. - -type Fd_set = Fd_set1 /* select.h:75:3 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Marcel Moolenaar -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1982, 1986, 1991, 1993, 1994 -// 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. -// 3. 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. -// -// @(#)types.h 8.6 (Berkeley) 2/19/95 -// $FreeBSD$ +// $FreeBSD: /repoman/r/ncvs/src/sys/sys/uuid.h,v 1.3 2003/05/31 16:47:07 phk Exp $ // Length of a node address (an IEEE 802 address). +// Length of a printed UUID. + // See also: // // http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt @@ -1523,9 +724,8 @@ type Uuid = struct { Fclock_seq_hi_and_reserved Uint8_t Fclock_seq_low Uint8_t Fnode [6]Uint8_t -} /* uuid.h:46:1 */ +} /* uuid.h:48:1 */ -// XXX namespace pollution? -type Uuid_t = Uuid /* uuid.h:93:21 */ +type Uuid_t = Uuid /* uuid.h:71:21 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go b/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go index 5754dfbac2..94cdeac6f3 100644 --- a/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go @@ -23,8 +23,8 @@ const ( UUID_STR_LEN = 36 // uuid.h:49:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -36,14 +36,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -51,8 +51,8 @@ const ( X_SYS_UUID_H_ = 0 // uuid.h:33:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -60,7 +60,7 @@ const ( X_UUID_BUF_LEN = 38 // uuid.h:39:1: X_UUID_H_ = 0 // uuid.h:34:1: X_UUID_NODE_LEN = 6 // uuid.h:36:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: Uuid_s_bad_version = 1 // uuid.h:41:1: Uuid_s_invalid_string_uuid = 2 // uuid.h:42:1: Uuid_s_no_memory = 3 // uuid.h:43:1: @@ -115,7 +115,7 @@ type X__float128 = float64 /* :47:21 */ // // $FreeBSD: src/include/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -412,7 +412,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -572,18 +572,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -665,27 +664,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go b/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go index 5754dfbac2..e817f4a4ff 100644 --- a/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go +++ b/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_openbsd_amd64.go -pkgname uuid', DO NOT EDIT. +// Code generated by 'ccgo 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 -ignore-unsupported-alignment -o uuid/uuid_openbsd_arm64.go -pkgname uuid', DO NOT EDIT. package uuid @@ -22,9 +22,9 @@ const ( UUID_BUF_LEN = 38 // uuid.h:46:1: UUID_STR_LEN = 36 // uuid.h:49:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: - X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // :25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -32,27 +32,27 @@ const ( X_INT8_T_DEFINED_ = 0 // types.h:74:1: X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // :2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS_UUID_H_ = 0 // uuid.h:33:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -60,7 +60,7 @@ const ( X_UUID_BUF_LEN = 38 // uuid.h:39:1: X_UUID_H_ = 0 // uuid.h:34:1: X_UUID_NODE_LEN = 6 // uuid.h:36:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: Uuid_s_bad_version = 1 // uuid.h:41:1: Uuid_s_invalid_string_uuid = 2 // uuid.h:42:1: Uuid_s_no_memory = 3 // uuid.h:43:1: @@ -115,7 +115,7 @@ type X__float128 = float64 /* :47:21 */ // // $FreeBSD: src/include/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -188,10 +188,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -412,7 +409,7 @@ type X__float128 = float64 /* :47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -444,8 +441,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)types.h 8.3 (Berkeley) 1/5/94 -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -487,66 +483,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O @@ -572,18 +570,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -665,27 +662,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go b/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go index d128ab89d9..c11e2f0d09 100644 --- a/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_darwin_amd64.go -pkgname wctype', DO NOT EDIT. package wctype diff --git a/vendor/modernc.org/libc/wctype/capi_openbsd_386.go b/vendor/modernc.org/libc/wctype/capi_openbsd_386.go index f7398726ec..aa1edc8df8 100644 --- a/vendor/modernc.org/libc/wctype/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/wctype/capi_openbsd_386.go @@ -1,29 +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 -ignore-unsupported-alignment -o wctype/wctype_freebsd_386.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_openbsd_386.go -pkgname wctype', DO NOT EDIT. package wctype -var CAPI = map[string]struct{}{ - "__istype_l": {}, - "__maskrune_l": {}, - "__wcwidth_l": {}, - "iswalnum_l": {}, - "iswalpha_l": {}, - "iswblank_l": {}, - "iswcntrl_l": {}, - "iswdigit_l": {}, - "iswgraph_l": {}, - "iswhexnumber_l": {}, - "iswideogram_l": {}, - "iswlower_l": {}, - "iswnumber_l": {}, - "iswphonogram_l": {}, - "iswprint_l": {}, - "iswpunct_l": {}, - "iswrune_l": {}, - "iswspace_l": {}, - "iswspecial_l": {}, - "iswupper_l": {}, - "iswxdigit_l": {}, - "towlower_l": {}, - "towupper_l": {}, -} +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go b/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go index e7fb284b04..0e9a8a55f2 100644 --- a/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o wctype/wctype_openbsd_amd64.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_openbsd_arm64.go -pkgname wctype', DO NOT EDIT. package wctype diff --git a/vendor/modernc.org/libc/wctype/capi_windows_386.go b/vendor/modernc.org/libc/wctype/capi_windows_386.go index 2f09890d17..9ba39f5c70 100644 --- a/vendor/modernc.org/libc/wctype/capi_windows_386.go +++ b/vendor/modernc.org/libc/wctype/capi_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_windows_386.go -pkgname wctype', DO NOT EDIT. package wctype diff --git a/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go b/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go index 19ee06d993..6f64a0dc90 100644 --- a/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go +++ b/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go @@ -1,4 +1,4 @@ -// 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_darwin_amd64.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_darwin_amd64.go -pkgname wctype', DO NOT EDIT. package wctype @@ -15,53 +15,53 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CACHED_RUNES = 256 - X_CDEFS_H_ = 0 - X_CRMASK = -256 - X_CTYPE_A = 0x00000100 - X_CTYPE_B = 0x00020000 - X_CTYPE_C = 0x00000200 - X_CTYPE_D = 0x00000400 - X_CTYPE_G = 0x00000800 - X_CTYPE_H_ = 0 - X_CTYPE_I = 0x00080000 - X_CTYPE_L = 0x00001000 - X_CTYPE_P = 0x00002000 - X_CTYPE_Q = 0x00200000 - X_CTYPE_R = 0x00040000 - X_CTYPE_S = 0x00004000 - X_CTYPE_SW0 = 0x20000000 - X_CTYPE_SW1 = 0x40000000 - X_CTYPE_SW2 = 0x80000000 - X_CTYPE_SW3 = 0xc0000000 - X_CTYPE_SWM = 0xe0000000 - X_CTYPE_SWS = 30 - X_CTYPE_T = 0x00100000 - X_CTYPE_U = 0x00008000 - X_CTYPE_X = 0x00010000 - X_CT_RUNE_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_RUNETYPE_H_ = 0 - X_RUNE_MAGIC_A = "RuneMagA" - X_RUNE_T = 0 - X_SIZE_T = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_WCHAR_T = 0 - X_WCTRANS_T = 0 - X_WCTYPE_H_ = 0 - X_WCTYPE_T = 0 - X_WINT_T = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CACHED_RUNES = 256 // runetype.h:54:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CRMASK = -256 // runetype.h:55:1: + X_CTYPE_A = 0x00000100 // _ctype.h:72:1: + X_CTYPE_B = 0x00020000 // _ctype.h:81:1: + X_CTYPE_C = 0x00000200 // _ctype.h:73:1: + X_CTYPE_D = 0x00000400 // _ctype.h:74:1: + X_CTYPE_G = 0x00000800 // _ctype.h:75:1: + X_CTYPE_H_ = 0 // ctype.h:67:1: + X_CTYPE_I = 0x00080000 // _ctype.h:83:1: + X_CTYPE_L = 0x00001000 // _ctype.h:76:1: + X_CTYPE_P = 0x00002000 // _ctype.h:77:1: + X_CTYPE_Q = 0x00200000 // _ctype.h:85:1: + X_CTYPE_R = 0x00040000 // _ctype.h:82:1: + X_CTYPE_S = 0x00004000 // _ctype.h:78:1: + X_CTYPE_SW0 = 0x20000000 // _ctype.h:86:1: + X_CTYPE_SW1 = 0x40000000 // _ctype.h:87:1: + X_CTYPE_SW2 = 0x80000000 // _ctype.h:88:1: + X_CTYPE_SW3 = 0xc0000000 // _ctype.h:89:1: + X_CTYPE_SWM = 0xe0000000 // _ctype.h:90:1: + X_CTYPE_SWS = 30 // _ctype.h:91:1: + X_CTYPE_T = 0x00100000 // _ctype.h:84:1: + X_CTYPE_U = 0x00008000 // _ctype.h:79:1: + X_CTYPE_X = 0x00010000 // _ctype.h:80:1: + X_CT_RUNE_T = 0 // _ct_rune_t.h:30:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_LP64 = 1 // :1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_RUNETYPE_H_ = 0 // runetype.h:40:1: + X_RUNE_MAGIC_A = "RuneMagA" // runetype.h:108:1: + X_RUNE_T = 0 // _rune_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_WCHAR_T = 0 // _wchar_t.h:32:1: + X_WCTRANS_T = 0 // _wctrans_t.h:30:1: + X_WCTYPE_H_ = 0 // wctype.h:32:1: + X_WCTYPE_T = 0 // _wctype_t.h:30:1: + X_WINT_T = 0 // _wint_t.h:30:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go b/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go index fec5d52160..5fbaa138f2 100644 --- a/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go +++ b/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o wctype/wctype_freebsd_386.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_openbsd_386.go -pkgname wctype', DO NOT EDIT. package wctype @@ -15,49 +15,20 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_CACHED_RUNES = 256 // runetype.h:44:1: - X_CRMASK = -256 // runetype.h:45:1: - X_CTYPE_A = 0x00000100 // _ctype.h:50:1: - X_CTYPE_B = 0x00020000 // _ctype.h:59:1: - X_CTYPE_C = 0x00000200 // _ctype.h:51:1: - X_CTYPE_D = 0x00000400 // _ctype.h:52:1: - X_CTYPE_G = 0x00000800 // _ctype.h:53:1: - X_CTYPE_I = 0x00080000 // _ctype.h:61:1: - X_CTYPE_L = 0x00001000 // _ctype.h:54:1: - X_CTYPE_N = 0x00400000 // _ctype.h:64:1: - X_CTYPE_P = 0x00002000 // _ctype.h:55:1: - X_CTYPE_Q = 0x00200000 // _ctype.h:63:1: - X_CTYPE_R = 0x00040000 // _ctype.h:60:1: - X_CTYPE_S = 0x00004000 // _ctype.h:56:1: - X_CTYPE_SW0 = 0x20000000 // _ctype.h:65:1: - X_CTYPE_SW1 = 0x40000000 // _ctype.h:66:1: - X_CTYPE_SW2 = 0x80000000 // _ctype.h:67:1: - X_CTYPE_SW3 = 0xc0000000 // _ctype.h:68:1: - X_CTYPE_SWM = 0xe0000000 // _ctype.h:69:1: - X_CTYPE_SWS = 30 // _ctype.h:70:1: - X_CTYPE_T = 0x00100000 // _ctype.h:62:1: - X_CTYPE_U = 0x00008000 // _ctype.h:57:1: - X_CTYPE_X = 0x00010000 // _ctype.h:58:1: - X_FILE_OFFSET_BITS = 64 // :25:1: - X_ILP32 = 1 // :1:1: - X_LOCALE_T_DEFINED = 0 // _ctype.h:45:1: - X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:790:1: - X_Null_unspecified = 0 // cdefs.h:792:1: - X_Nullable = 0 // cdefs.h:791:1: - X_RUNETYPE_H_ = 0 // runetype.h:39:1: - X_RUNE_MAGIC_1 = "RuneMagi" // runetype.h:87:1: - X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_WCTRANS_T = 0 // wctype.h:43:1: - X_WCTYPE_H_ = 0 // wctype.h:34:1: - X_WCTYPE_T = 0 // wctype.h:48:1: - X_WINT_T_DECLARED = 0 // wctype.h:53:1: - X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:50:1: - X_XLOCALE_WCTYPE_H = 0 // _ctype.h:39:1: - I386 = 1 // :335:1: - Unix = 1 // :336:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_ILP32 = 1 // :1:1: + X_LOCALE_T_DEFINED_ = 0 // wctype.h:59:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_WCTRANS_T_DEFINED_ = 0 // wctype.h:44:1: + X_WCTYPE_H_ = 0 // wctype.h:33:1: + X_WCTYPE_T_DEFINED_ = 0 // wctype.h:49:1: + X_WINT_T_DEFINED_ = 0 // wctype.h:39:1: + I386 = 1 // :339:1: + Unix = 1 // :340:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -69,9 +40,10 @@ type Wchar_t = int32 /* :15:24 */ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :47:21 */ +// $OpenBSD: wctype.h,v 1.6 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ + // - -// SPDX-License-Identifier: BSD-2-Clause -// // Copyright (c)1999 Citrus Project, // All rights reserved. // @@ -97,12 +69,10 @@ type X__float128 = float64 /* :47:21 */ // SUCH DAMAGE. // // citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp -// $NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $ -// $FreeBSD$ -// - -// SPDX-License-Identifier: BSD-3-Clause -// +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ + // Copyright (c) 1991, 1993 // The Regents of the University of California. All rights reserved. // @@ -133,63 +103,39 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// Testing against Clang-specific extensions. +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ -// This code has been put in place to help reduce the addition of -// compiler specific defines in FreeBSD code. It helps to aid in -// having a compiler-agnostic source tree. - -// Compiler memory barriers, specific to gcc and clang. - -// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced +// Written by J.T. Conklin 01/17/95. +// Public domain. // Macro to test if we're using a specific version of gcc or later. // The __CONCAT macro is used to concatenate parts of symbol names, e.g. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. -// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI -// mode -- there must be no spaces between its arguments, and for nested -// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also -// concatenate double-quoted strings produced by the __STRING macro, but -// this only works with ANSI C. -// -// __XSTRING is like __STRING, but it expands any macros in its argument -// first. It is only available with ANSI C. - -// Compiler-dependent macros to help declare dead (non-returning) and -// pure (no side effects) functions, and unused variables. They are -// null except for versions of gcc that are known to support the features -// properly (old versions of gcc-2 supported the dead and pure features -// in a different (wrong) way). If we do not provide an implementation -// for a given compiler, let the compile fail if it is told to use -// a feature that we cannot live without. - -// Keywords added in C11. - -// Emulation of C11 _Generic(). Unlike the previously defined C11 -// keywords, it is not possible to implement this using exactly the same -// syntax. Therefore implement something similar under the name -// __generic(). Unlike _Generic(), this macro can only distinguish -// between a single type, so it requires nested invocations to -// distinguish multiple cases. - -// C99 Static array indices in function parameter declarations. Syntax such as: -// void bar(int myArray[static 10]); -// is allowed in C99 but not in C++. Define __min_size appropriately so -// headers using it can be compiled in either language. Use like this: -// void bar(int myArray[__min_size(10)]); - -// XXX: should use `#if __STDC_VERSION__ < 199901'. - -// C++11 exposes a load of C99 stuff - -// GCC 2.95 provides `__restrict' as an extension to C90 to support the -// C99-specific `restrict' type qualifier. We happen to use `__restrict' as -// a way to define the `restrict' type qualifier without disturbing older -// software that is unaware of C99 keywords. +// The __CONCAT macro is a bit tricky -- make sure you don't put spaces +// in between its arguments. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// GCC1 and some versions of GCC2 declare dead (non-returning) and +// pure (no side effects) functions using "volatile" and "const"; +// unfortunately, these then cause warnings under "-ansi -pedantic". +// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these +// work for GNU C++ (modulo a slight glitch in the C++ grammar in +// the distribution version of 2.5.5). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h // GNU C version 2.96 adds explicit branch prediction so that // the CPU back-end can hint the processor and also so that @@ -218,186 +164,77 @@ type X__float128 = float64 /* :47:21 */ // basic block reordering that this affects can often generate // larger code. -// We define this here since , , and -// require it. - -// Given the pointer x to the member m of the struct s, return -// a pointer to the containing structure. When using GCC, we first -// assign pointer x to a local variable, to check that its type is -// compatible with member m. - -// Compiler-dependent macros to declare that functions take printf-like -// or scanf-like arguments. They are null except for versions of gcc -// that are known to support the features properly (old versions of gcc-2 -// didn't permit keeping the keywords out of the application namespace). +// Delete pseudo-keywords wherever they are not available or needed. -// Compiler-dependent macros that rely on FreeBSD-specific extensions. - -// Embed the rcs id of a source file in the resulting library. Note that in -// more recent ELF binutils, we use .ident allowing the ID to be stripped. -// Usage: -// __FBSDID("$FreeBSD$"); - -// - -// The following definitions are an extension of the behavior originally -// implemented in , but with a different level of granularity. -// POSIX.1 requires that the macros we test be defined before any standard -// header file is included. -// -// Here's a quick run-down of the versions: -// defined(_POSIX_SOURCE) 1003.1-1988 -// _POSIX_C_SOURCE == 1 1003.1-1990 -// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option -// _POSIX_C_SOURCE == 199309 1003.1b-1993 -// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, -// and the omnibus ISO/IEC 9945-1: 1996 -// _POSIX_C_SOURCE == 200112 1003.1-2001 -// _POSIX_C_SOURCE == 200809 1003.1-2008 +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. // -// In addition, the X/Open Portability Guide, which is now the Single UNIX -// Specification, defines a feature-test macro which indicates the version of -// that specification, and which subsumes _POSIX_C_SOURCE. +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. // -// Our macros begin with two underscores to avoid namespace screwage. +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. -// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. - -// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. - -// Deal with various X/Open Portability Guides and Single UNIX Spec. - -// Deal with all versions of POSIX. The ordering relative to the tests above is -// important. -// - -// Deal with _ANSI_SOURCE: -// If it is defined, and no other compilation environment is explicitly -// requested, then define our internal feature-test macros to zero. This -// makes no difference to the preprocessor (undefined symbols in preprocessing -// expressions are defined to have value zero), but makes it more convenient for -// a test program to print out the values. +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. // -// If a program mistakenly defines _ANSI_SOURCE and some other macro such as -// _POSIX_C_SOURCE, we will assume that it wants the broader compilation -// environment (and in fact we will never get here). - -// User override __EXT1_VISIBLE - -// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h -// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - -// Nullability qualifiers: currently only supported by Clang. +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE -// Type Safety Checking +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI // -// Clang provides additional attributes to enable checking type safety -// properties that cannot be enforced by the C type system. +// The XPG spec implies a specific value for _POSIX_C_SOURCE. -// Lock annotations. +// POSIX macros, these checks must follow the XOPEN ones above. // -// Clang provides support for doing basic thread-safety tests at -// compile-time, by marking which locks will/should be held when -// entering/leaving a functions. +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 // -// Furthermore, it is also possible to annotate variables and structure -// members to enforce that they are only accessed when certain locks are -// held. - -// Structure implements a lock. - -// Function acquires an exclusive or shared lock. - -// Function attempts to acquire an exclusive or shared lock. - -// Function releases a lock. +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. -// Function asserts that an exclusive or shared lock is held. +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. -// Function requires that an exclusive or shared lock is or is not held. +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. -// Function should not be analyzed. +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. -// Function or variable should not be sanitized, e.g., by AddressSanitizer. -// GCC has the nosanitize attribute, but as a function attribute only, and -// warns on use as a variable attribute. - -// Guard variables and structure members by lock. - -// Alignment builtins for better type checking and improved code generation. -// Provide fallback versions for other compilers (GCC/Clang < 10): - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ +// Default values. -// - -// This file is in the public domain. -// $FreeBSD$ +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $ // - -// SPDX-License-Identifier: BSD-4-Clause -// -// Copyright (c) 2002 Mike Barcroft // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. // @@ -409,48 +246,6 @@ type X__float128 = float64 /* :47:21 */ // 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. All advertising materials mentioning features or use of this software -// must display the following acknowledgement: -// This product includes software developed by the University of -// California, Berkeley and its contributors. -// 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. -// -// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 -// From: @(#)types.h 8.3 (Berkeley) 1/5/94 -// $FreeBSD$ - -// - -// This file is in the public domain. -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1988, 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. // 3. 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. @@ -467,321 +262,86 @@ type X__float128 = float64 /* :47:21 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)limits.h 8.3 (Berkeley) 1/4/94 -// $FreeBSD$ - -// According to ANSI (section 2.2.4.2), the values below must be usable by -// #if preprocessing directives. Additionally, the expression must have the -// same type as would an expression that is an object of the corresponding -// type converted according to the integral promotions. The subtraction for -// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an -// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). - -// max value for an unsigned long long - -// Minimum signal stack size. - -// Basic types upon which most other types are built. -type X__int8_t = int8 /* _types.h:55:22 */ -type X__uint8_t = uint8 /* _types.h:56:24 */ -type X__int16_t = int16 /* _types.h:57:17 */ -type X__uint16_t = uint16 /* _types.h:58:25 */ -type X__int32_t = int32 /* _types.h:59:15 */ -type X__uint32_t = uint32 /* _types.h:60:23 */ - -type X__int64_t = int64 /* _types.h:66:20 */ - +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long and must be cast to any desired pointer type. +// +// _ALIGNED_POINTER is a boolean macro that checks whether an address +// is valid to fetch data elements of type t from on this architecture. +// This does not reflect the optimal alignment, just the possibility +// (within reasonable limits). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ type X__uint64_t = uint64 /* _types.h:68:28 */ -// Standard type definitions. -type X__clock_t = uint32 /* _types.h:84:23 */ -type X__critical_t = X__int32_t /* _types.h:85:19 */ -type X__double_t = float64 /* _types.h:87:21 */ -type X__float_t = float64 /* _types.h:88:21 */ -type X__intfptr_t = X__int32_t /* _types.h:90:19 */ -type X__intptr_t = X__int32_t /* _types.h:91:19 */ -type X__intmax_t = X__int64_t /* _types.h:93:19 */ -type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ -type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ -type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ -type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ -type X__int_least8_t = X__int8_t /* _types.h:98:18 */ -type X__int_least16_t = X__int16_t /* _types.h:99:19 */ -type X__int_least32_t = X__int32_t /* _types.h:100:19 */ -type X__int_least64_t = X__int64_t /* _types.h:101:19 */ -type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */ -type X__register_t = X__int32_t /* _types.h:113:19 */ -type X__segsz_t = X__int32_t /* _types.h:114:19 */ -type X__size_t = X__uint32_t /* _types.h:115:20 */ -type X__ssize_t = X__int32_t /* _types.h:116:19 */ -type X__time_t = X__int32_t /* _types.h:117:19 */ -type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */ -type X__uintptr_t = X__uint32_t /* _types.h:119:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ -type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ -type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ -type X__u_register_t = X__uint32_t /* _types.h:136:20 */ -type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */ -type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */ -type X__vm_size_t = X__uint32_t /* _types.h:139:20 */ -type X___wchar_t = int32 /* _types.h:141:14 */ - -// Standard type definitions. -type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size -type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count -type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... -type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags -type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ -type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ -type X__gid_t = X__uint32_t /* _types.h:46:20 */ -type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t -type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number -type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) -type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) -type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions -type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions -type X__nl_item = int32 /* _types.h:53:14 */ -type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count -type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset -type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) -type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] -type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally -// signed, because of legacy code -// that uses -1 for RLIM_INFINITY -type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ -type X__socklen_t = X__uint32_t /* _types.h:62:20 */ -type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) -type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... -type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... -type X__uid_t = X__uint32_t /* _types.h:66:20 */ -type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) -type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. -type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. -type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. -type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc - -// Unusual type definitions. -// rune_t is declared to be an “int” instead of the more natural -// “unsigned long” or “long”. Two things are happening here. It is not -// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, -// it looks like 10646 will be a 31 bit standard. This means that if your -// ints cannot hold 32 bits, you will be in trouble. The reason an int was -// chosen over a long is that the is*() and to*() routines take ints (says -// ANSI C), but they use __ct_rune_t instead of int. -// -// NOTE: rune_t is not covered by ANSI nor other standards, and should not -// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and -// rune_t must be the same type. Also, wint_t should be able to hold all -// members of the largest character set plus one extra value (WEOF), and -// must be at least 16 bits. -type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs -type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) -type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) - -// Clang already provides these types as built-ins, but only in C++ mode. -type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ -type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ -// In C++11, char16_t and char32_t are built-in types. - -type X__max_align_t = struct { - F__max_align1 int64 - F__max_align2 float64 -} /* _types.h:111:3 */ - -type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number - -type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number - -// mbstate_t is an opaque object to keep conversion state during multibyte -// stream conversions. -type X__mbstate_t = struct { - F__ccgo_pad1 [0]uint32 - F__mbstate8 [128]int8 -} /* _types.h:124:3 */ - -type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ - -// Types for varargs. These are all provided by builtin types these -// days, so centralize their definition. -type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc -type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ - -// Use inline functions if we are allowed to and the compiler supports them. - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Paul Borman at Krystal Technologies. -// -// 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. -// 3. 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. -// -// @(#)runetype.h 8.1 (Berkeley) 6/2/93 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, 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. -// 3. 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. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2002 Mike Barcroft -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -// The lower 8 bits of runetype[] contain the digit value of the rune. -type X_RuneEntry = struct { - F__min X__rune_t - F__max X__rune_t - F__map X__rune_t - F__types uintptr -} /* runetype.h:55:3 */ - -type X_RuneRange = struct { - F__nranges int32 - F__ranges uintptr -} /* runetype.h:60:3 */ - -type X_RuneLocale = struct { - F__magic [8]int8 - F__encoding [32]int8 - F__sgetrune uintptr - F__sputrune uintptr - F__invalid_rune X__rune_t - F__runetype [256]uint32 - F__maplower [256]X__rune_t - F__mapupper [256]X__rune_t - F__runetype_ext X_RuneRange - F__maplower_ext X_RuneRange - F__mapupper_ext X_RuneRange - F__variable uintptr - F__variable_len int32 -} /* runetype.h:85:3 */ - -type Wctrans_t = int32 /* wctype.h:42:13 */ - -type Wctype_t = uint32 /* wctype.h:47:23 */ - -type Wint_t = X__wint_t /* wctype.h:52:18 */ - -// - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD -// -// Copyright (c) 2011 The FreeBSD Foundation -// All rights reserved. -// -// This software was developed by David Chisnall under sponsorship from -// the FreeBSD Foundation. -// -// 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. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -// -// $FreeBSD$ - -type Locale_t = uintptr /* _ctype.h:46:25 */ +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type Wint_t = X__wint_t /* wctype.h:40:21 */ + +type Wctrans_t = X__wctrans_t /* wctype.h:45:21 */ + +type Wctype_t = X__wctype_t /* wctype.h:50:20 */ + +type Locale_t = uintptr /* wctype.h:60:14 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go b/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go index 1343f8150b..7beb74ec76 100644 --- a/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go +++ b/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go @@ -28,7 +28,7 @@ const ( X_WCTYPE_H_ = 0 // wctype.h:33:1: X_WCTYPE_T_DEFINED_ = 0 // wctype.h:49:1: X_WINT_T_DEFINED_ = 0 // wctype.h:39:1: - Unix = 1 // :340:1: + Unix = 1 // :344:1: ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go b/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go index 1343f8150b..3a3a6faed3 100644 --- a/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go +++ b/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go @@ -1,4 +1,4 @@ -// 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 -ignore-unsupported-alignment -o wctype/wctype_openbsd_amd64.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_openbsd_arm64.go -pkgname wctype', DO NOT EDIT. package wctype @@ -18,17 +18,17 @@ const ( X_FILE_OFFSET_BITS = 64 // :25:1: X_LOCALE_T_DEFINED_ = 0 // wctype.h:59:1: X_LP64 = 1 // :1:1: - X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: - X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: - X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: X_RET_PROTECTOR = 1 // :2:1: - X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_WCTRANS_T_DEFINED_ = 0 // wctype.h:44:1: X_WCTYPE_H_ = 0 // wctype.h:33:1: X_WCTYPE_T_DEFINED_ = 0 // wctype.h:49:1: X_WINT_T_DEFINED_ = 0 // wctype.h:39:1: - Unix = 1 // :340:1: + Unix = 1 // :360:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -114,10 +114,7 @@ type X__float128 = float64 /* :47:21 */ // // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 -// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $ - -// Written by J.T. Conklin 01/17/95. -// Public domain. +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ // Macro to test if we're using a specific version of gcc or later. @@ -241,8 +238,7 @@ type X__float128 = float64 /* :47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ - +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ // - // Copyright (c) 1990, 1993 // The Regents of the University of California. All rights reserved. @@ -284,66 +280,68 @@ type X__float128 = float64 /* :47:21 */ // (within reasonable limits). // 7.18.1.1 Exact-width integer types -type X__int8_t = int8 /* _types.h:61:22 */ -type X__uint8_t = uint8 /* _types.h:62:24 */ -type X__int16_t = int16 /* _types.h:63:17 */ -type X__uint16_t = uint16 /* _types.h:64:25 */ -type X__int32_t = int32 /* _types.h:65:15 */ -type X__uint32_t = uint32 /* _types.h:66:23 */ -type X__int64_t = int64 /* _types.h:67:20 */ -type X__uint64_t = uint64 /* _types.h:68:28 */ +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ // 7.18.1.2 Minimum-width integer types -type X__int_least8_t = X__int8_t /* _types.h:71:19 */ -type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ -type X__int_least16_t = X__int16_t /* _types.h:73:20 */ -type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ -type X__int_least32_t = X__int32_t /* _types.h:75:20 */ -type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ -type X__int_least64_t = X__int64_t /* _types.h:77:20 */ -type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ // 7.18.1.3 Fastest minimum-width integer types -type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ -type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ -type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ -type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ -type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ -type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ -type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ -type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ // 7.18.1.4 Integer types capable of holding object pointers -type X__intptr_t = int64 /* _types.h:103:16 */ -type X__uintptr_t = uint64 /* _types.h:104:24 */ +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ // 7.18.1.5 Greatest-width integer types -type X__intmax_t = X__int64_t /* _types.h:107:20 */ -type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ // Register size -type X__register_t = int64 /* _types.h:111:16 */ +type X__register_t = int64 /* _types.h:112:16 */ // VM system types -type X__vaddr_t = uint64 /* _types.h:114:24 */ -type X__paddr_t = uint64 /* _types.h:115:24 */ -type X__vsize_t = uint64 /* _types.h:116:24 */ -type X__psize_t = uint64 /* _types.h:117:24 */ +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ // Standard system types -type X__double_t = float64 /* _types.h:120:18 */ -type X__float_t = float32 /* _types.h:121:17 */ -type X__ptrdiff_t = int64 /* _types.h:122:16 */ -type X__size_t = uint64 /* _types.h:123:24 */ -type X__ssize_t = int64 /* _types.h:124:16 */ -type X__va_list = X__builtin_va_list /* _types.h:126:27 */ +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ // Wide character support types -type X__wchar_t = int32 /* _types.h:133:15 */ -type X__wint_t = int32 /* _types.h:135:15 */ -type X__rune_t = int32 /* _types.h:136:15 */ -type X__wctrans_t = uintptr /* _types.h:137:14 */ -type X__wctype_t = uintptr /* _types.h:138:14 */ +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ type Wint_t = X__wint_t /* wctype.h:40:21 */ diff --git a/vendor/modernc.org/libc/wctype/wctype_windows_386.go b/vendor/modernc.org/libc/wctype/wctype_windows_386.go index 2bc052df8e..f6ad2e739a 100644 --- a/vendor/modernc.org/libc/wctype/wctype_windows_386.go +++ b/vendor/modernc.org/libc/wctype/wctype_windows_386.go @@ -1,4 +1,4 @@ -// 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_windows_386.go -pkgname wctype', DO NOT EDIT. +// 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 -ignore-unsupported-alignment -o wctype/wctype_windows_386.go -pkgname wctype', DO NOT EDIT. package wctype @@ -15,99 +15,99 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ALPHA = 259 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_BLANK = 0x40 - X_CONST_RETURN = 0 - X_CONTROL = 0x20 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_CTYPEDATA_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_WCTYPEDATA_DEFINED = 0 - X_DIGIT = 0x4 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_HEX = 0x80 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC_WCTYPE = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LEADBYTE = 0x8000 - X_LOWER = 0x2 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_PUNCT = 0x10 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SPACE = 0x8 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_UPPER = 0x1 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_DEFINED = 0 - X_WCTYPE_INLINE_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // :258:1: + WINNT = 1 // :306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ALPHA = 259 // wctype.h:110:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_BLANK = 0x40 // wctype.h:106:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CONTROL = 0x20 // wctype.h:105:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_CTYPEDATA_DEFINED = 0 // wctype.h:43:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WCTYPEDATA_DEFINED = 0 // wctype.h:76:1: + X_DIGIT = 0x4 // wctype.h:101:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // :25:1: + X_HEX = 0x80 // wctype.h:107:1: + X_ILP32 = 1 // :211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC_WCTYPE = 0 // wctype.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // :320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LEADBYTE = 0x8000 // wctype.h:109:1: + X_LOWER = 0x2 // wctype.h:100:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_PUNCT = 0x10 // wctype.h:104:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPACE = 0x8 // wctype.h:102:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_UPPER = 0x1 // wctype.h:99:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // :55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_DEFINED = 0 // wctype.h:113:1: + X_WCTYPE_INLINE_DEFINED = 0 // wctype.h:140:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // :164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // :169:1: + I386 = 1 // :171:1: ) type Ptrdiff_t = int32 /* :3:26 */ @@ -141,6 +141,11 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -161,6 +166,12 @@ type Va_list = X__builtin_va_list /* :50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -201,26 +212,28 @@ type Va_list = X__builtin_va_list /* :50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -246,29 +259,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type Wctrans_t = Wchar_t /* wctype.h:174:19 */ diff --git a/vendor/modernc.org/sqlite/AUTHORS b/vendor/modernc.org/sqlite/AUTHORS index 4aa7b97cd9..dae34d6bbc 100644 --- a/vendor/modernc.org/sqlite/AUTHORS +++ b/vendor/modernc.org/sqlite/AUTHORS @@ -14,8 +14,10 @@ David Walton Davsk Ltd Co Jaap Aarts Jan Mercl <0xjnml@gmail.com> +Josh Bleecher Snyder Logan Snow Michael Hoffmann Ross Light Saed SayedAhmed Steffen Butzer +Michael Rykov diff --git a/vendor/modernc.org/sqlite/CONTRIBUTORS b/vendor/modernc.org/sqlite/CONTRIBUTORS index 3e8617c5c9..04e28754d2 100644 --- a/vendor/modernc.org/sqlite/CONTRIBUTORS +++ b/vendor/modernc.org/sqlite/CONTRIBUTORS @@ -11,14 +11,17 @@ Artyom Pervukhin Dan Peterson David Skinner David Walton +Elle Mouton FlyingOnion <731677080@qq.com> Gleb Sakhnov Jaap Aarts Jan Mercl <0xjnml@gmail.com> +Josh Bleecher Snyder Logan Snow Matthew Gabeler-Lee Michael Hoffmann Ross Light Saed SayedAhmed Steffen Butzer -Yaacov Akiba Slama \ No newline at end of file +Yaacov Akiba Slama +Michael Rykov diff --git a/vendor/modernc.org/sqlite/Makefile b/vendor/modernc.org/sqlite/Makefile index d98f868d04..0ce355fbb5 100644 --- a/vendor/modernc.org/sqlite/Makefile +++ b/vendor/modernc.org/sqlite/Makefile @@ -167,7 +167,7 @@ openbsd_amd64: # 3900x/qemu openbsd_arm64: @echo "Should be executed only on openbsd/arm64." - go generate 2>&1 | tee log-generate + GOGC=10 GOMEMLIMIT=6GiB go generate 2>&1 | tee log-generate go test -c -o /dev/null generate_all_targets_on_linux_amd64: linux_amd64 linux_386 linux_arm linux_arm64 linux_s390x linux_ppc64le linux_riscv64 windows_amd64 windows_arm64 #TODO windows_386 @@ -206,6 +206,7 @@ edit: editor: gofmt -l -s -w *.go go install -v ./... + go test -c -o /dev/null -tags=cgo,cgotest internalError: egrep -ho '"internal error.*"' *.go | sort | cat -n diff --git a/vendor/modernc.org/sqlite/doc.go b/vendor/modernc.org/sqlite/doc.go index 5d6fe98eeb..ebe1bbb775 100644 --- a/vendor/modernc.org/sqlite/doc.go +++ b/vendor/modernc.org/sqlite/doc.go @@ -19,26 +19,31 @@ // // OS Arch SQLite version // ------------------------------ -// darwin amd64 3.39.4 -// darwin arm64 3.39.4 -// freebsd amd64 3.39.4 -// freebsd arm64 3.39.4 -// linux 386 3.39.4 -// linux amd64 3.39.4 -// linux arm 3.39.4 -// linux arm64 3.39.4 -// linux riscv64 3.39.4 -// windows amd64 3.39.4 -// windows arm64 3.39.4 +// darwin amd64 3.40.1 +// darwin arm64 3.40.1 +// freebsd amd64 3.40.1 +// freebsd arm64 3.40.1 +// linux 386 3.40.1 +// linux amd64 3.40.1 +// linux arm 3.40.1 +// linux arm64 3.40.1 +// linux ppc64le 3.40.1 +// linux riscv64 3.40.1 +// windows amd64 3.40.1 +// windows arm64 3.40.1 // // Builders // // Builder results available at // -// https://modern-c.appspot.com/-/builder/?importpath=modernc.org%2fsqlite +// https://modern-c.appspot.com/-/builder/?importpath=modernc.org%2fsqlite // // Changelog // +// 2022-11-28 v1.20.0 +// +// Support linux/ppc64le. +// // 2022-09-16 v1.19.0: // // Support frebsd/arm64. diff --git a/vendor/modernc.org/sqlite/generator.go b/vendor/modernc.org/sqlite/generator.go index 0729808258..b9ced856f2 100644 --- a/vendor/modernc.org/sqlite/generator.go +++ b/vendor/modernc.org/sqlite/generator.go @@ -10,6 +10,7 @@ package main import ( "archive/zip" "bufio" + "bytes" "flag" "fmt" "io" @@ -18,6 +19,7 @@ import ( "os/exec" "path/filepath" "runtime" + "sort" "strings" "modernc.org/ccgo/v3/lib" @@ -145,14 +147,24 @@ import ( // -lpthread const ( - volatiles = "-volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt" + volatiles = "-volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid" ) +// 2022-11-27 Removing -DSQLITE_ENABLE_SNAPSHOT from configTest. This #define +// makes a single test fail on linux/ppc64le. That test is run only when the +// -DSQLITE_ENABLE_SNAPSHOT is present when compiling the testfixture. When +// investigating the failure it turns out this #define is actually NOT present +// when doing '$ ./configure && make tcltest' in sqlite-src-3400000, ie. in the +// original C code. +// +// libtool: link: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I/home/jnml/sqlite-src-3400000/src -I/home/jnml/sqlite-src-3400000/ext/rtree -I/home/jnml/sqlite-src-3400000/ext/icu -I/home/jnml/sqlite-src-3400000/ext/fts3 -I/home/jnml/sqlite-src-3400000/ext/async -I/home/jnml/sqlite-src-3400000/ext/session -I/home/jnml/sqlite-src-3400000/ext/userauth -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include/tcl8.6 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_HAVE_ZLIB=1 -DSQLITE_NO_SYNC=1 -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_SERVER=1 -DSQLITE_PRIVATE= -DSQLITE_CORE -DBUILD_sqlite -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_CKSUMVFS_STATIC -o testfixture ... + var ( configProduction = []string{ "-DHAVE_USLEEP", "-DLONGDOUBLE_TYPE=double", "-DSQLITE_CORE", + "-DSQLITE_DEFAULT_MEMSTATUS=0", "-DSQLITE_ENABLE_COLUMN_METADATA", "-DSQLITE_ENABLE_FTS5", "-DSQLITE_ENABLE_GEOPOLY", @@ -197,8 +209,8 @@ var ( "-DHAVE_USLEEP", "-DLONGDOUBLE_TYPE=double", "-DSQLITE_CKSUMVFS_STATIC", - "-DSQLITE_CORE", // testfixture - "-DSQLITE_DEFAULT_MEMSTATUS=0", // bug reported https://sqlite.org/forum/info/d8dfd4771689be35, fixed in https://sqlite.org/src/info/3c5e63c22ffbfeb6 + "-DSQLITE_CORE", // testfixture + "-DSQLITE_DEFAULT_MEMSTATUS=1", "-DSQLITE_DEFAULT_PAGE_SIZE=1024", // testfixture, hardcoded. See file_pages in autovacuum.test. "-DSQLITE_ENABLE_BYTECODE_VTAB", // testfixture "-DSQLITE_ENABLE_COLUMN_METADATA", @@ -215,7 +227,6 @@ var ( "-DSQLITE_ENABLE_RBU", "-DSQLITE_ENABLE_RTREE", "-DSQLITE_ENABLE_SESSION", - "-DSQLITE_ENABLE_SNAPSHOT", "-DSQLITE_ENABLE_STAT4", "-DSQLITE_ENABLE_STMTVTAB", // testfixture "-DSQLITE_ENABLE_UNLOCK_NOTIFY", // Adds sqlite3_unlock_notify(). @@ -228,6 +239,7 @@ var ( "-DSQLITE_THREADSAFE=1", //DONT "-DNDEBUG", // To enable GO_GENERATE=-DSQLITE_DEBUG //DONT "-DSQLITE_DQS=0", // testfixture + //DONT "-DSQLITE_ENABLE_SNAPSHOT", //DONT "-DSQLITE_NO_SYNC=1", //DONT "-DSQLITE_OMIT_DECLTYPE", // testfixture //DONT "-DSQLITE_OMIT_DEPRECATED", // mptest @@ -253,12 +265,12 @@ var ( sz int dev bool }{ - {sqliteDir, "https://www.sqlite.org/2022/sqlite-amalgamation-3390400.zip", 2457, false}, - {sqliteSrcDir, "https://www.sqlite.org/2022/sqlite-src-3390400.zip", 12814, false}, + {sqliteDir, "https://www.sqlite.org/2022/sqlite-amalgamation-3400100.zip", 2457, false}, + {sqliteSrcDir, "https://www.sqlite.org/2022/sqlite-src-3400100.zip", 12814, false}, } - sqliteDir = filepath.FromSlash("testdata/sqlite-amalgamation-3390400") - sqliteSrcDir = filepath.FromSlash("testdata/sqlite-src-3390400") + sqliteDir = filepath.FromSlash("testdata/sqlite-amalgamation-3400100") + sqliteSrcDir = filepath.FromSlash("testdata/sqlite-src-3400100") ) func download() { @@ -541,6 +553,9 @@ func makeTestfixture(goos, goarch string, more []string) { "ext/misc/unionvtab.c", "ext/misc/wholenumber.c", "ext/rbu/test_rbu.c", + "ext/recover/dbdata.c", + "ext/recover/sqlite3recover.c", + "ext/recover/test_recover.c", "ext/rtree/test_rtreedoc.c", "ext/session/test_session.c", "ext/userauth/userauth.c", @@ -628,9 +643,24 @@ func makeTestfixture(goos, goarch string, more []string) { args := join( []string{ "ccgo", + "-DBUILD_sqlite", + "-DNDEBUG", + "-DSQLITE_CKSUMVFS_STATIC", + "-DSQLITE_CORE", + "-DSQLITE_CRASH_TEST=1", + "-DSQLITE_DEFAULT_PAGE_SIZE=1024", + "-DSQLITE_ENABLE_BYTECODE_VTAB", + "-DSQLITE_ENABLE_DBPAGE_VTAB", + "-DSQLITE_ENABLE_MATH_FUNCTIONS", + "-DSQLITE_ENABLE_STMTVTAB", + "-DSQLITE_NO_SYNC=1", "-DSQLITE_OMIT_LOAD_EXTENSION", + "-DSQLITE_PRIVATE=\"\"", "-DSQLITE_SERIES_CONSTRAINT_VERIFY=1", "-DSQLITE_SERVER=1", + "-DSQLITE_TEMP_STORE=1", + "-DSQLITE_TEST=1", + "-DSQLITE_THREADSAFE=1", "-DTCLSH_INIT_PROC=sqlite3TestInit", "-D_HAVE_SQLITE_CONFIG_H", }, @@ -726,6 +756,7 @@ func makeMpTest(goos, goarch string, more []string) { } func makeSqliteProduction(goos, goarch string, more []string) { + fn := filepath.FromSlash(fmt.Sprintf("lib/sqlite_%s_%s.go", goos, goarch)) task := ccgo.NewTask( join( []string{ @@ -738,7 +769,8 @@ func makeSqliteProduction(goos, goarch string, more []string) { "-export-typedefs", "", "-ignore-unsupported-alignment", "-pkgname", "sqlite3", - "-o", filepath.FromSlash(fmt.Sprintf("lib/sqlite_%s_%s.go", goos, goarch)), + volatiles, + "-o", fn, "-trace-translation-units", filepath.Join(sqliteDir, "sqlite3.c"), }, @@ -752,9 +784,14 @@ func makeSqliteProduction(goos, goarch string, more []string) { if err := task.Main(); err != nil { fail("%s\n", err) } + + if err := patchXsqlite3_initialize(fn); err != nil { + fail("%s\n", err) + } } func makeSqliteTest(goos, goarch string, more []string) { + fn := filepath.FromSlash(fmt.Sprintf("libtest/sqlite_%s_%s.go", goos, goarch)) task := ccgo.NewTask( join( []string{ @@ -767,7 +804,8 @@ func makeSqliteTest(goos, goarch string, more []string) { "-export-typedefs", "", "-ignore-unsupported-alignment", "-pkgname", "sqlite3", - "-o", filepath.FromSlash(fmt.Sprintf("libtest/sqlite_%s_%s.go", goos, goarch)), + volatiles, + "-o", fn, "-trace-translation-units", volatiles, filepath.Join(sqliteDir, "sqlite3.c"), @@ -782,6 +820,10 @@ func makeSqliteTest(goos, goarch string, more []string) { if err := task.Main(); err != nil { fail("%s\n", err) } + + if err := patchXsqlite3_initialize(fn); err != nil { + fail("%s\n", err) + } } func join(a ...[]string) (r []string) { @@ -795,3 +837,47 @@ func join(a ...[]string) (r []string) { } return r } + +func patchXsqlite3_initialize(fn string) error { + const s = "func Xsqlite3_initialize(tls *libc.TLS) int32 {" + return patch(fn, func(b []byte) []diff { + x := bytes.Index(b, []byte(s)) + return []diff{{x, x + len(s), ` +var mu mutex + +func init() { mu.recursive = true } + +func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + +`}} + }) +} + +type diff struct { + from, to int // byte offsets + replace string // replaces b[from:to] +} + +func patch(fn string, f func([]byte) []diff) error { + b, err := os.ReadFile(fn) + if err != nil { + return err + } + + diffs := f(b) + sort.Slice(diffs, func(i, j int) bool { return diffs[i].from < diffs[j].from }) + var patched [][]byte + off := 0 + for _, diff := range diffs { + from := diff.from - off + to := diff.to - off + patched = append(patched, b[:from]) + patched = append(patched, []byte(diff.replace)) + b = b[to:] + off += to + } + patched = append(patched, b) + return os.WriteFile(fn, bytes.Join(patched, nil), 0660) +} diff --git a/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go b/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go index 7c72b95182..cc96129430 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -82,6 +82,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -217,6 +218,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -404,6 +406,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -619,6 +622,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -709,7 +713,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -724,6 +727,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -823,6 +827,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -906,6 +911,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1273,6 +1279,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1341,6 +1348,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_darwin_arm64.go b/vendor/modernc.org/sqlite/lib/capi_darwin_arm64.go index cc47294caf..91c38c14e1 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_darwin_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -82,6 +82,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -217,6 +218,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -404,6 +406,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -619,6 +622,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -709,7 +713,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -724,6 +727,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -823,6 +827,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -906,6 +911,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1273,6 +1279,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1341,6 +1348,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_freebsd_386.go b/vendor/modernc.org/sqlite/lib/capi_freebsd_386.go index 513a1b9124..a9fcf5d0af 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_freebsd_amd64.go b/vendor/modernc.org/sqlite/lib/capi_freebsd_amd64.go index b9faefdf82..5796d66622 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_freebsd_arm.go b/vendor/modernc.org/sqlite/lib/capi_freebsd_arm.go index d9b2308b94..b5f8f89c64 100644 --- a/vendor/modernc.org/sqlite/lib/capi_freebsd_arm.go +++ b/vendor/modernc.org/sqlite/lib/capi_freebsd_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_freebsd_arm.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_arm.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_freebsd_arm64.go b/vendor/modernc.org/sqlite/lib/capi_freebsd_arm64.go index b9faefdf82..5796d66622 100644 --- a/vendor/modernc.org/sqlite/lib/capi_freebsd_arm64.go +++ b/vendor/modernc.org/sqlite/lib/capi_freebsd_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_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_386.go b/vendor/modernc.org/sqlite/lib/capi_linux_386.go index c499d6e615..c983290251 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_amd64.go b/vendor/modernc.org/sqlite/lib/capi_linux_amd64.go index a20a2ec442..e9d333f581 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_arm.go b/vendor/modernc.org/sqlite/lib/capi_linux_arm.go index 37b3b0da36..32859cddf8 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_arm64.go b/vendor/modernc.org/sqlite/lib/capi_linux_arm64.go index 851efb8b12..92317048d3 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1317,6 +1324,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_ppc64le.go b/vendor/modernc.org/sqlite/lib/capi_linux_ppc64le.go index b4b39886bc..0b144f3062 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_ppc64le.go +++ b/vendor/modernc.org/sqlite/lib/capi_linux_ppc64le.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_ppc64le.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_ppc64le.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1318,6 +1325,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go b/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go index a87c816c67..1d559c5dc4 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go +++ b/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.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_riscv64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_riscv64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1318,6 +1325,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_s390x.go b/vendor/modernc.org/sqlite/lib/capi_linux_s390x.go index 4db27f430c..3ff5ad531c 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -193,6 +194,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -380,6 +382,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -595,6 +598,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -685,7 +689,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -700,6 +703,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -799,6 +803,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -882,6 +887,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1249,6 +1255,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1318,6 +1325,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_netbsd_amd64.go b/vendor/modernc.org/sqlite/lib/capi_netbsd_amd64.go index 3cb61cb791..66a387b81c 100644 --- a/vendor/modernc.org/sqlite/lib/capi_netbsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/capi_netbsd_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_netbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -D__libc_cond_broadcast=pthread_cond_broadcast -D__libc_cond_destroy=pthread_cond_destroy -D__libc_cond_init=pthread_cond_init -D__libc_cond_signal=pthread_cond_signal -D__libc_cond_wait=pthread_cond_wait -D__libc_mutex_destroy=pthread_mutex_destroy -D__libc_mutex_init=pthread_mutex_init -D__libc_mutex_lock=pthread_mutex_lock -D__libc_mutex_trylock=pthread_mutex_trylock -D__libc_mutex_unlock=pthread_mutex_unlock -D__libc_mutexattr_destroy=pthread_mutexattr_destroy -D__libc_mutexattr_init=pthread_mutexattr_init -D__libc_mutexattr_settype=pthread_mutexattr_settype -D__libc_thr_yield=sched_yield', 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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_netbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400000/sqlite3.c -full-path-comments -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 -D__libc_cond_broadcast=pthread_cond_broadcast -D__libc_cond_destroy=pthread_cond_destroy -D__libc_cond_init=pthread_cond_init -D__libc_cond_signal=pthread_cond_signal -D__libc_cond_wait=pthread_cond_wait -D__libc_mutex_destroy=pthread_mutex_destroy -D__libc_mutex_init=pthread_mutex_init -D__libc_mutex_lock=pthread_mutex_lock -D__libc_mutex_trylock=pthread_mutex_trylock -D__libc_mutex_unlock=pthread_mutex_unlock -D__libc_mutexattr_destroy=pthread_mutexattr_destroy -D__libc_mutexattr_init=pthread_mutexattr_init -D__libc_mutexattr_settype=pthread_mutexattr_settype -D__libc_thr_yield=sched_yield', DO NOT EDIT. package sqlite3 @@ -192,6 +192,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -594,6 +595,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -684,7 +686,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -699,6 +700,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -798,6 +800,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -881,6 +884,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1248,6 +1252,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1316,6 +1321,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_openbsd_amd64.go b/vendor/modernc.org/sqlite/lib/capi_openbsd_amd64.go index c56e1c02c8..63ef31ffef 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -192,6 +193,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -379,6 +381,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -594,6 +597,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -684,7 +688,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -699,6 +702,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -798,6 +802,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -881,6 +886,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1248,6 +1254,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1316,6 +1323,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_openbsd_arm64.go b/vendor/modernc.org/sqlite/lib/capi_openbsd_arm64.go index 997040554b..03f21fd60a 100644 --- a/vendor/modernc.org/sqlite/lib/capi_openbsd_arm64.go +++ b/vendor/modernc.org/sqlite/lib/capi_openbsd_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_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -58,6 +58,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -192,6 +193,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -379,6 +381,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -594,6 +597,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -684,7 +688,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -699,6 +702,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -798,6 +802,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -881,6 +886,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1248,6 +1254,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1316,6 +1323,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_windows_amd64.go b/vendor/modernc.org/sqlite/lib/capi_windows_amd64.go index e79a22d549..3120ba980e 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -62,6 +62,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -197,6 +198,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -384,6 +386,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -599,6 +602,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -689,7 +693,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -704,6 +707,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -803,6 +807,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -886,6 +891,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1254,6 +1260,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1334,6 +1341,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/capi_windows_arm64.go b/vendor/modernc.org/sqlite/lib/capi_windows_arm64.go index e79a22d549..3120ba980e 100644 --- a/vendor/modernc.org/sqlite/lib/capi_windows_arm64.go +++ b/vendor/modernc.org/sqlite/lib/capi_windows_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_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -62,6 +62,7 @@ var CAPI = map[string]struct{}{ "sqlite3BtreeBeginStmt": {}, "sqlite3BtreeBeginTrans": {}, "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCache": {}, "sqlite3BtreeClearCursor": {}, "sqlite3BtreeClearTable": {}, "sqlite3BtreeClearTableOfCursor": {}, @@ -197,6 +198,7 @@ var CAPI = map[string]struct{}{ "sqlite3DbMallocRawNN": {}, "sqlite3DbMallocSize": {}, "sqlite3DbMallocZero": {}, + "sqlite3DbNNFreeNN": {}, "sqlite3DbNameToBtree": {}, "sqlite3DbRealloc": {}, "sqlite3DbReallocOrFree": {}, @@ -384,6 +386,7 @@ var CAPI = map[string]struct{}{ "sqlite3IsBinary": {}, "sqlite3IsIdChar": {}, "sqlite3IsLikeFunction": {}, + "sqlite3IsMemdb": {}, "sqlite3IsNaN": {}, "sqlite3IsReadOnly": {}, "sqlite3IsRowid": {}, @@ -599,6 +602,7 @@ var CAPI = map[string]struct{}{ "sqlite3ReadOnlyShadowTables": {}, "sqlite3ReadSchema": {}, "sqlite3RealSameAsInt": {}, + "sqlite3RealToI64": {}, "sqlite3Realloc": {}, "sqlite3RecordErrorByteOffset": {}, "sqlite3RecordErrorOffsetOfExpr": {}, @@ -689,7 +693,6 @@ var CAPI = map[string]struct{}{ "sqlite3StdType": {}, "sqlite3StdTypeAffinity": {}, "sqlite3StdTypeLen": {}, - "sqlite3StdTypeMap": {}, "sqlite3StmtCurrentTime": {}, "sqlite3StorageColumnToTable": {}, "sqlite3StrAccumEnlarge": {}, @@ -704,6 +707,7 @@ var CAPI = map[string]struct{}{ "sqlite3SubselectError": {}, "sqlite3SystemError": {}, "sqlite3TableAffinity": {}, + "sqlite3TableAffinityStr": {}, "sqlite3TableColumnAffinity": {}, "sqlite3TableColumnToIndex": {}, "sqlite3TableColumnToStorage": {}, @@ -803,6 +807,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeFreeCursor": {}, "sqlite3VdbeFreeCursorNN": {}, "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetLastOp": {}, "sqlite3VdbeGetOp": {}, "sqlite3VdbeGoto": {}, "sqlite3VdbeHalt": {}, @@ -886,6 +891,7 @@ var CAPI = map[string]struct{}{ "sqlite3VdbeSwap": {}, "sqlite3VdbeTakeOpArray": {}, "sqlite3VdbeTransferError": {}, + "sqlite3VdbeTypeofColumn": {}, "sqlite3VdbeUsesBtree": {}, "sqlite3VectorErrorMsg": {}, "sqlite3VectorFieldSubexpr": {}, @@ -1254,6 +1260,7 @@ var CAPI = map[string]struct{}{ "sqlite3_value_bytes16": {}, "sqlite3_value_double": {}, "sqlite3_value_dup": {}, + "sqlite3_value_encoding": {}, "sqlite3_value_free": {}, "sqlite3_value_frombind": {}, "sqlite3_value_int": {}, @@ -1334,6 +1341,7 @@ var CAPI = map[string]struct{}{ "sqlite3rbu_destroy_vfs": {}, "sqlite3rbu_open": {}, "sqlite3rbu_progress": {}, + "sqlite3rbu_rename_handler": {}, "sqlite3rbu_savestate": {}, "sqlite3rbu_state": {}, "sqlite3rbu_step": {}, diff --git a/vendor/modernc.org/sqlite/lib/mutex.go b/vendor/modernc.org/sqlite/lib/mutex.go index 7f5961f86f..be44263ae7 100644 --- a/vendor/modernc.org/sqlite/lib/mutex.go +++ b/vendor/modernc.org/sqlite/lib/mutex.go @@ -57,35 +57,102 @@ var ( }{mutexNotheld})), } - mutexApp1 mutex - mutexApp2 mutex - mutexApp3 mutex - mutexLRU mutex - mutexMaster mutex - mutexMem mutex - mutexOpen mutex - mutexPMem mutex - mutexPRNG mutex - mutexVFS1 mutex - mutexVFS2 mutex - mutexVFS3 mutex + MutexCounters = libc.NewPerfCounter([]string{ + "enter-fast", + "enter-recursive", + "enter-recursive-loop", + "try-fast", + "try-recursive", + }) + MutexEnterCallers = libc.NewStackCapture(4) + + mutexes mutexPool + + mutexApp1 = mutexes.alloc(false) + mutexApp2 = mutexes.alloc(false) + mutexApp3 = mutexes.alloc(false) + mutexLRU = mutexes.alloc(false) + mutexMaster = mutexes.alloc(false) + mutexMem = mutexes.alloc(false) + mutexOpen = mutexes.alloc(false) + mutexPMem = mutexes.alloc(false) + mutexPRNG = mutexes.alloc(false) + mutexVFS1 = mutexes.alloc(false) + mutexVFS2 = mutexes.alloc(false) + mutexVFS3 = mutexes.alloc(false) ) +type mutexPool struct { + sync.Mutex + a []*[256]mutex + freeList []int +} + +func mutexFromPtr(p uintptr) *mutex { + if p == 0 { + return nil + } + ix := p - 1 + return &mutexes.a[ix>>8][ix&255] +} + +func (m *mutexPool) alloc(recursive bool) uintptr { + m.Lock() + + defer m.Unlock() + + n := len(m.freeList) + if n == 0 { + outer := len(m.a) << 8 + m.a = append(m.a, &[256]mutex{}) + for i := 0; i < 256; i++ { + m.freeList = append(m.freeList, outer+i) + } + n = len(m.freeList) + } + ix := m.freeList[n-1] + outer := ix >> 8 + inner := ix & 255 + m.freeList = m.freeList[:n-1] + p := &m.a[outer][inner] + p.poolIndex = ix + p.recursive = recursive + return uintptr(ix) + 1 +} + +func (m *mutexPool) free(p uintptr) { + ptr := mutexFromPtr(p) + ix := ptr.poolIndex + *ptr = mutex{} + m.Lock() + + defer m.Unlock() + + m.freeList = append(m.freeList, ix) +} + type mutex struct { + sync.Mutex + wait sync.Mutex + + poolIndex int + cnt int32 id int32 - sync.Mutex - wait sync.Mutex + recursive bool } func (m *mutex) enter(id int32) { + // MutexEnterCallers.Record() if !m.recursive { + // MutexCounters.Inc(0) m.Lock() m.id = id return } + // MutexCounters.Inc(1) for { m.Lock() switch m.id { @@ -101,6 +168,7 @@ func (m *mutex) enter(id int32) { return } + // MutexCounters.Inc(2) m.Unlock() m.wait.Lock() //lint:ignore SA2001 TODO report staticcheck issue @@ -110,9 +178,11 @@ func (m *mutex) enter(id int32) { func (m *mutex) try(id int32) int32 { if !m.recursive { + // MutexCounters.Inc(3) return SQLITE_BUSY } + // MutexCounters.Inc(4) m.Lock() switch m.id { case 0: @@ -216,42 +286,40 @@ func mutexAlloc(tls *libc.TLS, typ int32) uintptr { }() switch typ { case SQLITE_MUTEX_FAST: - return libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{}))) + return mutexes.alloc(false) case SQLITE_MUTEX_RECURSIVE: - p := libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{}))) - (*mutex)(unsafe.Pointer(p)).recursive = true - return p + return mutexes.alloc(true) case SQLITE_MUTEX_STATIC_MASTER: - return uintptr(unsafe.Pointer(&mutexMaster)) + return mutexMaster case SQLITE_MUTEX_STATIC_MEM: - return uintptr(unsafe.Pointer(&mutexMem)) + return mutexMem case SQLITE_MUTEX_STATIC_OPEN: - return uintptr(unsafe.Pointer(&mutexOpen)) + return mutexOpen case SQLITE_MUTEX_STATIC_PRNG: - return uintptr(unsafe.Pointer(&mutexPRNG)) + return mutexPRNG case SQLITE_MUTEX_STATIC_LRU: - return uintptr(unsafe.Pointer(&mutexLRU)) + return mutexLRU case SQLITE_MUTEX_STATIC_PMEM: - return uintptr(unsafe.Pointer(&mutexPMem)) + return mutexPMem case SQLITE_MUTEX_STATIC_APP1: - return uintptr(unsafe.Pointer(&mutexApp1)) + return mutexApp1 case SQLITE_MUTEX_STATIC_APP2: - return uintptr(unsafe.Pointer(&mutexApp2)) + return mutexApp2 case SQLITE_MUTEX_STATIC_APP3: - return uintptr(unsafe.Pointer(&mutexApp3)) + return mutexApp3 case SQLITE_MUTEX_STATIC_VFS1: - return uintptr(unsafe.Pointer(&mutexVFS1)) + return mutexVFS1 case SQLITE_MUTEX_STATIC_VFS2: - return uintptr(unsafe.Pointer(&mutexVFS2)) + return mutexVFS2 case SQLITE_MUTEX_STATIC_VFS3: - return uintptr(unsafe.Pointer(&mutexVFS3)) + return mutexVFS3 default: return 0 } } // void (*xMutexFree)(sqlite3_mutex *); -func mutexFree(tls *libc.TLS, m uintptr) { libc.Xfree(tls, m) } +func mutexFree(tls *libc.TLS, m uintptr) { mutexes.free(m) } // The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt to enter // a mutex. If another thread is already within the mutex, @@ -272,8 +340,7 @@ func mutexEnter(tls *libc.TLS, m uintptr) { if m == 0 { return } - - (*mutex)(unsafe.Pointer(m)).enter(tls.ID) + mutexFromPtr(m).enter(tls.ID) } // int (*xMutexTry)(sqlite3_mutex *); @@ -282,7 +349,7 @@ func mutexTry(tls *libc.TLS, m uintptr) int32 { return SQLITE_OK } - return (*mutex)(unsafe.Pointer(m)).try(tls.ID) + return mutexFromPtr(m).try(tls.ID) } // void (*xMutexLeave)(sqlite3_mutex *); @@ -291,7 +358,7 @@ func mutexLeave(tls *libc.TLS, m uintptr) { return } - (*mutex)(unsafe.Pointer(m)).leave(tls.ID) + mutexFromPtr(m).leave(tls.ID) } // The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines are intended @@ -324,7 +391,7 @@ func mutexHeld(tls *libc.TLS, m uintptr) int32 { return 1 } - return libc.Bool32(atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) == tls.ID) + return libc.Bool32(atomic.LoadInt32(&mutexFromPtr(m).id) == tls.ID) } // int (*xMutexNotheld)(sqlite3_mutex *); @@ -333,5 +400,5 @@ func mutexNotheld(tls *libc.TLS, m uintptr) int32 { return 1 } - return libc.Bool32(atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) != tls.ID) + return libc.Bool32(atomic.LoadInt32(&mutexFromPtr(m).id) != tls.ID) } diff --git a/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go index bd86a7fd57..489061cc23 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -524,7 +524,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1301,7 +1300,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1314,49 +1313,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1365,21 +1364,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1391,8 +1390,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1404,22 +1403,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1427,13 +1426,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1448,13 +1447,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_ASSUME_NONNULL_BEGIN = 0 OS_ASSUME_NONNULL_END = 0 @@ -2089,7 +2088,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -2185,6 +2184,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -2320,6 +2320,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -2350,6 +2351,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2450,6 +2452,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2523,7 +2527,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2631,8 +2635,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3217,6 +3221,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -4134,7 +4139,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4465,6 +4479,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4475,6 +4490,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -8690,6 +8723,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -8729,6 +8773,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -8779,7 +8824,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -8794,6 +8839,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -9162,8 +9208,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -9180,7 +9225,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -9442,8 +9486,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -9788,17 +9832,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -9828,7 +9861,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -9837,49 +9877,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 849, - ts + 875, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, ts + 895, - ts + 921, - ts + 944, - ts + 970, - ts + 992, - ts + 1013, - ts + 1024, - ts + 1032, - ts + 1046, - ts + 1059, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -9981,7 +10022,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -10029,10 +10069,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1092)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -10044,10 +10084,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -10057,21 +10093,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1079, - ts + 1083, - ts + 1088, - ts + 1092, - ts + 1100, - ts + 1105, + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, } // SQL is translated into a sequence of instructions to be @@ -10370,7 +10398,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -10506,6 +10534,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -10529,6 +10559,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -10543,9 +10574,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -10904,7 +10938,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1110, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -10930,13 +10964,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1118, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1126, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -11012,7 +11046,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -11034,7 +11068,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -11091,7 +11125,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1142) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 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))) @@ -11224,7 +11258,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1146, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -11248,12 +11282,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1169)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1189)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -11265,7 +11299,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1231) == 0 { if idx > 1 { return 1 } @@ -11287,7 +11321,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1216) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1236) == 0 { if idx > 1 { return 1 } @@ -11301,7 +11335,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1226) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -11309,7 +11343,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1236) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1256) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -11321,7 +11355,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -11355,9 +11389,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -11376,7 +11410,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1259, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1279, 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) { @@ -11390,14 +11424,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1269) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1289) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1275) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1295) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1300) == 0 { rc = 0 } break @@ -11723,7 +11757,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -11733,13 +11767,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1289, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -11757,41 +11791,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1321, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1307, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1327, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -11804,7 +11838,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1332, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -11854,15 +11888,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1216}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1236}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1317}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1322}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1256}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1342}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1356}, + {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 + 1378}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1396}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -12013,7 +12047,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -12277,7 +12311,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1389, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1409, libc.VaList(bp, nByte)) } return p } @@ -12310,7 +12344,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1427, + ts+1447, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -12721,7 +12755,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -12757,7 +12791,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -12777,7 +12811,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -12826,24 +12860,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -13159,7 +13220,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -13232,8 +13293,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1497)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1530)) 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)}, @@ -13445,7 +13506,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1517, 1) + Xsqlite3_str_append(tls, pAccum, ts+1537, 1) goto __5 __11: ; @@ -14006,7 +14067,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1519 + bufpt = ts + 1539 length = 3 goto __58 __127: @@ -14066,7 +14127,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.X__builtin___memcpy_chk(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1523, uint64(4), libc.X__builtin_object_size(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), 0)) + libc.X__builtin___memcpy_chk(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1543, uint64(4), libc.X__builtin_object_size(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), 0)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -14407,7 +14468,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1527 + bufpt = ts + 1547 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -14531,9 +14592,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1528 + return ts + 1548 } - return ts + 1533 + return ts + 1553 }() __220: ; @@ -14681,7 +14742,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1540, 1) + Xsqlite3_str_append(tls, pAccum, ts+1560, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -14698,10 +14759,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1542, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1552, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -14756,7 +14817,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1566)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1586)) // 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 @@ -14921,7 +14982,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1527, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1547, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -15153,20 +15214,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.X__builtin___memcpy_chk(tls, bp, in, uint64(64), libc.X__builtin_object_size(tls, bp, 0)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -15179,46 +15346,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.X__builtin___memcpy_chk(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), 0)) if pVfs == uintptr(0) { - libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{})), libc.X__builtin_object_size(tls, bp, 0)) + libc.X__builtin___memset_chk(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.X__builtin___memcpy_chk(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N), libc.X__builtin_object_size(tls, zBuf, 0)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.X__builtin___memcpy_chk(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn), libc.X__builtin_object_size(tls, zBuf, 0)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -16627,7 +16794,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1575 + var pow63 uintptr = ts + 1595 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -17173,7 +17340,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1594, + ts+1614, libc.VaList(bp, zType)) } @@ -17192,13 +17359,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1528) + logBadConnection(tls, ts+1548) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1639) + logBadConnection(tls, ts+1659) } return 0 } else { @@ -17211,7 +17378,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1648) + logBadConnection(tls, ts+1668) return 0 } else { return 1 @@ -17736,193 +17903,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1656, - ts + 1666, - ts + 1677, - ts + 1689, - ts + 1700, - ts + 1712, - ts + 1719, - ts + 1727, - ts + 1735, - ts + 1740, - ts + 1746, + ts + 1676, + ts + 1686, + ts + 1697, + ts + 1709, + ts + 1720, + ts + 1732, + ts + 1739, + ts + 1747, + ts + 1755, ts + 1760, - ts + 1766, - ts + 1776, - ts + 1781, - ts + 1786, - ts + 1789, - ts + 1795, - ts + 1808, - ts + 1818, - ts + 1822, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1860, + ts + 1765, + ts + 1771, + ts + 1785, + ts + 1791, + ts + 1801, + ts + 1806, + ts + 1811, + ts + 1814, + ts + 1820, + ts + 1827, + ts + 1831, + ts + 1841, + ts + 1848, + ts + 1855, + ts + 1862, ts + 1869, - ts + 1880, - ts + 1889, - ts + 1895, - ts + 1905, - ts + 1915, - ts + 1920, - ts + 1930, - ts + 1941, - ts + 1946, - ts + 1953, - ts + 1964, - ts + 1969, - ts + 1974, - ts + 1980, - ts + 1986, - ts + 1992, - ts + 1998, - ts + 2001, + ts + 1879, + ts + 1888, + ts + 1899, + ts + 1908, + ts + 1914, + ts + 1924, + ts + 1934, + ts + 1939, + ts + 1949, + ts + 1960, + ts + 1965, + ts + 1972, + ts + 1983, + ts + 1988, + ts + 1993, + ts + 1999, ts + 2005, - ts + 2016, - ts + 2027, + ts + 2011, + ts + 2014, + ts + 2018, + ts + 2024, ts + 2035, - ts + 2044, - ts + 2050, - ts + 2057, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, - ts + 2083, + ts + 2046, + ts + 2054, + ts + 2063, + ts + 2070, + ts + 2078, + ts + 2081, + ts + 2084, + ts + 2087, ts + 2090, - ts + 2100, - ts + 2113, - ts + 2124, - ts + 2130, - ts + 2137, - ts + 2142, - ts + 2151, - ts + 2160, - ts + 2167, - ts + 2180, - ts + 2191, - ts + 2196, - ts + 2204, + ts + 2093, + ts + 2096, + ts + 2103, + ts + 2109, + ts + 2119, + ts + 2132, + ts + 2143, + ts + 2149, + ts + 2156, + ts + 2165, + ts + 2174, + ts + 2181, + ts + 2194, + ts + 2205, ts + 2210, - ts + 2217, - ts + 2229, - ts + 2234, + ts + 2218, + ts + 2224, + ts + 2231, ts + 2243, ts + 2248, ts + 2257, ts + 2262, - ts + 2267, - ts + 2273, + ts + 2271, + ts + 2276, ts + 2281, - ts + 2289, - ts + 2299, - ts + 2307, - ts + 2314, - ts + 2327, - ts + 2332, - ts + 2344, - ts + 2352, - ts + 2359, - ts + 2370, - ts + 2377, + ts + 2287, + ts + 2295, + ts + 2303, + ts + 2313, + ts + 2321, + ts + 2328, + ts + 2341, + ts + 2346, + ts + 2358, + ts + 2366, + ts + 2373, ts + 2384, - ts + 2394, - ts + 2403, - ts + 2414, - ts + 2420, - ts + 2431, - ts + 2441, - ts + 2451, - ts + 2458, - ts + 2464, - ts + 2474, - ts + 2485, - ts + 2489, - ts + 2498, - ts + 2507, - ts + 2514, - ts + 2524, - ts + 2531, - ts + 2540, - ts + 2550, - ts + 2557, - ts + 2565, + ts + 2391, + ts + 2398, + ts + 2408, + ts + 2417, + ts + 2428, + ts + 2434, + ts + 2445, + ts + 2455, + ts + 2465, + ts + 2472, + ts + 2478, + ts + 2488, + ts + 2499, + ts + 2503, + ts + 2512, + ts + 2521, + ts + 2528, + ts + 2538, + ts + 2545, + ts + 2554, + ts + 2564, + ts + 2571, ts + 2579, - ts + 2587, + ts + 2593, ts + 2601, - ts + 2612, - ts + 2625, - ts + 2636, - ts + 2642, - ts + 2654, - ts + 2663, - ts + 2671, - ts + 2680, - ts + 2689, - ts + 2696, - ts + 2704, - ts + 2711, - ts + 2722, + ts + 2615, + ts + 2626, + ts + 2639, + ts + 2650, + ts + 2656, + ts + 2668, + ts + 2677, + ts + 2685, + ts + 2694, + ts + 2703, + ts + 2710, + ts + 2718, + ts + 2725, ts + 2736, - ts + 2747, - ts + 2755, + ts + 2750, ts + 2761, ts + 2769, - ts + 2777, - ts + 2787, - ts + 2800, - ts + 2810, - ts + 2823, - ts + 2832, - ts + 2843, - ts + 2851, + ts + 2775, + ts + 2783, + ts + 2791, + ts + 2801, + ts + 2814, + ts + 2824, + ts + 2837, + ts + 2846, ts + 2857, - ts + 2869, - ts + 2881, - ts + 2889, - ts + 2901, - ts + 2914, - ts + 2924, - ts + 2934, - ts + 2939, - ts + 2951, - ts + 2963, - ts + 2973, - ts + 2979, - ts + 2989, - ts + 2996, - ts + 3008, - ts + 3019, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3054, - ts + 3061, - ts + 3072, - ts + 3085, - ts + 3095, - ts + 3102, - ts + 3110, - ts + 3119, - ts + 3125, + ts + 2865, + ts + 2871, + ts + 2883, + ts + 2895, + ts + 2903, + ts + 2915, + ts + 2928, + ts + 2938, + ts + 2948, + ts + 2953, + ts + 2965, + ts + 2977, + ts + 2987, + ts + 2993, + ts + 3003, + ts + 3010, + ts + 3022, + ts + 3033, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3068, + ts + 3075, + ts + 3086, + ts + 3099, + ts + 3109, + ts + 3116, + ts + 3124, ts + 3133, - ts + 3141, - ts + 3149, - ts + 3159, - ts + 3168, - ts + 3179, - ts + 3189, - ts + 3195, - ts + 3206, - ts + 3217, - ts + 3222, - ts + 3230, + ts + 3139, + ts + 3147, + ts + 3155, + ts + 3163, + ts + 3173, + ts + 3182, + ts + 3193, + ts + 3203, + ts + 3209, + ts + 3220, + ts + 3231, + ts + 3236, + ts + 3244, } // Copyright (c) 2017 Apple Inc. All rights reserved. @@ -19324,35 +19491,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3240, FpCurrent: 0}, - {FzName: ts + 3245, FpCurrent: 0}, - {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, + {FzName: ts + 3254, FpCurrent: 0}, + {FzName: ts + 3259, FpCurrent: 0}, {FzName: ts + 3265, FpCurrent: 0}, - {FzName: ts + 3270, FpCurrent: 0}, - {FzName: ts + 3276, FpCurrent: 0}, - {FzName: ts + 3286, FpCurrent: 0}, - {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3297, FpCurrent: 0}, - {FzName: ts + 3303}, + {FzName: ts + 3272, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3284, FpCurrent: 0}, + {FzName: ts + 3290, FpCurrent: 0}, + {FzName: ts + 3300, FpCurrent: 0}, + {FzName: ts + 3306, FpCurrent: 0}, {FzName: ts + 3311, FpCurrent: 0}, - {FzName: ts + 3317, FpCurrent: 0}, - {FzName: ts + 3324}, - {FzName: ts + 3333, FpCurrent: 0}, - {FzName: ts + 3340}, - {FzName: ts + 3350, FpCurrent: 0}, - {FzName: ts + 3357, FpCurrent: 0}, + {FzName: ts + 3317}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3331, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3347, FpCurrent: 0}, + {FzName: ts + 3354}, + {FzName: ts + 3364, FpCurrent: 0}, {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3377, FpCurrent: 0}, - {FzName: ts + 3383, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3403, FpCurrent: 0}, - {FzName: ts + 3410}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, + {FzName: ts + 3397, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3412, FpCurrent: 0}, {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3438, FpCurrent: 0}, - {FzName: ts + 3444}, + {FzName: ts + 3424}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3452, FpCurrent: 0}, + {FzName: ts + 3458}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -19445,11 +19612,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3450, libc.VaList(bp, z, fd)) + ts+3464, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3493, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3507, O_RDONLY, int32(m)) < 0 { break } } @@ -19529,13 +19699,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__error(tls))) - zErr = ts + 1527 + zErr = ts + 1547 if zPath == uintptr(0) { - zPath = ts + 1527 + zPath = ts + 1547 } Xsqlite3_log(tls, errcode, - ts+3503, + ts+3517, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -19543,7 +19713,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3245, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3259, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -19564,7 +19734,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -19611,7 +19781,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { if (*stat)(unsafe.Pointer(bp)).Fst_size == int64(0) && (*UnixFile)(unsafe.Pointer(pFile)).FfsFlags&uint32(SQLITE_FSFLAGS_IS_MSDOS) != uint32(0) { for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { - rc = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 11*24 + 8)))(tls, fd, ts+3534, uint64(1))) + rc = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 11*24 + 8)))(tls, fd, ts+3548, uint64(1))) } if rc != 1 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) @@ -19681,19 +19851,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3536, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3550, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if int32((*stat)(unsafe.Pointer(bp+32)).Fst_nlink) == 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3560, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3574, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if int32((*stat)(unsafe.Pointer(bp+32)).Fst_nlink) > 1 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3589, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3603, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3616, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3630, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -20109,7 +20279,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -20858,7 +21028,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3644, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3658, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -20876,7 +21046,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3357, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -20893,14 +21063,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3647, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3661, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -20920,7 +21090,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -20975,7 +21145,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1527, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1547, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -20988,7 +21158,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -21056,7 +21226,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -21222,7 +21392,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -21250,7 +21420,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3276, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -21313,7 +21483,7 @@ __4: ; libc.X__builtin___memset_chk(tls, pShmNode, 0, uint64(unsafe.Sizeof(unixShmNode{}))+uint64(nShmFilename), libc.X__builtin_object_size(tls, pShmNode, 0)) zShm = libc.AssignPtrUintptr(pShmNode+16, pShmNode+1*96) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3658, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3672, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -21334,7 +21504,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3665, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3679, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -21349,7 +21519,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3240, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) goto shm_open_err __10: ; @@ -21475,11 +21645,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 144)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1527, 1, bp+144) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1547, 1, bp+144) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3311, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) goto shmpage_out __14: ; @@ -21525,7 +21695,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3398, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -21726,7 +21896,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3398 + var zErr uintptr = ts + 3412 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -21764,7 +21934,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -21921,7 +22091,7 @@ func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr (*flock)(unsafe.Pointer(bp + 2176)).Fl_whence = int16(SEEK_SET) (*flock)(unsafe.Pointer(bp + 2176)).Fl_type = int16(F_RDLCK) if (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pNew)).Fh, F_GETLK, libc.VaList(bp, bp+2176)) != -1 { - if libc.Xstrcmp(tls, bp+8+72, ts+3678) == 0 { + if libc.Xstrcmp(tls, bp+8+72, ts+3692) == 0 { return uintptr(unsafe.Pointer(&nfsIoMethods)) } else { return uintptr(unsafe.Pointer(&posixIoMethods)) @@ -21938,11 +22108,11 @@ type Mapping = struct { } var aMap = [6]Mapping{ - {FzFilesystem: ts + 3682, FpMethods: 0}, - {FzFilesystem: ts + 3686, FpMethods: 0}, - {FzFilesystem: ts + 3690, FpMethods: 0}, {FzFilesystem: ts + 3696, FpMethods: 0}, - {FzFilesystem: ts + 3702, FpMethods: 0}, + {FzFilesystem: ts + 3700, FpMethods: 0}, + {FzFilesystem: ts + 3704, FpMethods: 0}, + {FzFilesystem: ts + 3710, FpMethods: 0}, + {FzFilesystem: ts + 3716, FpMethods: 0}, {}, } var autolockIoFinder uintptr = 0 @@ -21969,10 +22139,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3709, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3723, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3714) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3728) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -21991,7 +22161,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -22008,7 +22178,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, 41214) + robust_close(tls, pNew, h, 42407) h = -1 } unixLeaveMutex(tls) @@ -22022,7 +22192,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3724, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3738, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -22030,7 +22200,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -22043,15 +22213,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3732, - ts + 3741, - ts + 3750, - ts + 1540, + ts + 3746, + ts + 3755, + ts + 3764, + ts + 1560, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3755) - azTempDirs[1] = libc.Xgetenv(tls, ts+3769) + azTempDirs[0] = libc.Xgetenv(tls, ts+3769) + azTempDirs[1] = libc.Xgetenv(tls, ts+3783) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -22096,7 +22266,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3776, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3790, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -22181,7 +22351,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3793) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3807) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -22233,10 +22403,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -22350,7 +22520,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3240, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -22394,17 +22564,17 @@ __25: goto __26 } storeLastErrno(tls, p, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - robust_close(tls, p, fd, 41768) + robust_close(tls, p, fd, 42961) return SQLITE_IOERR | int32(13)<<8 __26: ; - if !(0 == libc.Xstrncmp(tls, ts+3800, bp+528+72, uint64(5))) { + if !(0 == libc.Xstrncmp(tls, ts+3814, bp+528+72, uint64(5))) { goto __27 } *(*uint32)(unsafe.Pointer(pFile + 124)) |= uint32(SQLITE_FSFLAGS_IS_MSDOS) __27: ; - if !(0 == libc.Xstrncmp(tls, ts+3806, bp+528+72, uint64(5))) { + if !(0 == libc.Xstrncmp(tls, ts+3820, bp+528+72, uint64(5))) { goto __28 } *(*uint32)(unsafe.Pointer(pFile + 124)) |= uint32(SQLITE_FSFLAGS_IS_MSDOS) @@ -22444,7 +22614,7 @@ __33: if !(isAutoProxy != 0 && zPath != uintptr(0) && !(noLock != 0) && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen != 0) { goto __34 } - envforce = libc.Xgetenv(tls, ts+3812) + envforce = libc.Xgetenv(tls, ts+3826) useProxy = 0 if !(envforce != uintptr(0)) { @@ -22463,7 +22633,7 @@ __36: if !(rc == SQLITE_OK) { goto __38 } - rc = proxyTransformUnixFile(tls, pFile, ts+3839) + rc = proxyTransformUnixFile(tls, pFile, ts+3853) if !(rc != SQLITE_OK) { goto __39 } @@ -22502,7 +22672,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+3350, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) } return rc } @@ -22510,9 +22680,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+3846, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3860, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -22579,18 +22749,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3438, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&S_IFMT == S_IFLNK { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+144, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3429, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 144 + uintptr(got))) = int8(0) @@ -22630,14 +22800,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3258, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -22669,7 +22839,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3644, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3658, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -22697,11 +22867,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.X__builtin___memset_chk(tls, zBuf, 0, uint64(nBuf), libc.X__builtin_object_size(tls, zBuf, 0)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3852, O_RDONLY, uint16(0)) + fd = robust_open(tls, ts+3866, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.X__builtin___memcpy_chk(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0))), libc.X__builtin_object_size(tls, zBuf, 0)) @@ -22712,7 +22882,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -22789,12 +22959,12 @@ func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_ if !(libc.Xconfstr(tls, X_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) != 0) { return SQLITE_IOERR | int32(15)<<8 } - len = int32(libc.Xstrlcat(tls, lPath, ts+3865, maxLen)) + len = int32(libc.Xstrlcat(tls, lPath, ts+3879, maxLen)) } if int32(*(*int8)(unsafe.Pointer(lPath + uintptr(len-1)))) != '/' { - len = int32(libc.Xstrlcat(tls, lPath, ts+3878, maxLen)) + len = int32(libc.Xstrlcat(tls, lPath, ts+3892, maxLen)) } dbLen = int32(libc.Xstrlen(tls, dbPath)) @@ -22808,7 +22978,7 @@ func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_ }() } *(*int8)(unsafe.Pointer(lPath + uintptr(i+len))) = int8(0) - libc.Xstrlcat(tls, lPath, ts+3839, maxLen) + libc.Xstrlcat(tls, lPath, ts+3853, maxLen) return SQLITE_OK } @@ -22926,7 +23096,7 @@ __11: __12: return SQLITE_IOERR | int32(15)<<8 __13: - return Xsqlite3CantopenError(tls, 42566) + return Xsqlite3CantopenError(tls, 43759) __10: ; __8: @@ -22943,7 +23113,7 @@ __14: (*UnixFile)(unsafe.Pointer(pNew)).FopenFlags = openFlags libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3_vfs{})), libc.X__builtin_object_size(tls, bp, 0)) (*Sqlite3_vfs)(unsafe.Pointer(bp)).FpAppData = uintptr(unsafe.Pointer(&autolockIoFinder)) - (*Sqlite3_vfs)(unsafe.Pointer(bp)).FzName = ts + 3880 + (*Sqlite3_vfs)(unsafe.Pointer(bp)).FzName = ts + 3894 (*UnixUnusedFd)(unsafe.Pointer(pUnused)).Ffd = fd (*UnixUnusedFd)(unsafe.Pointer(pUnused)).Fflags = openFlags (*UnixFile)(unsafe.Pointer(pNew)).FpPreallocatedUnused = pUnused @@ -22957,7 +23127,7 @@ __14: __15: ; end_create_proxy: - robust_close(tls, pNew, fd, 42590) + robust_close(tls, pNew, fd, 43783) Xsqlite3_free(tls, pNew) Xsqlite3_free(tls, pUnused) return rc @@ -23001,16 +23171,16 @@ func proxyBreakConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr) int32 { cPath = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FconchFilePath readLen = uint64(0) pathLen = uint64(0) - *(*[64]int8)(unsafe.Pointer(bp + 1088)) = *(*[64]int8)(unsafe.Pointer(ts + 3886)) + *(*[64]int8)(unsafe.Pointer(bp + 1088)) = *(*[64]int8)(unsafe.Pointer(ts + 3900)) fd = -1 rc = -1 _ = myHostID pathLen = libc.Xstrlcpy(tls, bp+64, cPath, uint64(PATH_MAX)) - if !(pathLen > uint64(PATH_MAX) || pathLen < uint64(6) || libc.Xstrlcpy(tls, bp+64+uintptr(pathLen-uint64(5)), ts+3950, uint64(6)) != uint64(5)) { + if !(pathLen > uint64(PATH_MAX) || pathLen < uint64(6) || libc.Xstrlcpy(tls, bp+64+uintptr(pathLen-uint64(5)), ts+3964, uint64(6)) != uint64(5)) { goto __1 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3956, libc.VaList(bp, int32(pathLen))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3970, libc.VaList(bp, int32(pathLen))) goto end_breaklock __1: ; @@ -23018,7 +23188,7 @@ __1: if !(readLen < uint64(PROXY_HEADERLEN+PROXY_HOSTIDLEN)) { goto __2 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3976, libc.VaList(bp+8, int32(readLen))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3990, libc.VaList(bp+8, int32(readLen))) goto end_breaklock __2: ; @@ -23026,27 +23196,27 @@ __2: if !(fd < 0) { goto __3 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3996, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4010, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) goto end_breaklock __3: ; if !((*(*func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 12*24 + 8)))(tls, fd, bp+1152, readLen, int64(0)) != Ssize_t(readLen)) { goto __4 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4015, libc.VaList(bp+24, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4029, libc.VaList(bp+24, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) goto end_breaklock __4: ; if !(libc.Xrename(tls, bp+64, cPath) != 0) { goto __5 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4033, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4047, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) goto end_breaklock __5: ; rc = 0 - libc.Xfprintf(tls, libc.X__stderrp, ts+4052, libc.VaList(bp+40, cPath)) - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 42693) + libc.Xfprintf(tls, libc.X__stderrp, ts+4066, libc.VaList(bp+40, cPath)) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 43886) (*UnixFile)(unsafe.Pointer(conchFile)).Fh = fd (*UnixFile)(unsafe.Pointer(conchFile)).FopenFlags = O_RDWR | O_CREAT @@ -23058,10 +23228,10 @@ 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, 42701) + robust_close(tls, pFile, fd, 43894) __7: ; - libc.Xfprintf(tls, libc.X__stderrp, ts+4076, libc.VaList(bp+48, cPath, bp+1088)) + libc.Xfprintf(tls, libc.X__stderrp, ts+4090, libc.VaList(bp+48, cPath, bp+1088)) __6: ; return rc @@ -23338,7 +23508,7 @@ end_takeconch: if !((*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0) { goto __29 } - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 42954) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 44147) __29: ; (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 @@ -23350,7 +23520,7 @@ __29: (*UnixFile)(unsafe.Pointer(pFile)).Fh = fd goto __31 __30: - rc = Xsqlite3CantopenError(tls, 42962) + rc = Xsqlite3CantopenError(tls, 44155) __31: ; @@ -23468,7 +23638,7 @@ func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) i++ } - libc.X__builtin___memcpy_chk(tls, conchPath+uintptr(i+1), ts+4114, uint64(7), libc.X__builtin_object_size(tls, conchPath+uintptr(i+1), 0)) + libc.X__builtin___memcpy_chk(tls, conchPath+uintptr(i+1), ts+4128, uint64(7), libc.X__builtin_object_size(tls, conchPath+uintptr(i+1), 0)) return SQLITE_OK } @@ -23482,7 +23652,7 @@ func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { return SQLITE_BUSY } - if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3839) != 0) || oldPath != 0 && !(libc.Xstrncmp(tls, oldPath, path, uint64(PATH_MAX)) != 0) { + if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3853) != 0) || oldPath != 0 && !(libc.Xstrncmp(tls, oldPath, path, uint64(PATH_MAX)) != 0) { return SQLITE_OK } else { var lockProxy uintptr = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxy @@ -23509,7 +23679,7 @@ func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int libc.Xstrlcpy(tls, dbPath, (*AfpLockingContext)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FlockingContext)).FdbPath, uint64(PATH_MAX)) } else if (*UnixFile)(unsafe.Pointer(pFile)).FpMethod == uintptr(unsafe.Pointer(&dotlockIoMethods)) { - var len int32 = int32(libc.Xstrlen(tls, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext) - libc.Xstrlen(tls, ts+4121)) + var len int32 = int32(libc.Xstrlen(tls, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext) - libc.Xstrlen(tls, ts+4135)) libc.X__builtin___memcpy_chk(tls, dbPath, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext, uint64(len+1), libc.X__builtin_object_size(tls, dbPath, 0)) } else { libc.Xstrlcpy(tls, dbPath, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext, uint64(PATH_MAX)) @@ -23530,7 +23700,7 @@ func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { return SQLITE_BUSY } proxyGetDbPathForUnixFile(tls, pFile, bp) - if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3839) != 0) { + if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3853) != 0) { lockPath = uintptr(0) } else { lockPath = path @@ -23601,7 +23771,7 @@ func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { if (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath != 0 { *(*uintptr)(unsafe.Pointer(pArg)) = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath } else { - *(*uintptr)(unsafe.Pointer(pArg)) = ts + 4127 + *(*uintptr)(unsafe.Pointer(pArg)) = ts + 4141 } } else { *(*uintptr)(unsafe.Pointer(pArg)) = uintptr(0) @@ -23624,7 +23794,7 @@ func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { var proxyPath uintptr = pArg if isProxyStyle != 0 { var pCtx uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext - if !(libc.Xstrcmp(tls, pArg, ts+3839) != 0) || + if !(libc.Xstrcmp(tls, pArg, ts+3853) != 0) || (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath != 0 && !(libc.Xstrncmp(tls, (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath, proxyPath, uint64(PATH_MAX)) != 0) { rc = SQLITE_OK } else { @@ -23774,15 +23944,15 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [9]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4145, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4150, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4160, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3714, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4173, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4184, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4195, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4204, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4213, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4159, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4164, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4174, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3728, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4187, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4198, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4209, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4218, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4227, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -23837,7 +24007,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 4224, + FzName: ts + 4238, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -24004,40 +24174,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -24048,7 +24263,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4230, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4244, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -24104,7 +24319,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.X__builtin___memset_chk(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{})), libc.X__builtin_object_size(tls, pFile, 0)) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -24180,7 +24395,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3644, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3658, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -24301,7 +24516,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+4245, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+4259, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -24374,7 +24589,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+4268, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+4282, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -24437,6 +24652,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -25120,6 +25340,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -25152,6 +25373,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -27581,7 +27803,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+4283, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+4297, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -28718,7 +28940,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -28779,7 +29001,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.X__builtin___memcpy_chk(tls, pPtr, zPathname, uint64(nPathname), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(nPathname) - libc.X__builtin___memcpy_chk(tls, pPtr, ts+4310, uint64(8), libc.X__builtin_object_size(tls, pPtr, 0)) + libc.X__builtin___memcpy_chk(tls, pPtr, ts+4324, uint64(8), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -28792,7 +29014,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.X__builtin___memcpy_chk(tls, pPtr, zPathname, uint64(nPathname), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(nPathname) - libc.X__builtin___memcpy_chk(tls, pPtr, ts+4319, uint64(4), libc.X__builtin_object_size(tls, pPtr, 0)) + libc.X__builtin___memcpy_chk(tls, pPtr, ts+4333, uint64(4), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -28844,9 +29066,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4324, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4338, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4331, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4345, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -29110,7 +29332,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -29234,7 +29456,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -29273,7 +29495,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -29350,7 +29572,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -29477,6 +29699,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -30350,7 +30573,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -30535,7 +30758,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+4341, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+4355, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -31106,7 +31329,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -31205,7 +31428,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -31373,7 +31596,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+4359, + ts+4373, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -31791,7 +32014,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -31936,7 +32159,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+4396, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4410, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -32066,7 +32289,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -32539,7 +32762,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -33044,7 +33267,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -33435,7 +33658,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4422)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4436)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -33700,7 +33923,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -33837,7 +34060,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -33854,7 +34077,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -33862,7 +34085,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -33905,7 +34128,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -33915,7 +34138,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -34165,7 +34388,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -34197,8 +34420,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -34213,7 +34435,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -34223,7 +34445,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -34236,7 +34458,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -34245,14 +34467,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __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)) @@ -34262,7 +34484,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -34309,63 +34531,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.X__builtin___memcpy_chk(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart), libc.X__builtin_object_size(tls, temp+uintptr(iCellStart), 0)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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.X__builtin___memcpy_chk(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart), libc.X__builtin_object_size(tls, temp+uintptr(iCellStart), 0)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.X__builtin___memcpy_chk(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size), libc.X__builtin_object_size(tls, data+uintptr(cbrk), 0)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -34397,10 +34613,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.X__builtin___memcpy_chk(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2), libc.X__builtin_object_size(tls, aData+uintptr(iAddr), 0)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -34411,15 +34626,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -34444,7 +34659,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -34455,7 +34670,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -34503,26 +34718,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -34532,7 +34747,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -34540,7 +34755,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -34548,10 +34763,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -34620,7 +34835,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -34650,11 +34865,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -34665,15 +34880,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -34701,14 +34916,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -34722,7 +34937,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -34734,7 +34949,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -34837,7 +35052,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -34865,7 +35080,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -34904,7 +35119,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -34928,7 +35143,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -34977,7 +35192,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4438) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4452) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -35749,7 +35964,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4447, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4461, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -35787,7 +36002,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -36202,7 +36417,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -36228,7 +36443,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -36236,6 +36451,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -36245,7 +36463,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -36261,7 +36479,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -36322,7 +36540,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -36357,7 +36575,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -36417,7 +36635,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -36456,7 +36674,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -36487,7 +36705,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -36828,7 +37046,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -37072,14 +37290,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -37124,7 +37342,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -37173,7 +37391,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -37252,10 +37470,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -37263,7 +37479,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -37325,7 +37542,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -37345,7 +37562,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -37365,7 +37582,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -37577,7 +37794,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -37781,7 +37998,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -37846,7 +38063,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -37894,7 +38111,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -38013,7 +38230,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -38173,7 +38390,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -38238,7 +38455,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -38274,7 +38491,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -38318,7 +38535,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -38430,7 +38647,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -38588,7 +38805,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -38645,7 +38862,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -38661,7 +38878,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -38735,7 +38952,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -38747,7 +38964,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -38758,7 +38975,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -38923,7 +39140,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -39195,12 +39412,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -39208,7 +39425,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.X__builtin___memmove_chk(tls, pData, pCell, uint64(sz), libc.X__builtin_object_size(tls, pData, 0)) @@ -39268,7 +39485,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, 74290) + Xsqlite3CorruptError(tls, 75549) 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)) @@ -39357,7 +39574,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __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)) @@ -39473,7 +39690,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -39791,7 +40008,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -39802,7 +40019,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -39960,7 +40177,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -40034,7 +40251,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -40096,7 +40313,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -40124,7 +40341,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -40385,7 +40602,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -40575,7 +40792,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -40612,6 +40829,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -40702,7 +40921,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -40725,7 +40944,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -40805,7 +41024,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -40918,7 +41137,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -40979,7 +41198,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -41017,13 +41236,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.X__builtin___memcpy_chk(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124))), libc.X__builtin_object_size(tls, oldCell, 0)) @@ -41130,7 +41349,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -41153,7 +41372,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -41254,7 +41473,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -41262,11 +41481,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -41341,7 +41560,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -41410,7 +41629,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -41439,7 +41658,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -41515,7 +41734,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -41529,7 +41748,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -41663,7 +41882,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -41851,7 +42070,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4451, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4465, 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)) @@ -41876,11 +42095,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4453, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4467, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4476, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4490, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { @@ -41901,13 +42120,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4501, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4515, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4530, + ts+4544, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -41926,7 +42145,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4584, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4598, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -41937,7 +42156,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4606, libc.VaList(bp+8, iPage)) + ts+4620, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -41960,12 +42179,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4645, + ts+4659, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4671 + return ts + 4685 } - return ts + 4676 + return ts + 4690 }(), expected-N, expected)) } @@ -42072,13 +42291,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4697 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4711 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4707, libc.VaList(bp, rc)) + ts+4721, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -42089,7 +42308,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4745, libc.VaList(bp+8, rc)) + ts+4759, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -42097,14 +42316,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4783, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4797, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4805 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4819 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -42121,7 +42340,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4831 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4845 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -42146,7 +42365,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4859, + checkAppendMsg(tls, pCheck, ts+4873, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -42159,7 +42378,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4889, 0) + checkAppendMsg(tls, pCheck, ts+4903, 0) doCoverageCheck = 0 goto __10 __13: @@ -42175,7 +42394,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4913, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4927, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -42213,7 +42432,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4937, 0) + checkAppendMsg(tls, pCheck, ts+4951, 0) depth = d2 __21: ; @@ -42286,7 +42505,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4962, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4976, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -42303,7 +42522,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4999, + ts+5013, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -42423,7 +42642,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 5051 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 5065 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)).FzPfx = uintptr(0) @@ -42459,7 +42678,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+5067, + ts+5081, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -42469,7 +42688,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+5112, 0) + ts+5126, 0) __16: ; __10: @@ -42516,13 +42735,13 @@ __23: 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+5167, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+5181, 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+5189, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+5203, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -42757,6 +42976,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -42770,8 +42998,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -42779,7 +43007,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3644, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3658, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -42790,7 +43018,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+5223, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+5237, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -42805,7 +43033,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+5243, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+5257, 0) return SQLITE_ERROR } return SQLITE_OK @@ -42825,7 +43053,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+5274, 0) + pDestDb, SQLITE_ERROR, ts+5288, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -43273,7 +43501,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+5314, + Xsqlite3_str_appendf(tls, bp+8, ts+5328, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -43690,6 +43918,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -43705,7 +43946,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -43765,6 +44006,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -43847,7 +44091,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1527 + return ts + 1547 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -44079,7 +44323,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -44311,7 +44555,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3644, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3658, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -44373,7 +44617,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1527 + zNeg = ts + 1547 rc = SQLITE_OK __1: @@ -44414,7 +44658,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 5321 + zNeg = ts + 5335 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -44433,7 +44677,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+5323, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+5337, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -44737,7 +44981,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -44752,14 +44996,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -44818,6 +45062,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -44842,10 +45089,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.X__builtin___memset_chk(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136), libc.X__builtin_object_size(tls, p+136, 0)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -44883,21 +45130,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -45246,85 +45501,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -45424,6 +45711,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -45451,7 +45748,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -45459,12 +45756,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -45483,7 +45780,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -45534,7 +45833,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -45663,8 +45962,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -45675,10 +45974,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -45689,6 +45984,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -45704,34 +46004,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+5328, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+5342, 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 + 1527 + zColl = ts + 1547 } - if libc.Xstrcmp(tls, zColl, ts+1072) == 0 { - zColl = ts + 5333 + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 5347 } - Xsqlite3_str_appendf(tls, bp+144, ts+5335, + Xsqlite3_str_appendf(tls, bp+144, ts+5349, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 5321 + return ts + 5335 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 5343 + return ts + 5357 } - return ts + 1527 + return ts + 1547 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+5346, 1) + Xsqlite3_str_append(tls, bp+144, ts+5360, 1) break } @@ -45739,7 +46039,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+5348, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+5362, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -45747,32 +46047,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+5357, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+5371, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+5357, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+5371, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1307, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+5364, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+5378, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1301, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -45782,13 +46082,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1307, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, 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+1301, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1528 + zP4 = ts + 1548 } else { - zP4 = ts + 5367 + zP4 = ts + 5381 } break @@ -45796,7 +46096,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+5374, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+5388, libc.VaList(bp+120, pVtab)) break } @@ -45807,20 +46107,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+5382, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+5396, 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+5387, 1) + Xsqlite3_str_append(tls, bp+144, ts+5401, 1) break } case -4: { - zP4 = ts + 5389 + zP4 = ts + 5403 break } @@ -45845,7 +46145,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 5397, ts + 5399, ts + 5401, ts + 5406} +var encnames = [4]uintptr{ts + 5411, ts + 5413, ts + 5415, ts + 5420} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -45947,7 +46247,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -46296,8 +46596,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5411, ts + 5416, ts + 5423, ts + 5426, ts + 5429, ts + 5432, ts + 5435, ts + 5438, - ts + 5446, ts + 5449, ts + 5456, ts + 5464, + ts + 5425, ts + 5430, ts + 5437, ts + 5440, ts + 5443, ts + 5446, ts + 5449, ts + 5452, + ts + 5460, ts + 5463, ts + 5470, ts + 5478, } // Close a VDBE cursor and release all the resources that cursor @@ -46506,7 +46806,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5471, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5485, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -46514,16 +46814,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5483, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5497, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5497, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5511, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5512, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5526, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -46669,7 +46969,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5525, 0) + Xsqlite3VdbeError(tls, p, ts+5539, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -46949,7 +47249,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -46959,14 +47259,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -46977,16 +47279,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -47003,7 +47301,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -47554,16 +47852,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -47581,7 +47883,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -47611,7 +47917,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -47645,7 +47951,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -47668,7 +47974,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -47690,7 +47996,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -47834,7 +48147,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -48005,7 +48318,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -48031,7 +48344,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -48074,7 +48387,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -48142,13 +48455,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5555 + zContext = ts + 5569 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5574 + zContext = ts + 5588 } else { - zContext = ts + 5593 + zContext = ts + 5607 } - zMsg = Xsqlite3_mprintf(tls, ts+5602, + zMsg = Xsqlite3_mprintf(tls, ts+5616, 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) @@ -48179,7 +48492,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -48234,7 +48547,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -48253,7 +48566,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5638, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5652, 0) return 1 } else { return 0 @@ -48263,7 +48576,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5683, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5697, 0) return 1 } else { return vdbeSafety(tls, p) @@ -48305,14 +48618,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -48524,6 +48838,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -48720,7 +49038,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5723, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5737, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -48911,7 +49229,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -48986,7 +49304,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5746) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5760) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -49415,35 +49733,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5756, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5770, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -49458,7 +49775,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -49490,7 +49807,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -49505,7 +49822,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -49516,7 +49833,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -49526,7 +49843,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -49602,7 +49919,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -49746,7 +50063,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -49764,8 +50081,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -49829,7 +50149,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -49973,7 +50293,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -50145,7 +50465,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5796, 3) + Xsqlite3_str_append(tls, bp+48, ts+5810, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -50181,11 +50501,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1528, 4) + Xsqlite3_str_append(tls, bp+48, ts+1548, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1307, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1327, 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+5314, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5328, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -50200,21 +50520,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5800, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5814, 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+5807, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5821, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5820, 2) + Xsqlite3_str_append(tls, bp+48, ts+5834, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5823, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5837, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5828, 1) + Xsqlite3_str_append(tls, bp+48, ts+5842, 1) } } } @@ -50270,7 +50590,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -50374,12 +50695,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -50431,11 +50751,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1088, - ts + 1100, - ts + 1105, - ts + 1083, - ts + 1528, + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1548, } // Execute as much of a VDBE program as we can. @@ -50473,7 +50793,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -50502,11 +50821,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -50576,42 +50898,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -50619,52 +50942,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -50706,19 +51029,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -50727,7 +51050,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -50735,11 +51058,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -50975,7 +51298,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -51471,20 +51794,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5830, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5844, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5851, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5865, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5858, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5872, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -51874,14 +52197,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -51959,72 +52282,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -52041,10 +52372,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -52056,33 +52387,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -52091,43 +52422,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.X__builtin___memcpy_chk(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0))), libc.X__builtin_object_size(tls, bp+216, 0)) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.X__builtin___memcpy_chk(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0))), libc.X__builtin_object_size(tls, bp+224, 0)) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -52143,26 +52474,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -52170,12 +52501,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -52190,17 +52521,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -52215,163 +52546,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -52380,20 +52711,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -52403,15 +52734,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -52419,9 +52750,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -52433,52 +52764,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -52487,24 +52818,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -52518,13 +52849,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -52533,38 +52864,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -52573,10 +52904,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -52584,10 +52915,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -52595,35 +52926,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -52631,372 +53000,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.X__builtin___memset_chk(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{})), libc.X__builtin_object_size(tls, bp+232, 0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -53004,15 +53374,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -53021,124 +53391,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5882, + Xsqlite3VdbeError(tls, p, ts+5896, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -53148,40 +53518,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -53199,339 +53569,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.X__builtin___memcpy_chk(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0))), libc.X__builtin_object_size(tls, bp+296, 0)) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.X__builtin___memcpy_chk(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn), libc.X__builtin_object_size(tls, zPayload, 0)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.X__builtin___memcpy_chk(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn), libc.X__builtin_object_size(tls, zPayload, 0)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -53540,20 +53910,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -53564,244 +53934,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5923, 0) + Xsqlite3VdbeError(tls, p, ts+5937, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*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)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5974, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5988, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5996, 0) + ts+6010, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -53810,172 +54180,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+6050, 0) + ts+6064, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 6105 + return ts + 6119 } return func() uintptr { if iRollback != 0 { - return ts + 6153 + return ts + 6167 } - return ts + 6196 + return ts + 6210 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+6237) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+6251) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -53995,36 +54365,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -54032,22 +54402,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -54058,24 +54428,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -54083,30 +54453,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -54122,10 +54492,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -54134,10 +54504,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -54157,83 +54527,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1547 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -54242,31 +54612,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -54274,10 +54644,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -54298,105 +54668,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -54408,231 +54778,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -54642,85 +55014,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -54728,59 +55100,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -54795,121 +55167,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -54917,93 +55289,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -55016,7 +55388,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -55031,81 +55403,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -55115,38 +55487,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -55154,205 +55526,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -55362,90 +55734,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -55454,36 +55826,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -55494,88 +55866,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+6265) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+6279) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -55587,35 +55959,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -55624,63 +55996,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -55689,13 +56061,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -55703,20 +56075,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -55726,45 +56098,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -55777,10 +56149,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -55791,10 +56163,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -55802,30 +56174,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 6282 + goto __797 +__796: + zSchema = ts + 6296 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+6296, + ts+6310, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -55835,36 +56207,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -55872,10 +56244,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -55907,22 +56279,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -55932,15 +56304,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -55950,17 +56322,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -55970,34 +56342,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -56006,48 +56378,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+6339, 0) + Xsqlite3VdbeError(tls, p, ts+6353, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -56055,10 +56427,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -56080,24 +56452,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -56129,78 +56501,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -56208,11 +56580,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -56228,14 +56600,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -56243,16 +56615,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -56260,16 +56632,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -56280,10 +56652,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -56306,73 +56678,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -56382,22 +56754,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -56410,32 +56782,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -56447,70 +56819,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+6376, + ts+6390, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6428 + return ts + 6442 } - return ts + 6433 + return ts + 6447 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -56518,17 +56890,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -56538,10 +56910,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -56555,10 +56927,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -56568,69 +56940,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6440, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6454, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -56638,16 +57010,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -56660,17 +57032,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -56680,24 +57052,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -56705,52 +57077,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5746, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5760, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -56759,54 +57131,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.X__builtin___memset_chk(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{})), libc.X__builtin_object_size(tls, bp+976, 0)) @@ -56814,69 +57186,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -56888,27 +57260,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -56916,42 +57288,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -56960,41 +57332,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -57008,16 +57380,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -57029,25 +57401,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -57056,24 +57428,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -57098,16 +57470,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -57122,66 +57494,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6469, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6483, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -57202,73 +57574,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6475, + Xsqlite3_log(tls, rc, ts+6489, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -57276,13 +57648,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5723, 0) + Xsqlite3VdbeError(tls, p, ts+5737, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1463, 0) + Xsqlite3VdbeError(tls, p, ts+1483, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -57293,10 +57665,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6507, ts + 6516, ts + 6523, - ts + 6529} +var azType = [4]uintptr{ts + 6521, ts + 6530, ts + 6537, + ts + 6543} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -57345,16 +57721,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6541, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6555, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6570 + return ts + 6584 } return func() uintptr { if type1 == U32(7) { - return ts + 6575 + return ts + 6589 } - return ts + 6580 + return ts + 6594 }() }())) rc = SQLITE_ERROR @@ -57374,10 +57750,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6588, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6602, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3644, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3658, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -57387,8 +57763,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -57408,7 +57784,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -57428,8 +57804,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -57437,21 +57813,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6608, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6622, 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+6638, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6652, 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+6674, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6688, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -57460,8 +57836,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -57494,8 +57870,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6695, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6709, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -57522,7 +57898,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6716 + zFault = ts + 6730 __22: ; goto __20 @@ -57555,7 +57931,7 @@ __26: 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 + 6728 + zFault = ts + 6742 __29: ; goto __27 @@ -57575,8 +57951,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6736, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6750, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -57645,7 +58021,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -57673,12 +58049,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3644 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3658 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -57722,7 +58098,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -57805,7 +58181,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -57818,7 +58194,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -60258,11 +60634,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -60422,7 +60794,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6770, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6784, zDb) == 0) { goto __8 } @@ -60543,7 +60915,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6775) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6789) != 0) { goto __33 } goto __14 @@ -60699,14 +61071,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6777, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6791, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6781, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6795, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -60723,7 +61095,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6785, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6799, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -60817,7 +61189,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -60826,7 +61198,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -60881,7 +61253,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6794, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6808, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -60889,14 +61261,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6825, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6839, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) return WRC_Abort __87: ; @@ -60948,7 +61320,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6880, libc.VaList(bp+16, zCol)) + ts+6894, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.X__builtin___memset_chk(tls, pExpr+64, 0, uint64(unsafe.Sizeof(struct{ FpTab uintptr }{})), libc.X__builtin_object_size(tls, pExpr+64, 0)) return WRC_Prune @@ -60985,7 +61357,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6915 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6929 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -60998,23 +61370,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6924 + zErr = ts + 6938 } else { - zErr = ts + 6939 + zErr = ts + 6953 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6961, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6975, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6974, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6988, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6984, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6998, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -61117,15 +61489,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6991 + var zIn uintptr = ts + 7005 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 7019 + zIn = ts + 7033 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 7037 + zIn = ts + 7051 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 7055 + zIn = ts + 7069 } - Xsqlite3ErrorMsg(tls, pParse, ts+7073, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+7087, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -61204,10 +61576,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 7093 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7107 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7098 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7112 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -61254,7 +61626,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7104, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+7118, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -61318,7 +61690,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+7121, libc.VaList(bp, pExpr)) + ts+7135, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -61334,7 +61706,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+7185, + Xsqlite3ErrorMsg(tls, pParse, ts+7199, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -61348,7 +61720,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7221, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+7235, uintptr(0), pExpr) } } else { @@ -61371,30 +61743,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+7249, libc.VaList(bp+16, pExpr)) + ts+7263, 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 + 7292 + zType = ts + 7306 } else { - zType = ts + 7299 + zType = ts + 7313 } - Xsqlite3ErrorMsg(tls, pParse, ts+7309, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7323, 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+7337, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7351, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7359, + Xsqlite3ErrorMsg(tls, pParse, ts+7373, 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+7403, + ts+7417, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -61466,7 +61838,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7451, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7465, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -61482,7 +61854,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7462, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7476, pExpr, pExpr) } break @@ -61538,7 +61910,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -61613,7 +61985,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7473, libc.VaList(bp, i, zType, mx)) + ts+7487, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -61633,7 +62005,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7529, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7543, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -61668,7 +62040,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7563, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7577, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -61725,7 +62097,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7569, libc.VaList(bp, i+1)) + ts+7583, libc.VaList(bp, i+1)) return 1 } } @@ -61753,7 +62125,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7630, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7644, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -61967,7 +62339,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7661, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7675, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -62007,7 +62379,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7563) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7577) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -62018,7 +62390,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7700) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7714) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -62030,7 +62402,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7706, 0) + ts+7720, 0) return WRC_Abort } @@ -62130,12 +62502,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -62171,12 +62543,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -62295,9 +62667,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -62385,14 +62755,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -62720,7 +63089,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) return } @@ -62795,7 +63164,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7765, libc.VaList(bp, mxHeight)) + ts+7779, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -62963,12 +63332,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -63039,12 +63413,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7813, + Xsqlite3ErrorMsg(tls, pParse, ts+7827, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7857 + return ts + 7871 } - return ts + 1527 + return ts + 1547 }(), nElem)) break } @@ -63083,7 +63457,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7859) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7873) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -63109,7 +63483,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7861, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7875, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -63137,7 +63511,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7895, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7909, libc.VaList(bp, pExpr)) } } } @@ -63184,7 +63558,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7915, + Xsqlite3ErrorMsg(tls, pParse, ts+7929, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -63209,7 +63583,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7958, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7972, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -63230,11 +63604,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -63263,7 +63634,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -63359,7 +63734,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -63783,7 +64158,7 @@ __2: 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+7981, + Xsqlite3ErrorMsg(tls, pParse, ts+7995, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -63906,7 +64281,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+8011, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+8025, libc.VaList(bp, zObject)) } } @@ -63916,10 +64291,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -63960,10 +64337,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+7093) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+7107) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+7098) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+7112) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -64394,13 +64771,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+8034) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8048) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8042) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8056) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8048) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8062) == 0 { return 1 } return 0 @@ -64604,7 +64981,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8052, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -64682,7 +65059,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+8299, + Xsqlite3ErrorMsg(tls, pParse, ts+8313, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -66076,7 +66492,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -66090,10 +66506,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -66106,8 +66522,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -66115,12 +66531,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -66146,10 +66562,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -66160,14 +66574,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -66197,27 +66613,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -66226,9 +66642,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -66236,15 +66652,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+8352, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8366, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -66275,8 +66691,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+8379, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+8393, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -66398,8 +66814,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -66420,9 +66836,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -66435,13 +66851,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7981, + Xsqlite3ErrorMsg(tls, pParse, ts+7995, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -66452,11 +66868,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -66478,12 +66894,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -66498,14 +66914,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -66513,9 +66953,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66525,15 +66965,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -66543,22 +66983,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -66567,51 +67007,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8403, 0) + ts+8417, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -66620,18 +67060,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8453)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8467)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -66843,7 +67283,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -67082,6 +67522,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -67308,6 +67749,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -67453,7 +67895,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -67979,7 +68425,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -67997,8 +68445,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -68066,6 +68513,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -68089,7 +68538,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -68112,7 +68563,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -68125,7 +68576,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -68145,7 +68598,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -68285,7 +68740,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -68293,7 +68748,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -68344,11 +68799,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 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+8469, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8483, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -68360,13 +68815,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8497, + ts+8511, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8672, + ts+8686, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -68376,10 +68831,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8846, libc.VaList(bp, zDb, zDb)) + ts+8860, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8993, 0) + ts+9007, 0) } } @@ -68443,7 +68898,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+9144, libc.VaList(bp, zName)) + ts+9158, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -68453,7 +68908,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+9203, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+9217, zName)) { goto __6 } goto exit_rename_table @@ -68462,7 +68917,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+9209, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9223, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -68503,19 +68958,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+9236, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+9250, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9420, + ts+9434, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9725, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9739, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9741, + ts+9755, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -68523,7 +68978,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9799, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9813, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -68535,7 +68990,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+10064, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+10078, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -68547,7 +69002,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+10077, + ts+10091, libc.VaList(bp, zErr, zDb, zTab)) } @@ -68593,12 +69048,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10115, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10129, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+10147, 0) + ts+10161, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -68608,11 +69063,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10174) + ts+10188) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+10233) + ts+10247) } if pDflt != 0 { @@ -68625,12 +69080,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+10286) + ts+10300) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+10332) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+10346) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -68641,7 +69096,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+10359, + ts+10373, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -68663,7 +69118,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10505, + ts+10519, libc.VaList(bp+40, zTab, zDb)) } } @@ -68711,14 +69166,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10735, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10749, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10769, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10783, 0) goto exit_begin_add_column __4: ; @@ -68746,7 +69201,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10799, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10813, 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 } @@ -68786,18 +69241,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10818 + zType = ts + 10832 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10823 + zType = ts + 10837 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10837, + Xsqlite3ErrorMsg(tls, pParse, ts+10851, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10855 + return ts + 10869 } - return ts + 10872 + return ts + 10886 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -68881,11 +69336,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10890, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10904, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -68898,17 +69353,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10911, + ts+10925, 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+11093, + ts+11107, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+10064, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+10078, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -69103,7 +69558,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -69166,12 +69621,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11224, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11238, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 11247 + return ts + 11261 } - return ts + 1527 + return ts + 1547 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -69211,8 +69666,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+11249, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+11263, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -69229,7 +69684,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -69251,7 +69706,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+11257, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+11271, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -69291,12 +69746,12 @@ 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+11263, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+11277, 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 + 11247 + return ts + 11261 } - return ts + 1527 + return ts + 1547 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -69469,8 +69924,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -69553,15 +70008,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.X__builtin___memset_chk(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+440, 0)) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.X__builtin___memset_chk(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+448, 0)) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -69589,7 +70044,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -69622,13 +70077,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -69641,7 +70096,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -69656,7 +70111,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -69712,8 +70167,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -69761,7 +70216,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -69781,7 +70236,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -69829,8 +70284,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -69872,11 +70327,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.X__builtin___memset_chk(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+488, 0)) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.X__builtin___memset_chk(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+496, 0)) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -69946,7 +70401,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -69969,8 +70424,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -69988,16 +70443,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.X__builtin___memset_chk(tls, bp+408, 0, uint64(unsafe.Sizeof(RenameCtx{})), libc.X__builtin_object_size(tls, bp+408, 0)) - libc.X__builtin___memset_chk(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+440, 0)) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.X__builtin___memset_chk(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{})), libc.X__builtin_object_size(tls, bp+416, 0)) + libc.X__builtin___memset_chk(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+448, 0)) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -70012,31 +70467,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -70054,8 +70509,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -70081,9 +70536,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.X__builtin___memset_chk(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+408, 0)) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.X__builtin___memset_chk(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+416, 0)) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -70111,8 +70566,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -70149,7 +70604,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -70173,7 +70628,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+11268, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+11282, 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) @@ -70254,19 +70709,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10890, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10904, libc.VaList(bp, pName)) goto exit_drop_column __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+11275, + Xsqlite3ErrorMsg(tls, pParse, ts+11289, 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 + 11303 + return ts + 11317 } - return ts + 6516 + return ts + 6530 }(), zCol)) goto exit_drop_column @@ -70275,7 +70730,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+11315, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+11329, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -70289,13 +70744,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+11363, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11377, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11484, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11498, 1) 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 @@ -70413,11 +70868,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11502}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11523}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11543}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11562}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11581}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11516}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11537}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11557}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11576}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11595}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -70451,7 +70906,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11604, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11618, 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) } @@ -70460,10 +70915,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+11627, + ts+11641, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11657, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11671, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -70481,9 +70936,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11675, FzCols: ts + 11688}, - {FzName: ts + 11701, FzCols: ts + 11714}, - {FzName: ts + 11742}, + {FzName: ts + 11689, FzCols: ts + 11702}, + {FzName: ts + 11715, FzCols: ts + 11728}, + {FzName: ts + 11756}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -70674,7 +71129,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11755} + FzName: ts + 11769} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -70925,7 +71380,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11765} + FzName: ts + 11779} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -70939,7 +71394,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11775, + Xsqlite3_str_appendf(tls, bp+24, ts+11789, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -70952,7 +71407,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11780, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11794, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -70994,7 +71449,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11786, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11800, 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)).FnChar-- @@ -71008,7 +71463,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11792} + FzName: ts + 11806} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -71052,7 +71507,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11801, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11815, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -71069,7 +71524,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+11675, 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+11689, 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, -6) @@ -71225,7 +71680,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11811, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11825, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -71282,7 +71737,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+11811, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11825, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -71329,9 +71784,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+11815) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11829) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11819) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11833) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -71414,7 +71869,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1527 + z = ts + 1547 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -71436,15 +71891,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+11823, z) == 0 { + if Xsqlite3_strglob(tls, ts+11837, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11834, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11848, 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+11844, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11858, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -71720,11 +72175,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11701, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11715, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11856, - ts+11910, + ts+11870, + ts+11924, zDb) } return rc @@ -71771,10 +72226,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11675, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11689, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11962, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11976, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -71832,7 +72287,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6770, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6784, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -71862,20 +72317,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1527 + zFile = ts + 1547 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1527 + zName = ts + 1547 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+4224) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+4238) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -71891,13 +72346,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12003, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12017, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12006, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12020, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -71911,7 +72366,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12043, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12057, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -71922,7 +72377,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -71975,7 +72430,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12073, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12087, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -71992,7 +72447,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+12102, 0) + ts+12116, 0) rc = SQLITE_ERROR __23: ; @@ -72058,13 +72513,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1463, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12170, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12184, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -72111,7 +72566,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1527 + zName = ts + 1547 __1: ; i = 0 @@ -72142,14 +72597,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12198, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12212, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12219, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12233, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -72157,7 +72612,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12245, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12259, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -72268,7 +72723,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12267} + FzName: ts + 12281} // Called by the parser to compile an ATTACH statement. // @@ -72281,7 +72736,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12281} + FzName: ts + 12295} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -72295,7 +72750,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+12295, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+12309, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -72327,7 +72782,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+12319, + ts+12333, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -72502,7 +72957,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+12365, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12379, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -72528,11 +72983,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+12388, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+12402, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+12394, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12408, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12414, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -72579,7 +73034,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 8042 + zCol = ts + 8056 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -72603,7 +73058,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+12427, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12441, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -72697,6 +73152,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -72724,9 +73181,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -72745,62 +73201,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -72847,13 +73295,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.X__builtin___memcpy_chk(tls, bp, pParse+uintptr(uint64(uintptr(0)+272)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, bp, 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)) + libc.X__builtin___memcpy_chk(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, bp, 0)) + libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.X__builtin___memcpy_chk(tls, pParse+uintptr(uint64(uintptr(0)+272)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0)) + libc.X__builtin___memcpy_chk(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -72878,25 +73326,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6770) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6784) == 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+8461, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8475, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12442+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12461+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6282+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12456+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6296+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12475) + ts+12489) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12461+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+6282) + ts+6296) } } } @@ -72917,12 +73365,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8461, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12461+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+6282) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12442+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8475, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+6296) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12456+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12475) + ts+12489) } } } @@ -72951,9 +73399,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12494, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12508, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -72964,21 +73412,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12502 + zMsg = ts + 12516 } else { - zMsg = ts + 12515 + zMsg = ts + 12529 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6974, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6988, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6984, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6998, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -73008,12 +73456,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8461, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6282+7) == 0 { - return ts + 12461 + if Xsqlite3_strnicmp(tls, zName, ts+8475, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6296+7) == 0 { + return ts + 12475 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 { - return ts + 12442 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12489+7) == 0 { + return ts + 12456 } } return zName @@ -73118,10 +73566,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+688 { - libc.X__builtin___memcpy_chk(tls, db+688, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{})), libc.X__builtin_object_size(tls, db+688, 0)) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.X__builtin___memcpy_chk(tls, db+696, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{})), libc.X__builtin_object_size(tls, db+696, 0)) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -73277,11 +73725,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -73298,7 +73746,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -73327,7 +73775,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -73371,7 +73819,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+6282) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+6296) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -73397,7 +73845,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6770, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6784, zName) { goto __3 } @@ -73450,13 +73898,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+12529, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12543, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12546, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12560, libc.VaList(bp, pName1)) return -1 } } else { @@ -73494,13 +73942,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8461, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8475, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12566, + Xsqlite3ErrorMsg(tls, pParse, ts+12580, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -73660,9 +74108,9 @@ 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 + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -73678,7 +74126,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12608, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12622, 0) return __4: ; @@ -73706,9 +74154,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10818 + return ts + 10832 } - return ts + 9203 + return ts + 9217 }(), zName) != 0) { goto __8 } @@ -73724,9 +74172,9 @@ __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 + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -73757,12 +74205,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12649, + Xsqlite3ErrorMsg(tls, pParse, ts+12663, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10818 + return ts + 10832 } - return ts + 9203 + return ts + 9217 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -73777,7 +74225,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12670, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12684, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -73812,8 +74260,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -73834,7 +74282,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -73864,7 +74312,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12705, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12719, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -73888,7 +74336,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12736, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -73897,7 +74345,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -73908,7 +74356,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12705 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12719 (*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) @@ -73920,7 +74368,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12705, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12719, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -73954,7 +74402,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+12756, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12770, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -73962,13 +74410,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12779, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12793, 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)).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+12786, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12800, 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)).Fn-- @@ -74005,7 +74453,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+12796, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12810, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -74169,10 +74617,10 @@ 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+12822, + Xsqlite3ErrorMsg(tls, pParse, ts+12836, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12867, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12881, 0) } else { var pDfltExpr uintptr libc.X__builtin___memset_chk(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{})), libc.X__builtin_object_size(tls, bp+8, 0)) @@ -74203,7 +74651,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12908, 0) + ts+12922, 0) } } @@ -74248,7 +74696,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12960, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12974, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -74337,7 +74785,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+13001, 0) + ts+13015, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -74363,7 +74811,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -74432,7 +74880,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+13057, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13071, 0) goto generated_done __2: ; @@ -74445,13 +74893,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13100, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13114, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13108, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13122, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -74484,7 +74932,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+13115, + Xsqlite3ErrorMsg(tls, pParse, ts+13129, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -74605,13 +75053,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1527 - zSep2 = ts + 13146 - zEnd = ts + 5346 + zSep = ts + 1547 + zSep2 = ts + 13160 + zEnd = ts + 5360 } else { - zSep = ts + 13148 - zSep2 = ts + 13152 - zEnd = ts + 13157 + zSep = ts + 13162 + zSep2 = ts + 13166 + zEnd = ts + 13171 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -74619,7 +75067,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+13160, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+13174, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -74653,16 +75101,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3644, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3658, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1527, - ts + 13174, - ts + 13180, - ts + 13185, - ts + 13190, + ts + 1547, + ts + 13188, + ts + 13194, + ts + 13199, + ts + 13204, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -74801,8 +75249,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -74929,7 +75377,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -74953,7 +75401,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -75052,7 +75500,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -75069,10 +75517,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+13196, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) + ts+13210, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+13229, + Xsqlite3ErrorMsg(tls, pParse, ts+13243, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -75091,11 +75539,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+13256, 0) + ts+13270, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+13306, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13320, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -75129,7 +75577,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13338, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13352, 0) return } } @@ -75154,11 +75602,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 9203 - zType2 = ts + 13382 + zType = ts + 9217 + zType2 = ts + 13396 } else { - zType = ts + 10818 - zType2 = ts + 13388 + zType = ts + 10832 + zType2 = ts + 13402 } if pSelect != 0 { @@ -75220,7 +75668,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -75229,11 +75677,11 @@ 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+13393, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13407, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13408, + ts+13422, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -75249,13 +75697,13 @@ 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+13506, + ts+13520, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13548, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13562, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -75270,7 +75718,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9725) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9739) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -75300,7 +75748,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+13582, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13596, 0) goto create_view_fail __1: ; @@ -75316,7 +75764,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10818, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10832, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -75379,10 +75827,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -75400,12 +75845,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13618, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13632, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -75465,6 +75906,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -75524,13 +75972,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13648, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13662, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13663, + ts+13677, 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) } @@ -75571,10 +76019,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13730, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13744, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11627, + ts+11641, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -75606,12 +76054,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13744, + ts+13758, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13789, + ts+13803, 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) @@ -75639,11 +76087,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3265, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7462, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7476, 10) == 0 { return 0 } return 1 @@ -75721,9 +76169,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -75782,21 +76230,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13856, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13870, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13884, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13898, 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+13918, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -75808,7 +76256,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11819, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11833, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -75872,7 +76320,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13950, + ts+13964, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -75884,7 +76332,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto fk_end goto __7 __6: @@ -75969,7 +76417,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+14107, + ts+14121, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -76196,12 +76644,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+14153, + Xsqlite3ErrorMsg(tls, pParse, ts+14167, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 14181 + return ts + 14195 } - return ts + 14187 + return ts + 14201 }())) return 1 } @@ -76322,7 +76770,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14192, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14206, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -76341,7 +76789,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+14198, + ts+14212, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -76367,26 +76815,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+14248, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14262, 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+14276, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14290, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+14301, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14315, 0) goto exit_create_index __17: ; @@ -76400,7 +76848,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14192, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14206, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -76412,10 +76860,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+14335, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14349, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -76427,7 +76875,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+14369, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14383, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -76456,7 +76904,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+14393, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14407, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -76477,9 +76925,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -76518,7 +76966,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14192) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14206) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -76619,7 +77067,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14416, 0) + ts+14430, 0) goto exit_create_index __56: ; @@ -76633,6 +77081,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -76653,6 +77102,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -76834,7 +77284,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14477, libc.VaList(bp+48, 0)) + ts+14491, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -76886,8 +77336,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14519, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14533, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -76933,12 +77383,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14536, + zStmt = Xsqlite3MPrintf(tls, db, ts+14550, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1527 + return ts + 1547 } - return ts + 14556 + return ts + 14570 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -76946,7 +77396,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14564, + ts+14578, 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, @@ -76960,7 +77410,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14623, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14637, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -77121,7 +77571,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14650, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14664, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -77136,7 +77586,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14668, libc.VaList(bp+8, 0)) + ts+14682, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -77147,9 +77597,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -77175,9 +77625,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14741, + ts+14755, 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+11815, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11829, (*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) @@ -77258,6 +77708,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -77265,7 +77716,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -77311,7 +77762,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+14801, + Xsqlite3ErrorMsg(tls, pParse, ts+14815, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -77446,6 +77897,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -77457,11 +77909,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -77488,7 +77942,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -77516,12 +77970,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14837, + Xsqlite3ErrorMsg(tls, pParse, ts+14851, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14873 + return ts + 14887 } - return ts + 14876 + return ts + 14890 }())) goto append_from_error __1: @@ -77690,7 +78144,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14882, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14896, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -77726,9 +78180,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14888 + return ts + 14902 } - return ts + 14897 + return ts + 14911 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -77753,7 +78207,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14882, ts + 14904, ts + 14888} +var az = [3]uintptr{ts + 14896, ts + 14918, ts + 14902} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -77768,7 +78222,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14912, 0) + ts+14926, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -77786,7 +78240,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12388, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12402, 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+14996, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15010, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -78072,7 +78526,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+15005, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15019, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -78168,7 +78622,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+15051, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15065, libc.VaList(bp, zName)) } } } @@ -78268,7 +78722,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -78282,7 +78736,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*40)).FzName = pColl + 3*40 (*CollSeq)(unsafe.Pointer(pColl + 2*40)).Fenc = U8(SQLITE_UTF16BE) libc.X__builtin___memcpy_chk(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint64(nName), libc.X__builtin_object_size(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, 0)) - pDel = Xsqlite3HashInsert(tls, db+640, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -78361,7 +78815,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+15081, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15095, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -78488,7 +78942,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -78522,7 +78976,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -78545,26 +78999,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{})), libc.X__builtin_object_size(tls, bp, 0)) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -78630,10 +79085,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+15126, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -78646,19 +79117,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15112, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15159, 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+15141, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15188, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -78885,17 +79358,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -78908,10 +79383,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -78920,15 +79395,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -78937,98 +79412,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.X__builtin___memset_chk(tls, aToOpen, 1, uint64(nIdx+1), libc.X__builtin_object_size(tls, aToOpen, 0)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 72)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -79036,138 +79511,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15179) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15226) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -79270,7 +79750,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+11675) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11689) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -79500,7 +79980,7 @@ 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 + 6580, ts + 6575, ts + 8334, ts + 8329, ts + 6570} +var azType2 = [5]uintptr{ts + 6594, ts + 6589, ts + 8348, ts + 8343, ts + 6584} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -79559,7 +80039,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+15192, -1) + Xsqlite3_result_error(tls, context, ts+15239, -1) return } iVal = -iVal @@ -79863,7 +80343,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+15209, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+15256, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -80053,7 +80533,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -80166,13 +80646,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -80195,7 +80689,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+15214, -1) + Xsqlite3_result_error(tls, context, ts+15261, -1) return } if argc == 3 { @@ -80205,7 +80699,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+15247, -1) + ts+15294, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -80258,7 +80752,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3644, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3658, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -80298,13 +80792,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+5314, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+5328, 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+15292, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+15339, libc.VaList(bp+8, r1)) } } break @@ -80312,7 +80806,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1307, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1327, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -80341,13 +80835,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+15299, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+15346, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1528, 4) + Xsqlite3_str_append(tls, pStr, ts+1548, 4) break } @@ -80657,7 +81151,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 11247} +var azOne = [1]uintptr{ts + 11261} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -80669,7 +81163,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1527 + zIn = ts + 1547 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -80693,7 +81187,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+15302, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+15349, 4, uintptr(0)) } } @@ -80718,7 +81212,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12427, -1) + Xsqlite3_result_error(tls, context, ts+12441, -1) return } @@ -80796,7 +81290,7 @@ func sumFinalize(tls *libc.TLS, context 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+15192, -1) + Xsqlite3_result_error(tls, context, ts+15239, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -81057,7 +81551,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+15307, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+15354, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -81077,14 +81571,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+15313, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15360, 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+15313, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15360, 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+15313, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15313, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15360, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15360, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -81324,107 +81818,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 15318}, - {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 + 15338}, - {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 + 15351}, - {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 + 15369}, - {FnArg: int8(1), 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_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15427}, - {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 + 15452}, - {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 + 15461}, - {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 + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15479}, - {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 + 15493}, - {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 + 15493}, - {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 + 15499}, - {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 + 15499}, - {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 + 15505}, - {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 + 15505}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15510}, - {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 + 15510}, - {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 + 15514}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15514}, - {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 + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15518}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15525}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15533}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15546}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15553}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15560}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15568}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15573}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15583}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15589}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15595}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15599}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15606}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15613}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15624}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15631}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15646}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15663}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15674}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15680}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15698}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15706}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15720}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15728}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15737}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15737}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15744}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15744}, - {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 + 15754}, - {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 + 15758}, - {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 + 15764}, - {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 + 15768}, - {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 + 15768}, - {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 + 15774}, - {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 + 15774}, - {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 + 15787}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15313}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15313}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6915}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6915}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15792}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15797}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15805}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15817}, - {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 + 15820}, - {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 + 15824}, - {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 + 15830}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15820}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15835}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15839}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15843}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15849}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15853}, + {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 + 15365}, + {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 + 15385}, + {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 + 15398}, + {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 + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15448}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15474}, + {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 + 15499}, + {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 + 15508}, + {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 + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15526}, + {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 + 15540}, + {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 + 15540}, + {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 + 15546}, + {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 + 15546}, + {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 + 15552}, + {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 + 15552}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15557}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15557}, + {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 + 15557}, + {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 + 15561}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15561}, + {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 + 15561}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15565}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15572}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15580}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15593}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15600}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15607}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15615}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15620}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15624}, + {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 + 15630}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15636}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15642}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15646}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15653}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15660}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15671}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15678}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15693}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15710}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15721}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15727}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15745}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15753}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15767}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15775}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15784}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15791}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15791}, + {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 + 15801}, + {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 + 15805}, + {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 + 15811}, + {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 + 15815}, + {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 + 15815}, + {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 + 15821}, + {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 + 15821}, + {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 + 15834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15360}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15360}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6929}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6929}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15839}, + {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 + 15852}, {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(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15868}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15874}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15878}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15864}, + {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 + 15867}, + {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 + 15871}, + {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 + 15877}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15867}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15882}, - {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 + 15891}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15896}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15907}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15913}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15919}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15924}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15932}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15940}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15943}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6915}, - {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 + 15948}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15886}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15890}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15896}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15900}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15905}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15910}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15915}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15921}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15925}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15929}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15933}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15938}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15943}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15948}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15954}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15960}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15966}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15971}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15979}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15987}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15990}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6929}, + {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 + 15995}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -81545,7 +82039,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+15952, + ts+15999, 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) @@ -82205,8 +82699,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6781, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6777, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6795, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6791, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -82285,7 +82779,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5525) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5539) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -82387,7 +82881,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -82495,6 +82989,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -82535,13 +83050,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -82553,21 +83067,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -82638,7 +83142,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -82696,7 +83200,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+8299, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8313, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -82999,6 +83503,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -83162,7 +83668,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15997, + ts+16044, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -83187,7 +83693,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16038, + Xsqlite3ErrorMsg(tls, pParse, ts+16085, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -83336,7 +83842,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+16070, + ts+16117, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -83346,7 +83852,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+16122, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+16169, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -83398,7 +83904,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+16147, + Xsqlite3ErrorMsg(tls, pParse, ts+16194, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -83406,7 +83912,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+16193, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+16240, 0) goto insert_cleanup __57: ; @@ -83588,7 +84094,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -83603,137 +84122,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -83745,64 +84264,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16214) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16261) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -83810,7 +84333,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -84113,7 +84640,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12388, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12402, 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) @@ -85203,13 +85730,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1527 + zSql = ts + 1547 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -85648,6 +86175,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -85686,7 +86214,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12427, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12441, 0) __3: ; return SQLITE_ERROR @@ -85695,7 +86223,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 16228 + zEntry = ts + 16275 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -85710,7 +86238,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+12388, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+12402, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -85746,7 +86274,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16251, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16298, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -85760,7 +86288,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16260, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16307, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -85784,7 +86312,7 @@ __17: goto __18 __18: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16264, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16311, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -85802,7 +86330,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+16270, libc.VaList(bp+16, zEntry, zFile)) + ts+16317, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -85829,7 +86357,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16313, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16360, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -85867,7 +86395,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+16345, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+16392, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -85877,7 +86405,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 16382, + ts + 16429, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -86033,7 +86561,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+16388, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16435, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -86041,63 +86569,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5446, - ts + 16427, - ts + 9203, - ts + 16431, - ts + 16436, - ts + 16439, - ts + 16449, - ts + 16459, - ts + 16465, - ts + 16469, - ts + 16474, - ts + 16479, - ts + 16487, - ts + 16498, - ts + 16501, - ts + 16508, - ts + 16469, - ts + 16474, - ts + 16515, - ts + 16520, - ts + 16523, - ts + 16530, - ts + 16465, - ts + 16469, - ts + 16536, - ts + 16541, - ts + 16546, - ts + 16469, - ts + 16550, + ts + 5460, ts + 16474, - ts + 16558, + ts + 9217, + ts + 16478, + ts + 16483, + ts + 16486, + ts + 16496, + ts + 16506, + ts + 16512, + ts + 16516, + ts + 16521, + ts + 16526, + ts + 16534, + ts + 16545, + ts + 16548, + ts + 16555, + ts + 16516, + ts + 16521, ts + 16562, ts + 16567, - ts + 11819, - ts + 11815, - ts + 16573, - ts + 16578, + ts + 16570, + ts + 16577, + ts + 16512, + ts + 16516, ts + 16583, - ts + 16427, - ts + 16469, ts + 16588, - ts + 16595, - ts + 16602, - ts + 9203, - ts + 16610, - ts + 5449, - ts + 16616, - ts + 16427, - ts + 16469, - ts + 16621, - ts + 16626, - ts + 15820, - ts + 16631, - ts + 16644, - ts + 16653, - ts + 16660, - ts + 16671, + ts + 16593, + ts + 16516, + ts + 16597, + ts + 16521, + ts + 16605, + ts + 16609, + ts + 16614, + ts + 11833, + ts + 11829, + ts + 16620, + ts + 16625, + ts + 16630, + ts + 16474, + ts + 16516, + ts + 16635, + ts + 16642, + ts + 16649, + ts + 9217, + ts + 16657, + ts + 5463, + ts + 16663, + ts + 16474, + ts + 16516, + ts + 16668, + ts + 16673, + ts + 15867, + ts + 16678, + ts + 16691, + ts + 16700, + ts + 16707, + ts + 16718, } // Definitions of all built-in pragmas @@ -86115,241 +86643,241 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [67]PragmaName{ - {FzName: ts + 16679, + {FzName: ts + 16726, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16694, + {FzName: ts + 16741, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16709, + {FzName: ts + 16756, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16721, + {FzName: ts + 16768, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16737, + {FzName: ts + 16784, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16750, + {FzName: ts + 16797, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16762, + {FzName: ts + 16809, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16782, + {FzName: ts + 16829, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16798, + {FzName: ts + 16845, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16819, + {FzName: ts + 16866, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16850, + {FzName: ts + 16897, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16877, + {FzName: ts + 16924, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16910, + {FzName: ts + 16957, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16929, + {FzName: ts + 16976, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16952, + {FzName: ts + 16999, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16961, + {FzName: ts + 17008, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16979, + {FzName: ts + 17026, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16996, + {FzName: ts + 17043, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 17009, + {FzName: ts + 17056, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 17024, + {FzName: ts + 17071, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 17042, + {FzName: ts + 17089, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 17052, + {FzName: ts + 17099, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 17066, + {FzName: ts + 17113, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17082, + {FzName: ts + 17129, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 17107, + {FzName: ts + 17154, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 17126, + {FzName: ts + 17173, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 17137, + {FzName: ts + 17184, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 17148, + {FzName: ts + 17195, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 17160, + {FzName: ts + 17207, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 17176, + {FzName: ts + 17223, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17189, + {FzName: ts + 17236, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17208, + {FzName: ts + 17255, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 17227, + {FzName: ts + 17274, FePragTyp: U8(PragTyp_LOCK_PROXY_FILE), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17243, + {FzName: ts + 17290, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17256, + {FzName: ts + 17303, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17271, + {FzName: ts + 17318, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 17281, + {FzName: ts + 17328, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 17293, + {FzName: ts + 17340, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 17302, + {FzName: ts + 17349, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17313, + {FzName: ts + 17360, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17323, + {FzName: ts + 17370, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 17335, + {FzName: ts + 17382, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 17346, + {FzName: ts + 17393, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 17358, + {FzName: ts + 17405, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 17375, + {FzName: ts + 17422, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 17394, + {FzName: ts + 17441, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 17420, + {FzName: ts + 17467, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17435, + {FzName: ts + 17482, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17449, + {FzName: ts + 17496, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17468, + {FzName: ts + 17515, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17482, + {FzName: ts + 17529, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17498, + {FzName: ts + 17545, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17510, + {FzName: ts + 17557, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17521, + {FzName: ts + 17568, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17532, + {FzName: ts + 17579, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17544, + {FzName: ts + 17591, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17555, + {FzName: ts + 17602, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17576, + {FzName: ts + 17623, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17584, + {FzName: ts + 17631, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17599, + {FzName: ts + 17646, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17612, + {FzName: ts + 17659, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17631, + {FzName: ts + 17678, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17646, + {FzName: ts + 17693, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -86371,7 +86899,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17662)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17709)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -86383,10 +86911,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17687) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17734) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17697) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17744) { return PAGER_LOCKINGMODE_NORMAL } } @@ -86395,13 +86923,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+8347) { + if 0 == Xsqlite3StrICmp(tls, z, ts+8361) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17704) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17751) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17709) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17756) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -86416,9 +86944,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16621) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16668) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17721) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17768) == 0 { return 2 } else { return 0 @@ -86432,7 +86960,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17728, 0) + ts+17775, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -86523,19 +87051,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17790 + zName = ts + 17837 break case OE_SetDflt: - zName = ts + 17799 + zName = ts + 17846 break case OE_Cascade: - zName = ts + 17811 + zName = ts + 17858 break case OE_Restrict: - zName = ts + 17819 + zName = ts + 17866 break default: - zName = ts + 17828 + zName = ts + 17875 break } return zName @@ -86552,7 +87080,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17838, ts + 17845, ts + 17853, ts + 17857, ts + 17721, ts + 17866, + ts + 17885, ts + 17892, ts + 17900, ts + 17904, ts + 17768, ts + 17913, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -86599,13 +87127,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17870 + zType = ts + 17917 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17872 + zType = ts + 17919 } else { - zType = ts + 7857 + zType = ts + 7871 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17874, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17921, 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), @@ -86613,7 +87141,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17881, ts + 17886, ts + 17894} +var azEnc = [4]uintptr{uintptr(0), ts + 17928, ts + 17933, ts + 17941} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -86638,8 +87166,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(624) - defer tls.Free(624) + bp := tls.Alloc(680) + defer tls.Free(680) var zLeft uintptr var zRight uintptr @@ -86752,13 +87280,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -86778,6 +87315,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -86828,7 +87367,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -86843,7 +87382,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -86853,7 +87392,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17902, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17949, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -86870,30 +87409,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3644, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -87117,7 +87656,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17906) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17953) == 0) { goto __65 } b = 2 @@ -87151,7 +87690,7 @@ __67: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -87160,36 +87699,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __72 __71: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __73 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __75 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __76 __75: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __77 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __77: ; __76: ; goto __74 __73: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __74: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __72: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17697 + zRet = ts + 17744 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -87227,7 +87766,7 @@ __79: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } - zRet = ts + 17687 + zRet = ts + 17734 __84: ; returnSingleText(tls, v, zRet) @@ -87308,21 +87847,21 @@ __96: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __98 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __99 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __99: ; __98: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -87364,15 +87903,15 @@ __101: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __104 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __104: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -87409,14 +87948,14 @@ __26: }()) goto __108 __107: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __109 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __109: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __110 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -87435,17 +87974,17 @@ __27: if !(zRight != 0) { goto __112 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __113 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __113: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __114 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __114: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -87456,7 +87995,7 @@ __115: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __118 } - Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __118: ; goto __116 @@ -87468,12 +88007,12 @@ __117: ; __112: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __119 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __120 __119: if !(rc != SQLITE_NOTFOUND) { @@ -87510,11 +88049,11 @@ __124: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __126 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+512) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+17911, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17958, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __127: @@ -87533,7 +88072,7 @@ __128: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __129 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+16, zRight)) goto __130 __129: Xsqlite3_temp_directory = uintptr(0) @@ -87549,11 +88088,11 @@ __30: goto __131 } pPager2 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) pFile = Xsqlite3PagerFile(tls, pPager2) Xsqlite3OsFileControlHint(tls, pFile, SQLITE_FCNTL_GET_LOCKPROXYFILE, - bp+520) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 520))) + bp+560) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 560))) goto __132 __131: pPager3 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) @@ -87572,7 +88111,7 @@ __134: if !(res1 != SQLITE_OK) { goto __135 } - Xsqlite3ErrorMsg(tls, pParse, ts+17936, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17983, 0) goto pragma_out __135: ; @@ -87591,7 +88130,7 @@ __136: goto __138 } Xsqlite3ErrorMsg(tls, pParse, - ts+17966, 0) + ts+18013, 0) goto __139 __138: if !(iDb != 1) { @@ -87645,7 +88184,7 @@ __145: __147: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+18019) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+18066) == 0) { goto __148 } @@ -87742,13 +88281,13 @@ __161: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 18025 + return ts + 18072 } - return ts + 18033 + return ts + 18080 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1527), + Xsqlite3ColumnType(tls, pCol, ts+1547), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -87813,20 +88352,20 @@ __176: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __177 } - zSql = Xsqlite3MPrintf(tls, db, ts+18040, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+18087, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __178 } - *(*uintptr)(unsafe.Pointer(bp + 528)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+528, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 528))) + *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+568, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 568))) Xsqlite3DbFree(tls, db, zSql) __178: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __179 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __179: ; @@ -87859,29 +88398,29 @@ __183: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __184 } - zType = ts + 10818 + zType = ts + 10832 goto __185 __184: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __186 } - zType = ts + 13100 + zType = ts + 13114 goto __187 __186: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __188 } - zType = ts + 18056 + zType = ts + 18103 goto __189 __188: - zType = ts + 9203 + zType = ts + 9217 __189: ; __187: ; __185: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18063, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18110, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -87947,7 +88486,7 @@ __196: goto __198 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18070, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18117, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -87957,7 +88496,7 @@ __196: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __199 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18075, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18122, 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)))) @@ -87994,12 +88533,12 @@ __202: if !(pIdx1 != 0) { goto __204 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536)) = [3]uintptr{ts + 18080, ts + 18082, ts + 16498} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18084, + *(*[3]uintptr)(unsafe.Pointer(bp + 576)) = [3]uintptr{ts + 18127, ts + 18129, ts + 16545} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18131, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 536 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 576 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __203 __203: @@ -88028,7 +88567,7 @@ __205: goto __206 __208: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18090, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18137, 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))) @@ -88044,13 +88583,13 @@ __207: __38: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __209: if !(p != 0) { goto __211 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18094, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18141, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __210 __210: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -88089,7 +88628,7 @@ __213: goto __214 __214: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __218: if !(j != 0) { goto __220 @@ -88108,13 +88647,13 @@ __220: __40: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __221: if !(j1 != 0) { goto __223 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7857, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7871, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __222 __222: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -88130,7 +88669,7 @@ __224: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __226 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7857, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7871, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __225 __225: i6++ @@ -88165,7 +88704,7 @@ __232: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __234 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18097, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18144, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -88173,7 +88712,7 @@ __232: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+18106)) + ts+18153)) goto __233 __233: j2++ @@ -88246,20 +88785,20 @@ __241: goto __242 __244: ; - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = 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+560, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, uintptr(0)) if !(x1 == 0) { goto __245 } - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) == uintptr(0)) { goto __247 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __248 __247: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 560))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 600))) __248: ; goto __246 @@ -88297,12 +88836,12 @@ __251: goto __253 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 608)) = uintptr(0) if !(pParent != 0) { goto __254 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+560, bp+568) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, bp+608) __254: ; @@ -88319,8 +88858,8 @@ __256: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __258 } - if *(*uintptr)(unsafe.Pointer(bp + 568)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 568)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 608)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 608)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -88333,11 +88872,11 @@ __257: goto __258 __258: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) != 0) { goto __259 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __260 @@ -88362,10 +88901,10 @@ __262: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __263: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18111, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18158, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 608))) goto __252 __252: i8++ @@ -88403,17 +88942,17 @@ __265: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __266 } - if !(Xsqlite3GetInt32(tls, zRight, bp+576) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+616) != 0) { goto __267 } - if !(*(*int32)(unsafe.Pointer(bp + 576)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 616)) <= 0) { goto __269 } - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __269: ; goto __268 @@ -88429,7 +88968,7 @@ __268: ; __266: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 576))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 616))-1, 1) i9 = 0 __270: @@ -88579,7 +89118,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+18115, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+18162, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -88606,178 +89145,307 @@ __299: goto __297 __300: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __301 } + pPk1 = uintptr(0) + r2 = 0 + goto __302 +__301: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__302: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+580, bp+584) + 1, uintptr(0), bp+620, bp+624) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__301: +__303: if !(pIdx5 != 0) { - goto __303 + goto __305 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __302 -__302: + goto __304 +__304: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __301 goto __303 -__303: + goto __305 +__305: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 580)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 620)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__306: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __307 + } + mxCol-- + goto __306 +__307: + ; + if !(mxCol >= 0) { + goto __308 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__308: + ; if !!(isQuick != 0) { - goto __304 + goto __309 } + if !(pPk1 != 0) { + goto __310 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 620)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 580)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__304: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+18186, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__311: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __313 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 620)), j4, r2+j4) + goto __312 +__312: + j4++ + goto __311 + goto __313 +__313: + ; +__310: + ; +__309: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__305: +__314: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __307 + goto __316 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __308 + goto __317 } - goto __306 -__308: + goto __315 +__317: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __309 + if !(bStrict != 0) { + goto __318 } - goto __306 -__309: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __319 +__318: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__319: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __320 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 580)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __310 + goto __315 +__320: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __321 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__310: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) + p11 = -1 + p3 = 3 + goto __322 +__321: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __323 + } + *(*uintptr)(unsafe.Pointer(bp + 632)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+632) + if !(*(*uintptr)(unsafe.Pointer(bp + 632)) != 0) { + goto __324 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) +__324: + ; +__323: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 620)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __325 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __326 +__325: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__326: + ; +__322: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __311 + goto __327 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+18139, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18222, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __312 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __328 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __313 -__312: - integrityCheckResultRow(tls, v) -__313: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__311: + goto __329 +__328: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __314 +__329: + ; +__327: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __330 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+18159, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18242, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__314: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __331 +__330: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __332 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18264, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __333 +__332: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __334 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __335 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) +__335: ; - goto __306 -__306: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+18287, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18289, + libc.VaList(bp+432, (*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, zErr1, -6) +__334: + ; +__333: + ; +__331: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __315 +__315: j4++ - goto __305 - goto __307 -__307: + goto __314 + goto __316 +__316: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __315 + goto __336 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __316 + goto __337 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 580)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 620)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__317: +__338: if !(k3 > 0) { - goto __319 + goto __340 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __318 -__318: + goto __339 +__339: k3-- - goto __317 - goto __319 -__319: + goto __338 + goto __340 +__340: ; 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+18181, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+18309, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__316: +__337: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__315: +__336: ; if !!(isQuick != 0) { - goto __320 + goto __341 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__321: +__342: if !(pIdx5 != 0) { - goto __323 + goto __344 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __324 + goto __345 } - goto __322 -__324: + goto __343 +__345: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 580)), 0, 0, bp+588, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 620)), 0, 0, bp+640, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 624))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18211) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18339) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+18216) + Xsqlite3VdbeLoadString(tls, v, 4, ts+18344) 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) @@ -88785,87 +89453,93 @@ __324: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __325 + goto __346 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__326: +__347: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __328 + goto __349 } 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 __329 + goto __350 } - goto __327 -__329: + goto __348 +__350: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __327 -__327: + goto __348 +__348: kk++ - goto __326 - goto __328 -__328: + goto __347 + goto __349 +__349: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 584))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 624))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 624))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18237) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18365) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__325: +__346: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 588))) - goto __322 -__322: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 640))) + goto __343 +__343: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __321 - goto __323 -__323: + goto __342 + goto __344 +__344: ; -__320: +__341: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 580)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 620)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __330 + goto __351 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+18264) + Xsqlite3VdbeLoadString(tls, v, 2, ts+18392) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__331: +__352: if !(pIdx5 != 0) { - goto __333 + goto __354 } if !(pPk1 == pIdx5) { - goto __334 + goto __355 } - goto __332 -__334: + goto __353 +__355: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 584))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 624))+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 __332 -__332: + goto __353 +__353: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __331 - goto __333 -__333: + goto __352 + goto __354 +__354: ; -__330: + if !(pPk1 != 0) { + goto __356 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__356: + ; +__351: ; goto __297 __297: @@ -88883,14 +89557,14 @@ __272: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __335 + goto __357 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 616)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18293 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18421 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__335: +__357: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -88898,27 +89572,27 @@ __335: __46: if !!(zRight != 0) { - goto __336 + goto __358 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __338 + goto __360 } goto pragma_out -__338: +__360: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __337 -__336: + goto __359 +__358: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __339 + goto __361 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__340: +__362: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __342 + goto __364 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __343 + goto __365 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -88927,25 +89601,25 @@ __340: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __342 -__343: + goto __364 +__365: ; - goto __341 -__341: + goto __363 +__363: pEnc += 16 - goto __340 - goto __342 -__342: + goto __362 + goto __364 +__364: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __344 + goto __366 } - Xsqlite3ErrorMsg(tls, pParse, ts+18296, libc.VaList(bp+416, zRight)) -__344: + Xsqlite3ErrorMsg(tls, pParse, ts+18424, libc.VaList(bp+456, zRight)) +__366: ; -__339: +__361: ; -__337: +__359: ; goto __15 @@ -88953,50 +89627,57 @@ __47: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __345 + goto __367 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __347 + goto __369 } goto __15 -__347: +__369: ; (*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 __346 -__345: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __370 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__370: + ; + goto __368 +__367: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __348 + goto __371 } goto __15 -__348: +__371: ; (*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) -__346: +__368: ; goto __15 __48: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__349: +__372: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __350 + goto __373 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __349 -__350: + goto __372 +__373: ; Xsqlite3VdbeReusable(tls, v) @@ -89011,31 +89692,31 @@ __49: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __351 + goto __374 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17704) == 0) { - goto __352 + if !(Xsqlite3StrICmp(tls, zRight, ts+17751) == 0) { + goto __375 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __353 -__352: - if !(Xsqlite3StrICmp(tls, zRight, ts+18321) == 0) { - goto __354 + goto __376 +__375: + if !(Xsqlite3StrICmp(tls, zRight, ts+18449) == 0) { + goto __377 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __355 -__354: - if !(Xsqlite3StrICmp(tls, zRight, ts+17857) == 0) { - goto __356 + goto __378 +__377: + if !(Xsqlite3StrICmp(tls, zRight, ts+17904) == 0) { + goto __379 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__356: +__379: ; -__355: +__378: ; -__353: +__376: ; -__351: +__374: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -89045,10 +89726,10 @@ __351: __50: if !(zRight != 0) { - goto __357 + goto __380 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__357: +__380: ; returnSingleInt(tls, v, func() int64 { @@ -89068,19 +89749,19 @@ __51: __52: if !(zRight != 0) { - goto __358 + goto __381 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __360 + goto __383 } goto __15 -__360: +__383: ; - goto __359 -__358: + goto __382 +__381: opMask = U32(0xfffe) -__359: +__382: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -89089,86 +89770,86 @@ __359: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__361: +__384: if !(iDb <= iDbLast) { - goto __363 + goto __386 } if !(iDb == 1) { - goto __364 + goto __387 } - goto __362 -__364: + goto __385 +__387: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__365: +__388: if !(k4 != 0) { - goto __367 + goto __390 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __368 + goto __391 } - goto __366 -__368: + goto __389 +__391: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__369: +__392: if !(pIdx6 != 0) { - goto __371 + goto __394 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __372 + goto __395 } szThreshold = int16(0) - goto __371 -__372: + goto __394 +__395: ; - goto __370 -__370: + goto __393 +__393: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __369 - goto __371 -__371: + goto __392 + goto __394 +__394: ; if !(szThreshold != 0) { - goto __373 + goto __396 } 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)) -__373: +__396: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+18329, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18457, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __374 + goto __397 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __375 -__374: + goto __398 +__397: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__375: +__398: ; - goto __366 -__366: + goto __389 +__389: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __365 - goto __367 -__367: + goto __388 + goto __390 +__390: ; - goto __362 -__362: + goto __385 +__385: iDb++ - goto __361 - goto __363 -__363: + goto __384 + goto __386 +__386: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -89176,60 +89857,60 @@ __363: __53: ; if !(zRight != 0) { - goto __376 + goto __399 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__376: +__399: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __377 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __400 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__377: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__400: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __55: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK) { - goto __378 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK) { + goto __401 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)))) { - goto __379 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)))) { + goto __402 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 600))) -__379: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 656))) +__402: ; -__378: +__401: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __380 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __403 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608))&int64(0x7fffffff))) -__380: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664))&int64(0x7fffffff))) +__403: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __57: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+616) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) >= int64(0)) { - goto __381 + Xsqlite3DecOrHexToI64(tls, zRight, bp+672) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) >= int64(0)) { + goto __404 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) & int64(0x7fffffff)) -__381: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) & int64(0x7fffffff)) +__404: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -89237,10 +89918,10 @@ __381: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __382 + goto __405 } -__382: +__405: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -89273,6 +89954,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -89284,14 +89973,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 18347, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18352, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18358, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18367, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18376, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18384, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18392}, - {FzName: ts + 18399}, + {FzName: ts + 18475, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18480, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18486, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18495, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18504, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18512, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18520}, + {FzName: ts + 18527}, {}, } var setCookie = [2]VdbeOpList{ @@ -89343,7 +90032,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+18405) + Xsqlite3_str_appendall(tls, bp+32, ts+18533) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -89351,7 +90040,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+18420, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18548, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -89364,19 +90053,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18427, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18555, 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+18433) + Xsqlite3_str_appendall(tls, bp+32, ts+18561) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18445) + Xsqlite3_str_appendall(tls, bp+32, ts+18573) j++ } - Xsqlite3_str_append(tls, bp+32, ts+5346, 1) + Xsqlite3_str_append(tls, bp+32, ts+5360, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -89392,7 +90081,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -89540,7 +90229,7 @@ __1: 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+3644, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -89556,13 +90245,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+18460) + Xsqlite3_str_appendall(tls, bp+32, ts+18588) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18468, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18596, 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+18472, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18600, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -89571,7 +90260,7 @@ __3: 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+3644, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -89639,33 +90328,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18476, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18604, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 5397 + zObj = ts + 5411 } - z = Xsqlite3MPrintf(tls, db, ts+18504, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18632, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18535, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18663, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18543, - ts + 18550, - ts + 18562, + ts + 18671, + ts + 18678, + ts + 18690, } // Check to see if any sibling index (another index on the same table) @@ -89725,7 +90414,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+14519) + corruptSchema(tls, pData, argv, ts+14533) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -89757,13 +90446,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+18573) + corruptSchema(tls, pData, argv, ts+18701) } 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+14519) + corruptSchema(tls, pData, argv, ts+14533) } } } @@ -89796,16 +90485,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 9203 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 9217 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 8267 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18586 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 8281 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18714 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -89890,7 +90579,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+12102) + ts+12116) rc = SQLITE_ERROR goto initone_error_out __13: @@ -89925,7 +90614,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+18658) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18786) rc = SQLITE_ERROR goto initone_error_out __17: @@ -89939,7 +90628,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18682, + ts+18810, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -90122,16 +90811,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -90199,20 +90892,20 @@ 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) { - 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)) + libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-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)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0)) (*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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -90224,8 +90917,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0)) - libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0)) + libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0)) + libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -90234,7 +90927,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1463, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1483, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -90245,7 +90938,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -90265,7 +90958,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18716, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18844, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -90281,100 +90974,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18746, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18874, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3644, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3658, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -90387,7 +91084,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -90486,7 +91183,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -90629,7 +91326,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -90804,8 +91501,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 11247 - var zSp2 uintptr = ts + 11247 + var zSp1 uintptr = ts + 11261 + var zSp2 uintptr = ts + 11261 if pB == uintptr(0) { zSp1++ } @@ -90813,13 +91510,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18765, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18893, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18795)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18923)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -90994,7 +91691,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18829, libc.VaList(bp, 0)) + ts+18957, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -91039,7 +91736,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18879, libc.VaList(bp+8, zName)) + ts+19007, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -91050,7 +91747,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18943, + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp+16, zName)) break } @@ -91094,7 +91791,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6915, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6929, Fn: uint32(8)} // 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. @@ -91441,6 +92138,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -91616,7 +92316,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -91678,16 +92378,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18980 + z = ts + 19108 break case TK_INTERSECT: - z = ts + 18990 + z = ts + 19118 break case TK_EXCEPT: - z = ts + 19000 + z = ts + 19128 break default: - z = ts + 19007 + z = ts + 19135 break } return z @@ -91697,7 +92397,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19013, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19141, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -91903,8 +92603,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1092 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16610 + zType = ts + 1112 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16657 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -92043,13 +92743,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16610 + zCol = ts + 16657 } 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+12388, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+12402, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -92057,7 +92757,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+19036, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+19164, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -92147,7 +92847,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16610 + zName = ts + 16657 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -92157,7 +92857,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+19036, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+19164, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -92173,7 +92873,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+19045, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+19173, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -92460,7 +93160,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+19053, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19181, 0) return __1: ; @@ -92551,7 +93251,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19102, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19230, 0) goto end_of_recursive_query __15: ; @@ -92571,7 +93271,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19144, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19272, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -92608,7 +93308,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19150, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19278, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -92642,11 +93342,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+19165, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19293, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1527 + return ts + 1547 } - return ts + 3534 + return ts + 3548 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -92747,8 +93447,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19188, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19203, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19316, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19331, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -92795,7 +93495,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18980, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19108, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -92862,7 +93562,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19222, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19350, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -92924,7 +93624,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19222, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19350, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -93077,10 +93777,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19243, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+19289, + ts+19417, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -93334,8 +94034,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7563) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7563) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7577) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7577) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -93362,13 +94062,13 @@ 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+19371, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19499, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+19382, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19510, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -93380,7 +94080,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+19387, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19515, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -93481,7 +94181,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -93507,6 +94207,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -93523,7 +94224,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -93560,7 +94261,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -93571,6 +94273,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -93595,15 +94298,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1072 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1092 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -93780,9 +94488,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -93851,7 +94566,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -93867,17 +94581,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -93898,7 +94603,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -93910,6 +94614,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -94065,6 +94780,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -94088,8 +94804,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -94265,8 +94981,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -94283,6 +94999,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -94312,6 +95033,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -94345,12 +95067,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15510) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15557) == 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+15514) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15561) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -94416,7 +95138,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+19393, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19521, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -94499,7 +95221,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19411, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19539, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -94628,7 +95350,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+19434, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19562, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -94654,7 +95376,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19454, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19582, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -94670,7 +95392,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19497 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19625 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -94696,7 +95418,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+19520, + Xsqlite3ErrorMsg(tls, pParse, ts+19648, 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 @@ -94707,9 +95429,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 + 19558 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19686 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19592 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19720 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -94736,9 +95458,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -94756,7 +95478,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+19630, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19758, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -94868,7 +95590,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19634, + Xsqlite3ErrorMsg(tls, pParse, ts+19762, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -94887,7 +95609,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+19673, + Xsqlite3ErrorMsg(tls, pParse, ts+19801, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -94895,7 +95617,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19704, + Xsqlite3ErrorMsg(tls, pParse, ts+15126, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -94996,7 +95718,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6775 + zSchemaName = ts + 6789 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -95011,7 +95733,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19737, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19832, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -95076,7 +95798,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19742, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19837, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -95088,7 +95810,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+12388, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+12402, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -95107,9 +95829,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19751, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19846, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19769, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19864, 0) } } } @@ -95119,7 +95841,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+19789, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -95269,13 +95991,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19820, 0) + ts+19915, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19871, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19966, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -95456,19 +96178,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19904, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19999, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19916 + return ts + 20011 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1527 + return ts + 1547 }())) } } @@ -95481,7 +96203,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+8267) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+8281) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -95639,7 +96361,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -95738,7 +96459,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19939, + ts+20034, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -95799,7 +96520,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19993, + Xsqlite3ErrorMsg(tls, pParse, ts+20088, 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 __15: @@ -95903,7 +96624,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1527, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1547, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -95913,7 +96634,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -95945,7 +96666,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20033, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20128, 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), 5, 0x20) @@ -96003,8 +96724,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20048, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20143, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -96038,7 +96762,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -96131,16 +96855,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -96149,13 +96878,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -96167,52 +96896,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -96230,111 +96959,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.X__builtin___memset_chk(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+152, 0)) @@ -96353,33 +97082,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -96387,28 +97116,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -96419,7 +97148,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -96430,7 +97159,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -96456,7 +97185,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -96469,27 +97198,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 20064 + return ts + 20159 } - return ts + 20073 + return ts + 20168 }()) groupBySort = 1 @@ -96497,49 +97226,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -96553,45 +97282,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -96610,16 +97339,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -96650,16 +97379,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -96672,98 +97401,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -96772,79 +97501,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+20064) -__147: + explainTempTable(tls, pParse, ts+20159) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 20082 + return ts + 20177 } - return ts + 20105 + return ts + 20200 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -96919,7 +97648,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -96941,7 +97670,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+20114, 0) + ts+20209, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -97037,7 +97766,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3644, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -97129,7 +97858,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -97174,7 +97903,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+20179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20274, 0) goto trigger_cleanup __3: ; @@ -97218,7 +97947,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20225, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20320, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -97236,7 +97965,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+20233, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20328, 0) goto trigger_orphan_error __11: ; @@ -97248,7 +97977,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20225, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20320, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -97263,7 +97992,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+20274, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20369, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -97275,22 +98004,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20300, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20395, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+20338, + Xsqlite3ErrorMsg(tls, pParse, ts+20433, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 20375 + return ts + 20470 } - return ts + 20382 + return ts + 20477 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -97299,7 +98028,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+20388, libc.VaList(bp+24, pTableName+8)) + ts+20483, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -97328,9 +98057,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -97448,7 +98177,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+20225, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+20320, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -97481,7 +98210,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+20434, + ts+20529, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -97506,13 +98235,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20482, + ts+20577, libc.VaList(bp+16, (*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+20557, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20652, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -97768,7 +98497,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20586, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20681, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -97807,9 +98536,9 @@ 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 + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -97821,7 +98550,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20606, + ts+20701, 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) @@ -97935,12 +98664,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20668, + ts+20763, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20716 + return ts + 20811 } - return ts + 20723 + return ts + 20818 }())) __15: ; @@ -98054,7 +98783,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20730, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20825, 0) return 1 } @@ -98105,7 +98834,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Select{})), libc.X__builtin_object_size(tls, bp, 0)) libc.X__builtin___memset_chk(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{})), libc.X__builtin_object_size(tls, bp+128, 0)) @@ -98174,7 +98903,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6469, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6483, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -98237,8 +98966,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -98271,26 +99000,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.X__builtin___memset_chk(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+416, 0)) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.X__builtin___memset_chk(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+424, 0)) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20772, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20867, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -98307,7 +99036,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -98500,10 +99229,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -98512,7 +99243,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -98874,7 +99605,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20786, + ts+20881, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -98906,7 +99637,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20822, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20917, 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: @@ -98916,7 +99647,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 8042 + return ts + 8056 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -99786,7 +100517,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20841) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20936) __169: ; update_cleanup: @@ -100092,10 +100823,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+20854, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20949, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20858, libc.VaList(bp+8, bp+216)) + ts+20953, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -100186,7 +100917,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+12529, -1) + ts+12543, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -100218,7 +100949,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20931, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20935, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+21026, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21030, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -100355,23 +101086,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20939) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21034) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20979) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21074) return SQLITE_ERROR __2: ; @@ -100382,7 +101115,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21022) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21117) return SQLITE_ERROR __5: ; @@ -100391,7 +101124,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1527 + zOut = ts + 1547 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -100410,7 +101143,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21040, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+21135, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -100430,20 +101163,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21063) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21158) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14882) + rc = execSql(tls, db, pzErrMsg, ts+14896) if !(rc != SQLITE_OK) { goto __9 } @@ -100488,7 +101223,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+21090, + ts+21185, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -100497,7 +101232,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21198, + ts+21293, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -100508,7 +101243,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+21252, + ts+21347, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -100519,7 +101254,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21403, + ts+21498, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -100641,7 +101376,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -100683,7 +101418,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -100840,7 +101575,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -100864,7 +101599,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+12756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12770, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -100948,11 +101683,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21533, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21628, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21557, + ts+21652, 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, @@ -100962,7 +101697,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21656, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21751, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -100996,7 +101731,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -101023,7 +101758,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+21675, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21770, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -101061,9 +101796,9 @@ 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+21717, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21812, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3644, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3658, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -101073,7 +101808,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 + 21747 + var zFormat uintptr = ts + 21842 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -101085,12 +101820,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1527) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1547) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16501, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16548, 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 @@ -101143,17 +101878,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21793, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21888, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3644, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -101202,10 +101937,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21793, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21888, 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) @@ -101225,8 +101960,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -101239,7 +101974,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -101281,7 +102016,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -101649,7 +102384,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -101692,7 +102427,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -101719,7 +102454,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -101947,31 +102682,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21812 + return ts + 21907 } if i == -1 { - return ts + 16610 + return ts + 16657 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -101980,35 +102697,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21819, 5) + Xsqlite3_str_append(tls, pStr, ts+21914, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21825, 1) + Xsqlite3_str_append(tls, pStr, ts+21920, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13146, 1) + Xsqlite3_str_append(tls, pStr, ts+13160, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+5346, 1) + Xsqlite3_str_append(tls, pStr, ts+5360, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21825, 1) + Xsqlite3_str_append(tls, pStr, ts+21920, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13146, 1) + Xsqlite3_str_append(tls, pStr, ts+13160, 1) } - Xsqlite3_str_append(tls, pStr, ts+5397, 1) + Xsqlite3_str_append(tls, pStr, ts+5411, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+5346, 1) + Xsqlite3_str_append(tls, pStr, ts+5360, 1) } } @@ -102025,29 +102742,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21827, 2) + Xsqlite3_str_append(tls, pStr, ts+21922, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21819, 5) + Xsqlite3_str_append(tls, pStr, ts+21914, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21830 + return ts + 21925 } - return ts + 21835 + return ts + 21930 }(), 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))), j, i, ts+21843) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21938) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21845) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21940) } - Xsqlite3_str_append(tls, pStr, ts+5346, 1) + Xsqlite3_str_append(tls, pStr, ts+5360, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -102088,11 +102805,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21847, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21942, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21853 + return ts + 21948 } - return ts + 21860 + return ts + 21955 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -102102,43 +102819,43 @@ 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 + 11303 + zFmt = ts + 11317 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21865 + zFmt = ts + 21960 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21898 + zFmt = ts + 21993 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21923 + zFmt = ts + 22018 } else { - zFmt = ts + 21941 + zFmt = ts + 22036 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21950, 7) + Xsqlite3_str_append(tls, bp+64, ts+22045, 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 + 16610 - Xsqlite3_str_appendf(tls, bp+64, ts+21958, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16657 + Xsqlite3_str_appendf(tls, bp+64, ts+22053, 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+21989, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+22084, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21999, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+22094, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22004, + Xsqlite3_str_appendf(tls, bp+64, ts+22099, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+22031, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+22126, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -102170,25 +102887,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22042, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+22137, 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+21830, 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+21925, 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+22063, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+22158, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21819, 5) + Xsqlite3_str_append(tls, bp+24, ts+21914, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21830, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21925, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+5346, 1) + Xsqlite3_str_append(tls, bp+24, ts+5360, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -102549,7 +103266,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -102602,104 +103319,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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.X__builtin___memcpy_chk(tls, pNew+16, pExpr, uint64(unsafe.Sizeof(Expr{})), libc.X__builtin_object_size(tls, pNew+16, 0)) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp, 0)) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -102738,7 +103357,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -102758,6 +103377,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -102908,12 +103529,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -102932,13 +103553,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -102951,7 +103572,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -103013,7 +103634,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -103160,6 +103781,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -103502,13 +104125,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -103516,104 +104146,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -103622,92 +104261,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -103717,24 +104350,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -103754,152 +104387,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc = U32(U8(nNotReady + 1)) (*SrcList)(unsafe.Pointer(pOrTab)).FnSrc = int32((*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc) libc.X__builtin___memcpy_chk(tls, pOrTab+8, pTabItem, uint64(unsafe.Sizeof(SrcItem{})), libc.X__builtin_object_size(tls, pOrTab+8, 0)) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.X__builtin___memcpy_chk(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{})), libc.X__builtin_object_size(tls, pOrTab+8+uintptr(k)*104, 0)) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22071, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22166, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22086, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22181, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -103908,121 +104542,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -104031,36 +104665,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -104078,219 +104712,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -104300,24 +104934,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -104328,41 +104962,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -104396,7 +105030,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104404,13 +105038,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22095, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22190, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -104688,7 +105322,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -104701,7 +105335,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -104725,11 +105359,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -104761,10 +105395,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16459, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15787, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 15313, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 22109, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16506, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15834, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 15360, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 22204, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -104906,7 +105540,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -104923,10 +105557,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -104983,7 +105617,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -105169,6 +105803,7 @@ __3: 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 @@ -105224,7 +105859,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -105261,12 +105896,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+22116, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22211, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22116, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22211, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -105345,7 +105980,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7098 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7112 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -105439,7 +106074,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 22157 + return ts + 22252 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -105633,7 +106268,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -105812,7 +106447,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+22164, + Xsqlite3ErrorMsg(tls, pParse, ts+22259, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -105882,6 +106517,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -105908,10 +106546,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -105931,14 +106569,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -105975,14 +106613,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.X__builtin___memcpy_chk(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2), libc.X__builtin_object_size(tls, aiCur, 0)) + libc.X__builtin___memcpy_chk(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -106425,6 +107063,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -106434,11 +107084,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -106533,7 +107181,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+22200, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+22295, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -106604,7 +107252,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22226 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22321 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -106838,7 +107486,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -106900,11 +107548,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -106972,7 +107618,7 @@ __3: 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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -107094,9 +107740,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3644, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3644, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -107164,7 +107810,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -107513,9 +108159,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -107539,7 +108188,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + 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)) return SQLITE_NOMEM } @@ -107555,32 +108205,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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.X__builtin___memcpy_chk(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, p+16, uint64(unsafe.Sizeof(Expr{})), libc.X__builtin_object_size(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, 0)) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -107726,7 +108366,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -107969,13 +108609,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -107986,7 +108623,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -108041,31 +108679,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -108268,6 +108908,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp, 0)) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -108399,6 +109097,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -108413,6 +109114,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -108443,7 +109147,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -108599,7 +109303,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+22237, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22332, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -108657,7 +109361,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22237, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22332, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -109015,7 +109719,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -109027,7 +109731,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -109042,7 +109746,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -109055,7 +109759,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+22263, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+22358, 0) rc = SQLITE_OK } else { goto __3 @@ -109156,7 +109860,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -109330,7 +110034,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -109382,7 +110086,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -109410,7 +110114,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -109431,7 +110134,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -109453,7 +110155,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -109515,9 +110217,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -109533,7 +110234,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -109553,6 +110256,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -109649,8 +110357,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22298, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+22393, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -109662,7 +110370,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -109677,7 +110385,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -109697,7 +110405,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -109705,7 +110413,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -109715,7 +110423,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -109723,7 +110431,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -109755,7 +110463,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -109812,10 +110520,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -109859,16 +110567,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -109901,7 +110609,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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.X__builtin___memmove_chk(tls, pWInfo+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte), libc.X__builtin_object_size(tls, pWInfo+872+uintptr(i)*104, 0)) + libc.X__builtin___memmove_chk(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte), libc.X__builtin_object_size(tls, pWInfo+856+uintptr(i)*104, 0)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -109913,9 +110621,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -109933,6 +110641,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -110019,7 +110779,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -110076,7 +110836,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22316, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+22411, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -110099,30 +110859,29 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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.X__builtin___memset_chk(tls, pWInfo+73, 0, uint64(uintptr(0)+120)-uint64(uintptr(0)+73), libc.X__builtin_object_size(tls, pWInfo+73, 0)) - libc.X__builtin___memset_chk(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{})), libc.X__builtin_object_size(tls, pWInfo+872, 0)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.X__builtin___memset_chk(tls, pWInfo+65, 0, uint64(uintptr(0)+104)-uint64(uintptr(0)+65), libc.X__builtin_object_size(tls, pWInfo+65, 0)) + libc.X__builtin___memset_chk(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{})), libc.X__builtin_object_size(tls, pWInfo+856, 0)) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -110140,13 +110899,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22344, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22439, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -110157,169 +110916,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -110328,26 +111092,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -110355,37 +111119,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -110393,92 +111157,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -110488,24 +111258,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -110515,96 +111285,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -110612,30 +111382,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -110655,7 +111423,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -110791,11 +111559,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -110834,6 +111599,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -111006,7 +111781,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+22362, -1) + pCtx, ts+22457, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -111139,7 +111914,7 @@ 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+22418, -1) + pCtx, ts+22513, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -111229,17 +112004,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22463)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22474)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22485)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22490)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22503)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22513)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22519)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22530)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22540)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22552)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22557)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22558)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22569)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22580)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22585)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22598)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22608)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22614)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22625)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22635)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22647)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22652)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -111285,7 +112060,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22561, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22656, libc.VaList(bp, zName)) } return p } @@ -111329,12 +112104,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+22580, 0) + ts+22675, 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+22651, 0) + ts+22746, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -111357,7 +112132,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+8267) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+8281) } break } @@ -111525,7 +112300,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -111562,7 +112336,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22714, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22809, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -111678,7 +112452,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7859)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7873)) } pSub = Xsqlite3SelectNew(tls, @@ -111792,7 +112566,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22740, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22835, 0) goto windowAllocErr __2: ; @@ -111857,15 +112631,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22772 + zErr = ts + 22867 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22789 + zErr = ts + 22884 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22805 + zErr = ts + 22900 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22825, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22920, 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 { @@ -111886,7 +112660,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+22858, 0) + ts+22953, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -112024,7 +112798,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -112042,11 +112816,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22905, - ts + 22958, - ts + 22362, - ts + 23009, - ts + 23061, + ts + 23000, + ts + 23053, + ts + 22457, + ts + 23104, + ts + 23156, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -112527,13 +113301,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -113441,19 +114219,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23111, + Xsqlite3ErrorMsg(tls, pParse, ts+23206, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 20105 + return ts + 20200 } - return ts + 23153 + return ts + 23248 }(), 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+23159, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23254, 0) } } @@ -113521,7 +114299,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+23193, + Xsqlite3ErrorMsg(tls, pParse, ts+23288, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -114618,7 +115396,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+23231, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23326, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -115593,21 +116371,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16610, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16657, 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+23253, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23348, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16523, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16570, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+23253, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23348, 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)) @@ -116350,7 +117128,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+23280) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+23375) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -116514,7 +117292,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23289, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+23384, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -116731,9 +117509,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 7093 + return ts + 7107 } - return ts + 7098 + return ts + 7112 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -117012,19 +117790,19 @@ 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+23313, 0) + ts+23408, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+23408, 0) + ts+23503, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23492, 0) + ts+23587, 0) } break case uint32(273): @@ -117403,9 +118181,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23289, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+23384, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23577, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23672, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -118173,7 +118951,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23594, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23689, libc.VaList(bp, bp+2464)) break } } @@ -118194,9 +118972,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3644, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3658, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23619, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23714, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -118209,7 +118987,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -118369,7 +119147,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23630, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23725, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -118382,11 +119160,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20225, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20320, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23637, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23732, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23642, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23737, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -118399,9 +119177,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23652, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23747, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23656, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23751, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -118511,36 +119289,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -118657,7 +119413,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -118928,16 +119684,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -119001,6 +119758,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -119051,6 +119809,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -119199,7 +119958,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -119229,7 +119988,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -119244,7 +120003,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23664, 0) + ts+23759, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -119340,7 +120099,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -119351,8 +120110,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -119362,13 +120121,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -119435,23 +120194,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23732 + var zErr uintptr = ts + 23827 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23746 + zErr = ts + 23841 break } case SQLITE_ROW: { - zErr = ts + 23768 + zErr = ts + 23863 break } case SQLITE_DONE: { - zErr = ts + 23790 + zErr = ts + 23885 break } @@ -119469,35 +120228,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23813, - ts + 23826, + ts + 23908, + ts + 23921, uintptr(0), - ts + 23842, - ts + 23867, - ts + 23881, - ts + 23900, - ts + 1463, - ts + 23925, + ts + 23937, ts + 23962, - ts + 23974, - ts + 23989, - ts + 24022, - ts + 24040, - ts + 24065, - ts + 24094, + ts + 23976, + ts + 23995, + ts + 1483, + ts + 24020, + ts + 24057, + ts + 24069, + ts + 24084, + ts + 24117, + ts + 24135, + ts + 24160, + ts + 24189, uintptr(0), - ts + 6237, - ts + 5723, - ts + 24111, - ts + 24129, - ts + 24147, + ts + 6251, + ts + 5737, + ts + 24206, + ts + 24224, + ts + 24242, uintptr(0), - ts + 24181, + ts + 24276, uintptr(0), - ts + 24202, - ts + 24228, - ts + 24251, - ts + 24272, + ts + 24297, + ts + 24323, + ts + 24346, + ts + 24367, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -119612,7 +120371,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -119657,7 +120416,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+24288, 0) + ts+24383, 0) return SQLITE_BUSY } else { @@ -119774,7 +120533,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+24351, libc.VaList(bp, zName)) + ts+24446, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -119790,6 +120549,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -119799,7 +120561,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -120007,7 +120769,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+24402, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24497, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -120100,7 +120862,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -120170,7 +120932,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -120180,7 +120942,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -120212,20 +120974,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+24423, 0) + ts+24518, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -120349,7 +121111,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+24491, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24586, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -120394,10 +121156,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24497, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24592, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24507, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24602, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -120502,7 +121264,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24535, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24630, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -120513,17 +121275,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24539, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24634, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24539 + zModeType = ts + 24634 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24545, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24640, zOpt, uint64(4)) == 0) { goto __32 } @@ -120531,7 +121293,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3251 + zModeType = ts + 3265 __32: ; if !(aMode != 0) { @@ -120561,7 +121323,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24550, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24645, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -120569,7 +121331,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24570, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24665, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -120609,7 +121371,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24594, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24689, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -120633,15 +121395,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24610, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24617, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24705, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24712, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24625, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24628, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24631, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17721, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24720, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24723, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24726, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17768, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -120756,7 +121518,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -120775,8 +121537,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -120787,10 +121549,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+22157, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+22252, 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+24635, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24730, 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) { @@ -120804,7 +121566,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -120821,7 +121583,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -120855,9 +121617,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6770 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6784 (*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 + 23637 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23732 (*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) @@ -120962,7 +121724,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24641 + zFilename = ts + 24736 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -121065,21 +121827,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24644, + Xsqlite3_log(tls, iErr, ts+24739, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24669) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24764) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24689) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24784) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24696) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24791) } // This is a convenience routine that makes sure that all thread-specific @@ -121190,7 +121952,7 @@ __4: 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 + 1092 + zDataType = ts + 1112 primarykey = 1 __13: ; @@ -121237,14 +121999,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24713, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24808, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -121314,6 +122076,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -121890,7 +122655,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24741, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24836, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -121923,7 +122688,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -121934,7 +122699,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -122008,7 +122773,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 + 24749 + return ts + 24844 } return uintptr(0) }(), 0) @@ -122103,7 +122868,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -122186,7 +122951,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6570, ts + 7093, ts + 7098, ts + 6580, ts + 6575, ts + 8334, ts + 24772, ts + 24778, + ts + 6584, ts + 7107, ts + 7112, ts + 6594, ts + 6589, ts + 8348, ts + 24867, ts + 24873, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -122339,7 +123104,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 + 24785 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24880 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -122365,7 +123130,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6570, uint32(4)) + jsonAppendRaw(tls, p, ts+6584, uint32(4)) break } @@ -122394,7 +123159,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24802, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24897, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -122452,19 +123217,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6570, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6584, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+7093, uint32(4)) + jsonAppendRaw(tls, pOut, ts+7107, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+7098, uint32(5)) + jsonAppendRaw(tls, pOut, ts+7112, uint32(5)) break } @@ -123009,17 +123774,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6570, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6584, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+7093, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+7107, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+7098, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+7112, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -123120,7 +123885,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+24831, -1) + Xsqlite3_result_error(tls, pCtx, ts+24926, -1) } } jsonParseReset(tls, pParse) @@ -123426,7 +124191,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+24846, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24941, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -123441,7 +124206,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24850, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24945, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -123495,7 +124260,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24876, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -123600,11 +124365,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24919, uint32(2)) + jsonAppendRaw(tls, bp, ts+25014, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+5387, uint32(2)) + jsonAppendRaw(tls, bp, ts+5401, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24922, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+25017, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -123645,7 +124410,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6570, uint32(4)) + jsonAppendRaw(tls, bp, ts+6584, uint32(4)) } } if i == argc { @@ -123761,14 +124526,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24925, -1) + ts+25020, -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+24976, -1) + Xsqlite3_result_error(tls, ctx, ts+25071, -1) jsonReset(tls, bp) return } @@ -123863,7 +124628,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15720) + jsonWrongNumArgs(tls, ctx, ts+15767) return __2: ; @@ -123938,9 +124703,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 25010 + return ts + 25105 } - return ts + 25014 + return ts + 25109 }()) return __2: @@ -124073,7 +124838,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25021, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25116, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -124170,7 +124935,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25024, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25119, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -124214,7 +124979,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25027) + ts+25122) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -124345,7 +125110,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+25110, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+25205, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -124364,7 +125129,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+25116, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+25211, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -124460,7 +125225,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+25116, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+25211, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -124484,7 +125249,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 + 25121 + zRoot = ts + 25216 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -124600,7 +125365,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+24831, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24926, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -124695,25 +125460,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 25123}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25128}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25139}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25139}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 25170}, - {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 + 25173}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25177}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25189}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25201}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25212}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25218}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25223}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25235}, - {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 + 25248}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25257}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25257}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25267}, - {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 + 25278}, - {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 + 25295}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25234}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25234}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25252}, + {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 + 25265}, + {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 + 25268}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25272}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25284}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25296}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25307}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25318}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25330}, + {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 + 25343}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25352}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25352}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25362}, + {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 + 25373}, + {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 + 25390}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -124732,8 +125497,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 25313, FpModule: 0}, - {FzName: ts + 25323, FpModule: 0}, + {FzName: ts + 25408, FpModule: 0}, + {FzName: ts + 25418, FpModule: 0}, } type Rtree1 = struct { @@ -124993,11 +125758,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+25333, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+25428, 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+25341, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25436, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -125208,7 +125973,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+25346, + ts+25441, 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)) @@ -125911,7 +126676,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25428) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25523) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -126123,7 +126888,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3644, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -127252,7 +128017,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+25442, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25537, 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 { @@ -127264,12 +128029,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25462, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25557, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25494, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25589, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -127310,7 +128075,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{})), libc.X__builtin_object_size(tls, bp, 0)) if !(nData > 1) { goto __2 @@ -127495,7 +128260,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25531, 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+25626, 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)) @@ -127518,14 +128283,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25676 + var zFmt uintptr = ts + 25771 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11675, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11689, 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 { @@ -127566,7 +128331,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25732, ts + 5449, ts + 16610, + ts + 25827, ts + 5463, ts + 16657, } var rtreeModule = Sqlite3_module{ @@ -127609,19 +128374,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+25737, + ts+25832, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25799, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25894, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25804, + ts+25899, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25868, + ts+25963, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25938, + ts+26033, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -127650,7 +128415,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25987 + zFormat = ts + 26082 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -127662,7 +128427,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+26095, + ts+26190, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -127670,18 +128435,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+26140, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+26235, 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+13146, 1) + Xsqlite3_str_append(tls, p, ts+13160, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+26167, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+26262, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+26189, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+26284, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+26197, 0) + Xsqlite3_str_appendf(tls, p, ts+26292, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -127696,14 +128461,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 26213, - ts + 26266, - ts + 26311, - ts + 26363, - ts + 26417, - ts + 26462, - ts + 26520, - ts + 26575, + ts + 26308, + ts + 26361, + ts + 26406, + ts + 26458, + ts + 26512, + ts + 26557, + ts + 26615, + ts + 26670, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -127732,7 +128497,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26622, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26717, 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 @@ -127740,19 +128505,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26642, + ts+26737, 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+3644, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, 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+26699, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26794, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -127794,16 +128559,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26734, - ts + 26777, - ts + 26812, - ts + 26848, + ts + 26829, + ts + 26872, + ts + 26907, + ts + 26943, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -127828,7 +128593,7 @@ __2: libc.X__builtin___memcpy_chk(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName), libc.X__builtin_object_size(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, 0)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26885, + Xsqlite3_str_appendf(tls, pSql, ts+26980, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -127840,7 +128605,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26909, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+27004, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -127863,7 +128628,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26915, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27010, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -127874,14 +128639,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, 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+3644, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -127924,7 +128689,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -127941,7 +128706,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -127959,7 +128724,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26918, ts + 26929} +var azFormat = [2]uintptr{ts + 27013, ts + 27024} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -127997,13 +128762,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+11247, 1) + Xsqlite3_str_append(tls, pOut, ts+11261, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26939, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+27034, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26945, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+27040, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26949, 1) + Xsqlite3_str_append(tls, pOut, ts+27044, 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}))) @@ -128014,7 +128779,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26951, -1) + Xsqlite3_result_error(tls, ctx, ts+27046, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -128092,12 +128857,12 @@ 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+26984, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+27079, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4451 + return ts + 4465 } - return ts + 1527 + return ts + 1547 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -128116,7 +128881,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+26991, + ts+27086, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -128135,7 +128900,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+27036, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+27131, libc.VaList(bp+16, iNode)) } } @@ -128149,8 +128914,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 27068, - ts + 27122, + ts + 27163, + ts + 27217, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -128165,23 +128930,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+27170, + rtreeCheckAppendMsg(tls, pCheck, ts+27265, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 27215 + return ts + 27310 } - return ts + 27223 + return ts + 27318 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+27232, + ts+27327, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 27215 + return ts + 27310 } - return ts + 27223 + return ts + 27318 }(), iKey, iVal)) } } @@ -128205,7 +128970,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+27290, libc.VaList(bp, i, iCell, iNode)) + ts+27385, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -128225,7 +128990,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+27338, libc.VaList(bp+24, i, iCell, iNode)) + ts+27433, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -128242,14 +129007,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+27405, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27500, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+27439, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27534, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -128257,7 +129022,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+27469, + ts+27564, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -128286,14 +129051,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27524, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27619, 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+27555, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27650, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -128315,12 +129080,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14882, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14896, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27622, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27717, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -128329,12 +129094,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+25442, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25537, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27650, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27745, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -128348,8 +129113,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+27681, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27688, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27776, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27783, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -128357,7 +129122,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27696, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27791, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -128372,7 +129137,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27700, -1) + ts+27795, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -128380,7 +129145,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6770 + zDb = ts + 6784 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -128390,7 +129155,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 18293 + return ts + 18421 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -128759,11 +129524,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+27751, 1) + Xsqlite3_str_append(tls, x, ts+27846, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27753, 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+27848, 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+27764, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27859, 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) } @@ -128783,19 +129548,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+27775, 0) + Xsqlite3_str_appendf(tls, x, ts+27870, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27793, 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+27888, 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+27801, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27896, 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+27809, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27904, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27813, 0) + Xsqlite3_str_appendf(tls, x, ts+27908, 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) } @@ -129701,7 +130466,7 @@ __1: libc.X__builtin___memcpy_chk(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName), libc.X__builtin_object_size(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, 0)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27826, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27921, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -129710,7 +130475,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27848, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27943, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -129718,7 +130483,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26915, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27010, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -129729,7 +130494,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -129754,7 +130519,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -129943,7 +130708,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16610 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16657 (*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 @@ -129953,7 +130718,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27852 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27947 (*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 @@ -129961,7 +130726,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27858 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27953 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -130073,7 +130838,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27867, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27962, 0) __4: ; goto geopoly_update_end @@ -130203,14 +130968,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27907) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28002) == 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+27923) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28018) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -130275,7 +131040,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27938, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28033, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -130287,25 +131052,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27946}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27959}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27972}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27985}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27923}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27997}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27907}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 28020}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28034}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28047}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28061}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28077}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28041}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28054}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28067}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 28080}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28018}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 28092}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28002}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 28115}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28129}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28142}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28156}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28172}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 28089}, + {FxStep: 0, FxFinal: 0, FzName: ts + 28184}, } // Register the r-tree module with database handle db. This creates the @@ -130315,26 +131080,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+28108, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28203, 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+28118, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28213, 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+28129, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28224, -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+27852, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27947, 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+28140, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28235, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -130388,7 +131153,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25428, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25523, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -130455,6 +131220,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -130713,7 +131480,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+28150, -1) + Xsqlite3_result_error(tls, context, ts+28245, -1) return } @@ -130724,7 +131491,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+28150, -1) + Xsqlite3_result_error(tls, context, ts+28245, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -130737,7 +131504,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -130749,7 +131516,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -130825,7 +131592,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+28171, uintptr(0), uintptr(0), p+64) + ts+28266, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -130889,7 +131656,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+25341, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25436, 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++ { } @@ -130910,16 +131677,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+28342, libc.VaList(bp, func() uintptr { + ts+28437, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28492 + return ts + 28587 } - return ts + 1527 + return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28533) + ts+28628) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -131017,7 +131784,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -131035,7 +131802,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+28658, libc.VaList(bp, zTab))) + ts+28753, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -131053,7 +131820,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+28777, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28872, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -131071,7 +131838,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28798, libc.VaList(bp+16, zIdx))) + ts+28893, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -131094,7 +131861,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28849, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28944, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -131140,7 +131907,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28870, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28965, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -131155,7 +131922,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28898, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28993, 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)), 1) if iCid >= 0 { @@ -131195,7 +131962,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+19751, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19846, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -131205,18 +131972,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28927, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+29022, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28946, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+29041, 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+28951, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+29046, zName) { bRbuRowid = 1 } } @@ -131228,18 +131995,18 @@ 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+28961, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+29056, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28990 + return ts + 29085 } - return ts + 29003 + return ts + 29098 }())) } 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+29012, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29107, 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)), 1) @@ -131253,7 +132020,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+29034, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29129, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -131296,12 +132063,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29061, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14993 + zList = rbuMPrintf(tls, p, ts+29156, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 15007 } return zList } @@ -131312,13 +132079,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29070, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+29165, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -131340,25 +132107,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+29083, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+29178, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+29115, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+29210, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14993, ts+29138) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29144, ts+29151, ts+5346) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14993, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+15007, ts+29233) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29239, ts+29246, ts+5360) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+15007, ts+1547) 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+29159, + ts+29254, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+29201, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+29296, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -131395,12 +132162,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28993, 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 @@ -131435,7 +132202,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 29221 + zCol = ts + 29316 __7: ; goto __5 @@ -131443,13 +132210,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+29229, + zLhs = rbuMPrintf(tls, p, ts+29324, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+29250, + zOrder = rbuMPrintf(tls, p, ts+29345, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+29286, + zSelect = rbuMPrintf(tls, p, ts+29381, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14993 + zSep = ts + 15007 iCol++ goto __1 __2: @@ -131467,12 +132234,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+29313, + Xsqlite3_mprintf(tls, ts+29408, 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 + 1527 + zSep = ts + 1547 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -131494,8 +132261,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+29361, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14993 + zVector = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 15007 goto __15 __15: iCol++ @@ -131506,7 +132273,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -131533,13 +132300,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1527 - var zAnd uintptr = ts + 1527 + var zCom uintptr = ts + 1547 + var zAnd uintptr = ts + 1547 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28993, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -131551,9 +132318,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+29380, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29475, 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 + zType = ts + 1547 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -131563,37 +132330,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 + 29221 + zCol = ts + 29316 } else { - zCol = ts + 28951 + zCol = ts + 29046 } - zType = ts + 1092 + zType = ts + 1112 } 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+29402, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29497, 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 + 29138 + return ts + 29233 } - return ts + 1527 + return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+29422, + zImpPK = Xsqlite3_mprintf(tls, ts+29517, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+29443, + zImpCols = Xsqlite3_mprintf(tls, ts+29538, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29476, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29571, 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 + 14993 - zAnd = ts + 21819 + zCom = ts + 15007 + zAnd = ts + 21914 nBind++ } @@ -131627,16 +132394,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1527 + var zS uintptr = ts + 1547 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+29500, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29595, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29512, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29607, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14993 + zS = ts + 15007 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -131644,7 +132411,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29521, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29616, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -131656,27 +132423,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29631, 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 zSep uintptr = ts + 1547 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+29550, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21819 + zList = rbuMPrintf(tls, p, ts+29645, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21914 } } zList = rbuMPrintf(tls, p, - ts+29562, libc.VaList(bp+40, zList)) + ts+29657, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29612, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21819 + zList = rbuMPrintf(tls, p, ts+29707, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21914 } } } @@ -131685,7 +132452,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29625, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29720, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -131699,21 +132466,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29612, + zList = rbuMPrintf(tls, p, ts+29707, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14993 + zSep = ts + 15007 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29651, + zList = rbuMPrintf(tls, p, ts+29746, 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 + 14993 + zSep = ts + 15007 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29681, + zList = rbuMPrintf(tls, p, ts+29776, 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 + 14993 + zSep = ts + 15007 } } } @@ -131748,19 +132515,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29718 + var zSep uintptr = ts + 29813 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28870, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28965, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16498) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16545) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28993, libc.VaList(bp+8, zIdx))) } break } @@ -131772,15 +132539,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 29138 + zDesc = ts + 29233 } else { - zDesc = ts + 1527 + zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29731, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14993 + z = rbuMPrintf(tls, p, ts+29826, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 15007 } } - z = rbuMPrintf(tls, p, ts+29742, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29837, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -131795,12 +132562,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1527 + var zComma uintptr = ts + 1547 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29746) + ts+29841) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -131809,7 +132576,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28993, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -131819,25 +132586,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29796, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29891, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29818, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29913, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 29138 + return ts + 29233 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14993 + zComma = ts + 15007 } } - zCols = rbuMPrintf(tls, p, ts+29828, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29923, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29843, + ts+29938, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 0)) } } @@ -131847,50 +132614,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1527 + var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1527 + var zPk uintptr = ts + 1547 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, (*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 { - zPk = ts + 29905 + zPk = ts + 30000 } - zSql = rbuMPrintf(tls, p, ts+29918, + zSql = rbuMPrintf(tls, p, ts+30013, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29945 + return ts + 30040 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14993 + zComma = ts + 15007 } 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+29955, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+30050, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29962, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30057, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29994 + return ts + 30089 } - return ts + 1527 + return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 0)) } } @@ -131903,7 +132670,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+30009, + ts+30104, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -131940,7 +132707,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30066) + ts+30161) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -132045,7 +132812,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+30132, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+30227, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -132065,24 +132832,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30152, + ts+30247, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+30217, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+30312, libc.VaList(bp+128, zTbl, zBind))) } 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+30253, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+30348, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -132098,7 +132865,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+30287, + ts+30382, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -132106,31 +132873,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 30348 + return ts + 30443 } - return ts + 30352 + return ts + 30447 }() } - return ts + 1527 + return ts + 1547 }(), 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+30358, + ts+30453, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+30419, + ts+30514, 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 + 30348 + return ts + 30443 } - return ts + 30352 + return ts + 30447 }(), zCollist, zLimit)) } @@ -132155,8 +132922,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6781) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6777) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6795) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6791) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -132165,52 +132932,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1527 + return ts + 1547 } - return ts + 30578 + return ts + 30673 }() 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+30587, + ts+30682, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30623 + return ts + 30718 } - return ts + 1527 + return ts + 1547 }(), zBindings))) } 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+30633, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30728, 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 + var zRbuRowid uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30661 + zRbuRowid = ts + 30756 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30673, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30768, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30749 + return ts + 30844 } - return ts + 1527 + return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30766, + ts+30861, 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+31065, + ts+31160, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -132218,14 +132985,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1527 + var zRbuRowid uintptr = ts + 1547 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 31164 + zRbuRowid = ts + 31259 } else { - zRbuRowid = ts + 31174 + zRbuRowid = ts + 31269 } } @@ -132238,35 +133005,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+29221, 0) + zOrder = rbuMPrintf(tls, p, ts+29316, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14993, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+15007, ts+1547) } } 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+31185, + ts+31280, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 31233 + return ts + 31328 } - return ts + 1527 + return ts + 1547 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zOrder != 0 { - return ts + 20105 + return ts + 20200 } - return ts + 1527 + return ts + 1547 }(), zOrder, zLimit))) } @@ -132329,12 +133096,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1527 + var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30578 + zPrefix = ts + 30673 } - zUpdate = Xsqlite3_mprintf(tls, ts+31239, + zUpdate = Xsqlite3_mprintf(tls, ts+31334, 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) @@ -132361,7 +133128,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -132393,7 +133160,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+31364, 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)), 0) { case RBU_STATE_STAGE: @@ -132463,28 +133230,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6770, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784, 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+6770) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31299, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31394, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31326, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.X__builtin___memcpy_chk(tls, p+48, ts+3265, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31422, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.X__builtin___memcpy_chk(tls, p+48, ts+3279, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } else { - libc.X__builtin___memcpy_chk(tls, p+48, ts+6770, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) + libc.X__builtin___memcpy_chk(tls, p+48, ts+6784, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31344, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31440, 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+6770, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -132517,11 +133284,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+31410, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31506, 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+24491, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24586, (*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)))) == '?' { @@ -132533,16 +133300,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+31442, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6770), + zTarget = Xsqlite3_mprintf(tls, ts+31538, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } - return ts + 31474 + return ts + 31570 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } return zExtra }())) @@ -132558,37 +133325,37 @@ 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+31476, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31572, -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+31491, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31587, 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+31508, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31604, -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+6770, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31524, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31620, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 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+31552, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31648, 0) } } @@ -132617,14 +133384,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31524, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31620, uintptr(0), uintptr(0), uintptr(0)) } } 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+31570, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31666, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -132733,7 +133500,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6770, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6784, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -132750,23 +133517,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31605, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31701, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6770) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784) } - zOal = Xsqlite3_mprintf(tls, ts+31630, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31637, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31726, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31733, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -132787,12 +133554,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -132886,7 +133650,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+24129, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+24224, 0) return } @@ -132979,7 +133743,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31644) + ts+31740) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -132987,7 +133751,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31666, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31762, libc.VaList(bp, iCookie+1)) } } } @@ -133008,7 +133772,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31693, + ts+31789, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -133038,9 +133802,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31851, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31947, 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+31866, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31962, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -133054,10 +133818,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31886, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31982, 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+31911) + ts+32007) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -133071,12 +133835,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32019) + ts+32115) } 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+32084) + ts+32180) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -133088,7 +133852,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32128, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32224, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -133108,15 +133872,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17599) - rbuCopyPragma(tls, p, ts+16694) + rbuCopyPragma(tls, p, ts+17646) + rbuCopyPragma(tls, p, ts+16741) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+32153, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+32249, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -133140,10 +133904,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14911, 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14911, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -133238,7 +134002,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32181, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32277, 0) } if rc == SQLITE_OK { @@ -133254,7 +134018,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31630, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31726, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -133270,7 +134034,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32206, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32302, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -133304,7 +134068,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+32217, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+32313, 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)), -1) } else { @@ -133334,13 +134098,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32289, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32385, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32303) + ts+32399) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -133351,7 +134115,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+32360) + ts+32456) 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)), 0) @@ -133381,10 +134145,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{})), libc.X__builtin_object_size(tls, p, 0)) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -133395,7 +134160,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.X__builtin___memcpy_chk(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+uint64(1), libc.X__builtin_object_size(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, 0)) pCsr += uintptr(nRbu + uint64(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3644, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3658, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -133424,7 +134189,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+32434, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32530, 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 @@ -133442,12 +134207,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32466, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32562, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32498 + return ts + 32594 } - return ts + 32505 + return ts + 32601 }())) } } @@ -133455,7 +134220,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+14882, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14896, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -133466,19 +134231,19 @@ 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+17313) - rbuCopyPragma(tls, p, ts+16709) + rbuCopyPragma(tls, p, ts+17360) + rbuCopyPragma(tls, p, ts+16756) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32512, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32608, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6770, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6784, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32528, uintptr(0), uintptr(0), p+64) + db, ts+32624, uintptr(0), uintptr(0), p+64) } } @@ -133532,7 +134297,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32552, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32648, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -133559,7 +134324,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30578, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30673, 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++ @@ -133576,7 +134341,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14911, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -133589,13 +134354,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14911, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32560, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32656, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -133690,7 +134455,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14897, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14911, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133707,19 +134472,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14897, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14911, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14882 + zBegin = ts + 14896 } else { - zBegin = ts + 32512 + zBegin = ts + 32608 } 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+32512, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32608, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133727,6 +134492,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -133745,7 +134532,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -134040,7 +134827,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32587, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32683, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -134065,7 +134852,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+32610, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32706, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -134110,7 +134897,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -136921,7 +137708,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -136963,7 +137750,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -137024,7 +137811,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -137098,13 +137885,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -137166,7 +137953,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -137178,6 +137965,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -137530,7 +138326,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -137698,45 +138494,45 @@ 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+11675) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11689) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(SessionBuffer{})), libc.X__builtin_object_size(tls, bp, 0)) (*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+33197, bp+16) + sessionAppendStr(tls, bp, ts+33293, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+33210, bp+16) + sessionAppendStr(tls, bp, ts+33306, bp+16) 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+33216, bp+16) + sessionAppendStr(tls, bp, ts+33312, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14993 + zSep = ts + 15007 } } - zSep = ts + 1527 - sessionAppendStr(tls, bp, ts+33145, bp+16) + zSep = ts + 1547 + sessionAppendStr(tls, bp, ts+33241, 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+33221, bp+16) + ts+33317, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33153, bp+16) + sessionAppendStr(tls, bp, ts+33249, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21819 + zSep = ts + 21914 } } @@ -137783,42 +138579,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+33296, bp+16) + sessionAppendStr(tls, bp, ts+33392, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+33145, bp+16) + sessionAppendStr(tls, bp, ts+33241, 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+33216, bp+16) + sessionAppendStr(tls, bp, ts+33312, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21819 + zSep = ts + 21914 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+33314, bp+16) + sessionAppendStr(tls, bp, ts+33410, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32857, bp+16) + sessionAppendStr(tls, bp, ts+32953, bp+16) - zSep = ts + 1527 + zSep = ts + 1547 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+33153, bp+16) + sessionAppendStr(tls, bp, ts+33249, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 33322 + zSep = ts + 33418 } } - sessionAppendStr(tls, bp, ts+5346, bp+16) + sessionAppendStr(tls, bp, ts+5360, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -137831,7 +138627,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6770, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6784, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -137842,21 +138638,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+33327, bp+16) + sessionAppendStr(tls, bp, ts+33423, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21825, bp+16) + sessionAppendStr(tls, bp, ts+21920, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14993, bp+16) + sessionAppendStr(tls, bp, ts+15007, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+33345, bp+16) + sessionAppendStr(tls, bp, ts+33441, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+33356, bp+16) + sessionAppendStr(tls, bp, ts+33452, bp+16) } - sessionAppendStr(tls, bp, ts+5346, bp+16) + sessionAppendStr(tls, bp, ts+5360, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -137870,14 +138666,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11675, p) + var rc int32 = sessionSelectRow(tls, db, ts+11689, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+33360) + ts+33456) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33473) + ts+33569) } return rc } @@ -137905,7 +138701,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -138158,7 +138954,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33617, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33713, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -138174,7 +138970,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+33638, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33734, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -138247,10 +139043,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33657, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33753, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33683, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33779, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -138283,7 +139079,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -138296,7 +139092,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6770, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6784, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -138309,19 +139105,19 @@ 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+33713, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33809, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33757, + ts+33853, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33828, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33924, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11675) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11689) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -138372,14 +139168,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33888, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33984, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33918, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34014, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33942, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33918, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34038, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34014, uintptr(0), uintptr(0), uintptr(0)) } } @@ -138893,7 +139689,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.X__builtin___memcpy_chk(tls, pOut, a1, uint64(n1), libc.X__builtin_object_size(tls, pOut, 0)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.X__builtin___memcpy_chk(tls, pOut, a2, uint64(n2), libc.X__builtin_object_size(tls, pOut, 0)) pOut += uintptr(n2) @@ -139627,7 +140423,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33970, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34066, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -139915,7 +140711,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33998, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+34094, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -140102,7 +140898,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+34029, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34125, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -140170,7 +140966,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34036 + var zErr uintptr = ts + 34132 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -140329,7 +141125,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1527 + return ts + 1547 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -140352,7 +141148,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 34086 + var zErr uintptr = ts + 34182 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -140676,13 +141472,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 34134, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34230, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 34142, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34238, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 34152, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34248, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -141093,7 +141889,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6570, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6584, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -141233,7 +142029,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+34157, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34253, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -141260,14 +142056,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+34164, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34260, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+34195, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+34291, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -141278,7 +142074,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34228, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34324, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -141291,7 +142087,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34265, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34361, 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))) @@ -141300,7 +142096,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+34274, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34370, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -141319,7 +142115,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34307, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34403, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -141334,14 +142130,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34341, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34437, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34349, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34445, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+34381, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34477, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -141349,9 +142145,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34387, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34483, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34401, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34497, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -141359,9 +142155,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34439, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34535, 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+34450, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34546, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -141369,21 +142165,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5464, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5478, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 8347, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17704}, - {FzName: ts + 34485, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 8361, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17751}, + {FzName: ts + 34581, 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+34493, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34589, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34524, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34620, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -141430,15 +142226,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22485) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16610) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34552, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22580) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16657) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34648, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34582) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34678) { *(*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+34592, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34688, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -141455,13 +142251,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34623, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34719, 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+34628, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34724, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34635, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34731, libc.VaList(bp+16, i)) } } } @@ -141499,8 +142295,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+22485) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34643, 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+22580) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34739, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -141532,7 +142328,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+34672, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34768, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -141541,13 +142337,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1527 + return ts + 1547 }(), pzErr) } else { @@ -141569,19 +142365,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 + 34341 + zTail = ts + 34437 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34692 + zTail = ts + 34788 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34700, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34796, 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+16610, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16657, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -141625,18 +142421,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34711, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34807, 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 + 1547 } - return ts + 14993 + return ts + 15007 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34727, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34823, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34734, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22485)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34830, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22580)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -141746,7 +142542,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34760) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34856) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -141756,7 +142552,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+34765) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34861) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -141766,7 +142562,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+34774) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34870) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -141779,7 +142575,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+34784) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34880) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -141789,7 +142585,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+34794) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34890) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -141805,7 +142601,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+22485) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22580) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -141828,7 +142624,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34806 + var zSelect uintptr = ts + 34902 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -141850,7 +142646,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34838) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34934) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -141864,7 +142660,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34846, + ts+34942, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -141962,7 +142758,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34911, 0) + sqlite3Fts5ParseError(tls, pParse, ts+35007, 0) return FTS5_EOF } } @@ -141975,20 +142771,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+34931, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+35027, 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+34962, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35058, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34965, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35061, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30348, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30443, uint64(3)) == 0 { tok = FTS5_AND } break @@ -143755,9 +144551,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34969, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35065, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33998, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+34094, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -143773,7 +144569,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+34974, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+35070, 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') @@ -143860,7 +144656,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20822, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20917, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -143941,7 +144737,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+35003, 0) + ts+35099, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -144111,12 +144907,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+35056, + ts+35152, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 35106 + return ts + 35202 } - return ts + 34969 + return ts + 35065 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -145059,7 +145855,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+35113, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+35209, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -145138,7 +145934,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+35119, + ts+35215, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -145163,7 +145959,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+35170, + ts+35266, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -145186,7 +145982,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+35219, + ts+35315, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -145425,7 +146221,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+35259, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+35355, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -145498,13 +146294,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -146624,7 +147420,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+35282, + ts+35378, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -147817,7 +148613,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1527 + return ts + 1547 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -147983,10 +148779,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -148014,7 +148810,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -148090,7 +148886,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+35366, + ts+35462, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -148133,7 +148929,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -148145,7 +148941,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -148265,7 +149061,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -148664,12 +149460,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -148680,7 +149476,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -148861,7 +149657,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -148985,7 +149781,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -148994,7 +149790,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -149026,8 +149822,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -149080,8 +149876,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -149151,7 +149947,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{})), libc.X__builtin_object_size(tls, bp, 0)) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1527, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1547, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -149167,13 +149963,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+35423, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35519, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+25341, ts+35431, 0, pzErr) + pConfig, ts+25436, ts+35527, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11815, - ts+35466, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11829, + ts+35562, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -149426,7 +150222,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+35113, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+35209, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -149540,7 +150336,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35510, + ts+35606, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -149699,6 +150495,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -149706,7 +150506,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35596) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35692) 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)) @@ -149977,7 +150777,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+35601, 0) + ts+35697, 0) return SQLITE_ERROR } @@ -150008,7 +150808,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5364, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5378, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -150023,7 +150823,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5364, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5378, 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) @@ -150337,7 +151137,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -150369,7 +151169,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -150401,25 +151201,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35640, + ts+35736, 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 + 14993 + return ts + 15007 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bDesc != 0 { - return ts + 35695 + return ts + 35791 } - return ts + 35700 + return ts + 35796 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -150465,12 +151265,12 @@ 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+35704, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35800, 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+5446, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5460, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35806, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -150501,7 +151301,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35738, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35834, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -150532,7 +151332,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35748, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35844, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -150564,14 +151364,14 @@ 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+35769, libc.VaList(bp, z)) + ts+35865, 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 + 34152 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 34248 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -150627,7 +151427,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+35601, 0) + ts+35697, 0) return SQLITE_ERROR __1: ; @@ -150670,7 +151470,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -150844,7 +151644,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -150965,7 +151765,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -150989,28 +151789,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35838, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35934, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35849, 0) + ts+35945, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35929, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36025, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35937, 0) + ts+36033, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+17293, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+17340, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35993, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36089, 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+35999, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36095, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -151068,7 +151868,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17838, z) { + 0 == Xsqlite3_stricmp(tls, ts+17885, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -151081,12 +151881,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36015, + ts+36111, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20723 + return ts + 20818 } - return ts + 36052 + return ts + 36148 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -151716,7 +152516,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+36064, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+36160, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -151960,7 +152760,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+36085, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36181, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -151979,7 +152779,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+36107, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36203, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -152026,7 +152826,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36138) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36234) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -152035,7 +152835,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+36151, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+36247, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -152049,7 +152849,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 36242, ts + 34341, ts + 25341, ts + 34692, ts + 11815, + ts + 36338, ts + 34437, ts + 25436, ts + 34788, ts + 11829, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -152073,7 +152873,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+36249, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+36345, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -152091,13 +152891,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+36249, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36345, 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+36254, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36350, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -152152,17 +152952,17 @@ 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)) = [11]uintptr{ - ts + 36269, - ts + 36337, - ts + 36406, - ts + 36439, - ts + 36478, - ts + 36518, - ts + 36557, - ts + 36598, - ts + 36637, - ts + 36679, - ts + 36719, + ts + 36365, + ts + 36433, + ts + 36502, + ts + 36535, + ts + 36574, + ts + 36614, + ts + 36653, + ts + 36694, + ts + 36733, + ts + 36775, + ts + 36815, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -152229,7 +153029,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3644, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -152264,18 +153064,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36742, + ts+36838, 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+36846, + ts+36942, 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+36884, + ts+36980, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -152287,7 +153087,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36922, + ts+37018, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -152299,14 +153099,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+25341, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11815, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+36242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+25436, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11829, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+36338, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34692, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34788, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+34341, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34437, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -152318,17 +153118,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36964, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37060, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29994 + return ts + 30089 } - return ts + 1527 + return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36994, + ts+37090, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -152365,27 +153165,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37038, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37134, 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+37061, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37157, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34341, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34437, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34692, ts+37067, 0, pzErr) + pConfig, ts+34788, ts+37163, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+36242, ts+37099, 1, pzErr) + pConfig, ts+36338, ts+37195, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34838, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34934, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -152591,12 +153391,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37116, + ts+37212, 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+37166, + ts+37262, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -152604,7 +153404,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34838, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34934, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -152780,7 +153580,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+37195, + zSql = Xsqlite3_mprintf(tls, ts+37291, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -152962,14 +153762,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34341, bp+48) + rc = fts5StorageCount(tls, p, ts+34437, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34692, bp+56) + rc = fts5StorageCount(tls, p, ts+34788, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -153164,9 +153964,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+37227) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37323) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37238) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37334) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -153381,7 +154181,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 + 37249 + var zCat uintptr = ts + 37345 var i int32 libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{})), libc.X__builtin_object_size(tls, p, 0)) @@ -153393,7 +154193,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37258) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37354) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -153404,18 +154204,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+37269) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37365) { 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+37227) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37323) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37238) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37334) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37258) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37354) { } else { rc = SQLITE_ERROR } @@ -153691,7 +154491,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)) = uintptr(0) - var zBase uintptr = ts + 37287 + var zBase uintptr = ts + 37383 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -153833,7 +154633,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37297, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37393, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -153841,11 +154641,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37300, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37396, 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+37305, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37401, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -153853,7 +154653,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37310, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37406, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -153861,7 +154661,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37313, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37409, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -153869,11 +154669,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37316, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37412, 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+37321, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37417, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -153881,19 +154681,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37326, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37422, 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+37330, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37426, 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+37336, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37432, 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+37341, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37437, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -153901,11 +154701,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37345, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37441, 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+37349, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37445, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -153913,7 +154713,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37352, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37448, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -153921,11 +154721,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37356, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37452, 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+37360, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37456, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -153933,7 +154733,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37364, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37460, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -153941,7 +154741,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37368, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37464, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -153949,7 +154749,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37372, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37468, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -153965,24 +154765,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37376, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37472, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37452, 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+37379, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37382, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37475, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37478, 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+37386, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37372, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37482, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37468, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -153997,137 +154797,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37389, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37485, 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+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37452, 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+37397, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37493, 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+37404, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37500, 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+37409, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37505, 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+37305, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37401, 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+37414, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37510, 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+37300, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37396, 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+37419, 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+37372, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37468, 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+37424, 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 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15820, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15867, 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+37429, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37525, 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+37382, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37478, 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+37433, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37529, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37393, 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+37438, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37534, 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+37341, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37437, 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+37444, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37540, 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+37448, uint64(1), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37544, 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+37450, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37546, 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+37364, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37460, 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+37456, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37552, 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+37372, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37468, 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+37464, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37560, 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+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37452, 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+37470, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37566, 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+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37452, 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+37475, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37571, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37393, 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+37481, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37577, 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+37368, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37464, 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+37489, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37585, 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+37497, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37593, 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+37501, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37597, 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+37364, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37460, 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+37509, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37605, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37393, 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+37515, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37611, 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+37368, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37464, 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+37521, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37617, 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+37382, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37478, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -154142,16 +154942,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37528, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37624, 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+37313, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37409, 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+37533, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37629, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -154159,21 +154959,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37538, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37634, 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+37313, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37409, 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+37544, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37640, 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+37313, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37409, 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+37497, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37593, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -154181,7 +154981,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37550, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37646, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -154189,9 +154989,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37556, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37652, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37393, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -154206,12 +155006,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37562, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37658, 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+37566, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37662, 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+37569, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37665, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -154220,7 +155020,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37572, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37668, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -154376,7 +155176,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+37576) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37672) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -154556,22 +155356,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 37287, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37383, 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 + 37591, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37687, 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 + 37597, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37693, 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 + 37604, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37700, 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 @@ -155714,14 +156514,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+37612) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37708) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37616) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37712) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37620) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37716) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37629, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37725, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -155747,19 +156547,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37663, - ts + 37703, - ts + 37738, + ts + 37759, + ts + 37799, + ts + 37834, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23637, *(*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+23732, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37781, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37877, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -155892,11 +156692,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+37814, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37910, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37845, + ts+37941, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -155920,7 +156720,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37896, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37992, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -156204,7 +157004,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1527 + zCopy = ts + 1547 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -156315,7 +157115,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37922, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+38018, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -156337,7 +157137,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37932 + return ts + 38028 } func init() { @@ -157011,7 +157811,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -157357,16 +158157,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -157423,12 +158223,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -157443,6 +158243,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -157464,5 +158265,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 7d04289248..dd184fc5e3 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_darwin_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -176,6 +176,7 @@ const ( AUDIT_USER = 0x0040 AUDIT_WINDATA = 0x0020 AUDIT_ZONENAME = 0x1000 + AUTH_OPEN_NOAUTHFD = -1 AU_ASSIGN_ASID = -1 AU_CLASS_MASK_RESERVED = 0x10000000 AU_DEFAUDITSID = 0 @@ -526,7 +527,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -740,6 +740,7 @@ const ( F_ADDSIGS = 59 F_ALLOCATEALL = 0x00000004 F_ALLOCATECONTIG = 0x00000002 + F_ALLOCATEPERSIST = 0x00000008 F_BARRIERFSYNC = 85 F_CHECK_LV = 98 F_CHKCLEAN = 41 @@ -748,11 +749,11 @@ const ( F_FINDSIGS = 78 F_FLUSH_DATA = 40 F_FREEZE_FS = 53 - F_FSRESERVED = 106 F_FULLFSYNC = 51 F_GETCODEDIR = 72 F_GETFD = 1 F_GETFL = 3 + F_GETLEASE = 107 F_GETLK = 7 F_GETLKPID = 66 F_GETNOSIGPIPE = 74 @@ -780,6 +781,7 @@ const ( F_SETBACKINGSTORE = 70 F_SETFD = 2 F_SETFL = 4 + F_SETLEASE = 106 F_SETLK = 8 F_SETLKW = 9 F_SETLKWTIMEOUT = 10 @@ -793,6 +795,7 @@ const ( F_THAW_FS = 54 F_TLOCK = 2 F_TRANSCODEKEY = 75 + F_TRANSFEREXTENTS = 110 F_TRIM_ACTIVE_FILE = 100 F_ULOCK = 0 F_UNLCK = 2 @@ -802,6 +805,7 @@ const ( GEOPOLY_PI = 3.1415926535897932385 GETSIGSINFO_PLATFORM_BINARY = 1 GID_MAX = 2147483647 + GRAFTDMG_SECURE_BOOT_CRYPTEX_ARGS_VERSION = 1 GUARD_TYPE_MACH_PORT = 0x1 HASHSIZE = 97 HASHTABLE_HASH_1 = 383 @@ -900,6 +904,7 @@ const ( IOPOL_TYPE_DISK = 0 IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9 IOPOL_TYPE_VFS_ATIME_UPDATES = 2 + IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10 IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6 IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7 IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 @@ -911,6 +916,8 @@ const ( IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1 IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0 IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1 + IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0 + IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1 IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0 IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1 IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0 @@ -1028,6 +1035,7 @@ const ( MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN = 255 MAC_OS_VERSION_11_0 = 110000 MAC_OS_VERSION_12_0 = 120000 + MAC_OS_VERSION_13_0 = 130000 MAC_OS_X_VERSION_10_0 = 1000 MAC_OS_X_VERSION_10_1 = 1010 MAC_OS_X_VERSION_10_10 = 101000 @@ -1112,6 +1120,7 @@ const ( MAX_AUDIT_RECORD_SIZE = 32767 MAX_CANON = 1024 MAX_FATAL_kGUARD_EXC_CODE = 128 + MAX_GRAFT_ARGS_SIZE = 512 MAX_INPUT = 1024 MAX_OPTIONAL_kGUARD_EXC_CODE = 524288 MAX_PATHNAME = 512 @@ -1212,11 +1221,14 @@ const ( MPO_CONNECTION_PORT = 0x800 MPO_CONTEXT_AS_GUARD = 0x01 MPO_DENAP_RECEIVER = 0x40 + MPO_ENFORCE_REPLY_PORT_SEMANTICS = 0x2000 MPO_FILTER_MSG = 0x100 MPO_IMMOVABLE_RECEIVE = 0x80 MPO_IMPORTANCE_RECEIVER = 0x08 MPO_INSERT_SEND_RIGHT = 0x10 + MPO_PROVISIONAL_REPLY_PORT = 0x4000 MPO_QLIMIT = 0x02 + MPO_REPLY_PORT = 0x1000 MPO_SERVICE_PORT = 0x400 MPO_STRICT = 0x20 MPO_TEMPOWNER = 0x04 @@ -1361,7 +1373,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1374,49 +1386,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1425,21 +1437,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1451,8 +1463,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1464,22 +1476,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1487,13 +1499,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1508,21 +1520,25 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_ASSUME_NONNULL_BEGIN = 0 OS_ASSUME_NONNULL_END = 0 + OS_ASSUME_PTR_ABI_SINGLE_BEGIN = 0 + OS_ASSUME_PTR_ABI_SINGLE_END = 0 OS_FALLTHROUGH = 0 + OS_HEADER_INDEXABLE = 0 OS_NOESCAPE = 0 OS_NOT_TAIL_CALLED = 0 OS_OVERLOADABLE = 0 OS_REFINED_FOR_SWIFT = 0 + OS_UNSAFE_INDEXABLE = 0 OS_VXWORKS = 0 OVERFLOW = 3 O_ACCMODE = 0x0003 @@ -1533,11 +1549,13 @@ const ( O_CLOEXEC = 0x01000000 O_CREAT = 0x00000200 O_DIRECTORY = 0x00100000 + O_DP_AUTHENTICATE = 0x0004 O_DP_GETRAWENCRYPTED = 0x0001 O_DP_GETRAWUNENCRYPTED = 0x0002 O_DSYNC = 0x400000 O_EVTONLY = 0x00008000 O_EXCL = 0x00000800 + O_EXEC = 0x40000000 O_EXLOCK = 0x00000020 O_FSYNC = 128 O_LARGEFILE = 0 @@ -1549,6 +1567,7 @@ const ( O_POPUP = 0x80000000 O_RDONLY = 0x0000 O_RDWR = 0x0002 + O_SEARCH = 1074790400 O_SHLOCK = 0x00000010 O_SYMLINK = 0x00200000 O_SYNC = 0x0080 @@ -1837,13 +1856,14 @@ const ( RTREE_TRUE = 0x3f RTREE_ZERO = 0.0 RUSAGE_CHILDREN = -1 - RUSAGE_INFO_CURRENT = 5 + RUSAGE_INFO_CURRENT = 6 RUSAGE_INFO_V0 = 0 RUSAGE_INFO_V1 = 1 RUSAGE_INFO_V2 = 2 RUSAGE_INFO_V3 = 3 RUSAGE_INFO_V4 = 4 RUSAGE_INFO_V5 = 5 + RUSAGE_INFO_V6 = 6 RUSAGE_SELF = 0 RU_PROC_RUNS_RESLIDE = 0x00000001 R_OK = 4 @@ -1860,6 +1880,12 @@ const ( SA_SIGINFO = 0x0040 SA_USERSPACE_MASK = 127 SA_USERTRAMP = 0x0100 + SBC_ALTERNATE_SHARED_REGION = 0x0002 + SBC_PANIC_ON_AUTHFAIL = 0x0008 + SBC_PRESERVE_GRAFT = 0x0020 + SBC_PRESERVE_MOUNT = 0x0001 + SBC_STRICT_AUTH = 0x0010 + SBC_SYSTEM_CONTENT = 0x0004 SCHAR_MAX = 127 SCHAR_MIN = -128 SCHEMA_ROOT = 1 @@ -2145,7 +2171,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -2241,6 +2267,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -2376,6 +2403,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -2406,6 +2434,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2506,6 +2535,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2579,7 +2610,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2687,8 +2718,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3279,6 +3310,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3430,6 +3462,7 @@ const ( X_GCC_LIMITS_H_ = 0 X_GID_T = 0 X_GNU_SOURCE = 0 + X_GRAFTDMG_UN_ = 0 X_ID_T = 0 X_INO64_T = 0 X_INO_T = 0 @@ -3881,6 +3914,7 @@ const ( const ( KGUARD_EXC_DESTROY = 1 KGUARD_EXC_MOD_REFS = 2 + KGUARD_EXC_INVALID_OPTIONS = 3 KGUARD_EXC_SET_CONTEXT = 4 KGUARD_EXC_UNGUARDED = 8 KGUARD_EXC_INCORRECT_GUARD = 16 @@ -3901,9 +3935,10 @@ const ( KGUARD_EXC_SEND_INVALID_RIGHT = 262144 KGUARD_EXC_RCV_INVALID_NAME = 524288 - KGUARD_EXC_RCV_GUARDED_DESC = 1048576 - KGUARD_EXC_MOD_REFS_NON_FATAL = 2097152 - KGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304 + KGUARD_EXC_RCV_GUARDED_DESC = 1048576 + KGUARD_EXC_MOD_REFS_NON_FATAL = 2097152 + KGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304 + KGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS = 8388608 ) const ( @@ -3917,6 +3952,11 @@ const ( FILESEC_ACL_RAW = 100 FILESEC_ACL_ALLOCSIZE = 101 ) +const ( + GRAFTDMG_CRYPTEX_BOOT = 1 + GRAFTDMG_CRYPTEX_PREBOOT = 2 + GRAFTDMG_CRYPTEX_DOWNLEVEL = 3 +) const ( P_ALL = 0 @@ -4204,7 +4244,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4535,6 +4584,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4545,6 +4595,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6596,7 +6664,54 @@ type rusage_info_v5 = struct { Fri_flags Uint64_t } -type Rusage_info_current = rusage_info_v5 +type rusage_info_v6 = struct { + Fri_uuid [16]Uint8_t + Fri_user_time Uint64_t + Fri_system_time Uint64_t + Fri_pkg_idle_wkups Uint64_t + Fri_interrupt_wkups Uint64_t + Fri_pageins Uint64_t + Fri_wired_size Uint64_t + Fri_resident_size Uint64_t + Fri_phys_footprint Uint64_t + Fri_proc_start_abstime Uint64_t + Fri_proc_exit_abstime Uint64_t + Fri_child_user_time Uint64_t + Fri_child_system_time Uint64_t + Fri_child_pkg_idle_wkups Uint64_t + Fri_child_interrupt_wkups Uint64_t + Fri_child_pageins Uint64_t + Fri_child_elapsed_abstime Uint64_t + Fri_diskio_bytesread Uint64_t + Fri_diskio_byteswritten Uint64_t + Fri_cpu_time_qos_default Uint64_t + Fri_cpu_time_qos_maintenance Uint64_t + Fri_cpu_time_qos_background Uint64_t + Fri_cpu_time_qos_utility Uint64_t + Fri_cpu_time_qos_legacy Uint64_t + Fri_cpu_time_qos_user_initiated Uint64_t + Fri_cpu_time_qos_user_interactive Uint64_t + Fri_billed_system_time Uint64_t + Fri_serviced_system_time Uint64_t + Fri_logical_writes Uint64_t + Fri_lifetime_max_phys_footprint Uint64_t + Fri_instructions Uint64_t + Fri_cycles Uint64_t + Fri_billed_energy Uint64_t + Fri_serviced_energy Uint64_t + Fri_interval_max_phys_footprint Uint64_t + Fri_runnable_time Uint64_t + Fri_flags Uint64_t + Fri_user_ptime Uint64_t + Fri_system_ptime Uint64_t + Fri_pinstructions Uint64_t + Fri_pcycles Uint64_t + Fri_energy_nj Uint64_t + Fri_penergy_nj Uint64_t + Fri_reserved [14]Uint64_t +} + +type Rusage_info_current = rusage_info_v6 type rlimit = struct { Frlim_cur Rlim_t @@ -7145,6 +7260,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -7184,6 +7310,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -7234,7 +7361,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -7249,6 +7376,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -7617,8 +7745,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -7635,7 +7762,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -7897,8 +8023,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -8243,17 +8369,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -8283,7 +8398,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -8292,49 +8414,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 849, - ts + 875, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, ts + 895, - ts + 921, - ts + 944, - ts + 970, - ts + 992, - ts + 1013, - ts + 1024, - ts + 1032, - ts + 1046, - ts + 1059, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -8436,7 +8559,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -8484,10 +8606,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1092)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -8499,10 +8621,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -8512,21 +8630,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1079, - ts + 1083, - ts + 1088, - ts + 1092, - ts + 1100, - ts + 1105, + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, } // SQL is translated into a sequence of instructions to be @@ -8825,7 +8935,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -8961,6 +9071,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -8984,6 +9096,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8998,9 +9111,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -9359,7 +9475,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1110, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -9385,13 +9501,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1118, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1126, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -9467,7 +9583,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -9489,7 +9605,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -9546,7 +9662,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1142) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 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))) @@ -9679,7 +9795,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1146, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -9703,12 +9819,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1169)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1189)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -9720,7 +9836,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1231) == 0 { if idx > 1 { return 1 } @@ -9742,7 +9858,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1216) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1236) == 0 { if idx > 1 { return 1 } @@ -9756,7 +9872,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1226) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -9764,7 +9880,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1236) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1256) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -9776,7 +9892,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -9810,9 +9926,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -9831,7 +9947,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1259, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1279, 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) { @@ -9845,14 +9961,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1269) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1289) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1275) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1295) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1300) == 0 { rc = 0 } break @@ -10178,7 +10294,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -10188,13 +10304,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1289, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -10212,41 +10328,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1321, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1307, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1327, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -10259,7 +10375,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1332, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -10309,15 +10425,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1216}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1236}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1317}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1322}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1256}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1342}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1356}, + {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 + 1378}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1396}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -10468,7 +10584,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -10732,7 +10848,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1389, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1409, libc.VaList(bp, nByte)) } return p } @@ -10765,7 +10881,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1427, + ts+1447, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -11176,7 +11292,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -11212,7 +11328,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -11232,7 +11348,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -11281,24 +11397,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -11614,7 +11757,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -11687,8 +11830,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1497)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1530)) 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)}, @@ -11900,7 +12043,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1517, 1) + Xsqlite3_str_append(tls, pAccum, ts+1537, 1) goto __5 __11: ; @@ -12461,7 +12604,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1519 + bufpt = ts + 1539 length = 3 goto __58 __127: @@ -12521,7 +12664,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.X__builtin___memcpy_chk(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1523, uint64(4), libc.X__builtin_object_size(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), 0)) + libc.X__builtin___memcpy_chk(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1543, uint64(4), libc.X__builtin_object_size(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), 0)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -12862,7 +13005,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1527 + bufpt = ts + 1547 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -12986,9 +13129,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1528 + return ts + 1548 } - return ts + 1533 + return ts + 1553 }() __220: ; @@ -13136,7 +13279,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1540, 1) + Xsqlite3_str_append(tls, pAccum, ts+1560, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -13153,10 +13296,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1542, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1552, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -13211,7 +13354,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1566)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1586)) // 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 @@ -13376,7 +13519,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1527, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1547, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -13608,20 +13751,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.X__builtin___memcpy_chk(tls, bp, in, uint64(64), libc.X__builtin_object_size(tls, bp, 0)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -13634,46 +13883,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.X__builtin___memcpy_chk(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), 0)) if pVfs == uintptr(0) { - libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{})), libc.X__builtin_object_size(tls, bp, 0)) + libc.X__builtin___memset_chk(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.X__builtin___memcpy_chk(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N), libc.X__builtin_object_size(tls, zBuf, 0)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.X__builtin___memcpy_chk(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn), libc.X__builtin_object_size(tls, zBuf, 0)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -15082,7 +15331,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1575 + var pow63 uintptr = ts + 1595 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -15628,7 +15877,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1594, + ts+1614, libc.VaList(bp, zType)) } @@ -15647,13 +15896,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1528) + logBadConnection(tls, ts+1548) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1639) + logBadConnection(tls, ts+1659) } return 0 } else { @@ -15666,7 +15915,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1648) + logBadConnection(tls, ts+1668) return 0 } else { return 1 @@ -16191,193 +16440,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1656, - ts + 1666, - ts + 1677, - ts + 1689, - ts + 1700, - ts + 1712, - ts + 1719, - ts + 1727, - ts + 1735, - ts + 1740, - ts + 1746, + ts + 1676, + ts + 1686, + ts + 1697, + ts + 1709, + ts + 1720, + ts + 1732, + ts + 1739, + ts + 1747, + ts + 1755, ts + 1760, - ts + 1766, - ts + 1776, - ts + 1781, - ts + 1786, - ts + 1789, - ts + 1795, - ts + 1808, - ts + 1818, - ts + 1822, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1860, + ts + 1765, + ts + 1771, + ts + 1785, + ts + 1791, + ts + 1801, + ts + 1806, + ts + 1811, + ts + 1814, + ts + 1820, + ts + 1827, + ts + 1831, + ts + 1841, + ts + 1848, + ts + 1855, + ts + 1862, ts + 1869, - ts + 1880, - ts + 1889, - ts + 1895, - ts + 1905, - ts + 1915, - ts + 1920, - ts + 1930, - ts + 1941, - ts + 1946, - ts + 1953, - ts + 1964, - ts + 1969, - ts + 1974, - ts + 1980, - ts + 1986, - ts + 1992, - ts + 1998, - ts + 2001, + ts + 1879, + ts + 1888, + ts + 1899, + ts + 1908, + ts + 1914, + ts + 1924, + ts + 1934, + ts + 1939, + ts + 1949, + ts + 1960, + ts + 1965, + ts + 1972, + ts + 1983, + ts + 1988, + ts + 1993, + ts + 1999, ts + 2005, - ts + 2016, - ts + 2027, + ts + 2011, + ts + 2014, + ts + 2018, + ts + 2024, ts + 2035, - ts + 2044, - ts + 2050, - ts + 2057, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, - ts + 2083, + ts + 2046, + ts + 2054, + ts + 2063, + ts + 2070, + ts + 2078, + ts + 2081, + ts + 2084, + ts + 2087, ts + 2090, - ts + 2100, - ts + 2113, - ts + 2124, - ts + 2130, - ts + 2137, - ts + 2142, - ts + 2151, - ts + 2160, - ts + 2167, - ts + 2180, - ts + 2191, - ts + 2196, - ts + 2204, + ts + 2093, + ts + 2096, + ts + 2103, + ts + 2109, + ts + 2119, + ts + 2132, + ts + 2143, + ts + 2149, + ts + 2156, + ts + 2165, + ts + 2174, + ts + 2181, + ts + 2194, + ts + 2205, ts + 2210, - ts + 2217, - ts + 2229, - ts + 2234, + ts + 2218, + ts + 2224, + ts + 2231, ts + 2243, ts + 2248, ts + 2257, ts + 2262, - ts + 2267, - ts + 2273, + ts + 2271, + ts + 2276, ts + 2281, - ts + 2289, - ts + 2299, - ts + 2307, - ts + 2314, - ts + 2327, - ts + 2332, - ts + 2344, - ts + 2352, - ts + 2359, - ts + 2370, - ts + 2377, + ts + 2287, + ts + 2295, + ts + 2303, + ts + 2313, + ts + 2321, + ts + 2328, + ts + 2341, + ts + 2346, + ts + 2358, + ts + 2366, + ts + 2373, ts + 2384, - ts + 2394, - ts + 2403, - ts + 2414, - ts + 2420, - ts + 2431, - ts + 2441, - ts + 2451, - ts + 2458, - ts + 2464, - ts + 2474, - ts + 2485, - ts + 2489, - ts + 2498, - ts + 2507, - ts + 2514, - ts + 2524, - ts + 2531, - ts + 2540, - ts + 2550, - ts + 2557, - ts + 2565, + ts + 2391, + ts + 2398, + ts + 2408, + ts + 2417, + ts + 2428, + ts + 2434, + ts + 2445, + ts + 2455, + ts + 2465, + ts + 2472, + ts + 2478, + ts + 2488, + ts + 2499, + ts + 2503, + ts + 2512, + ts + 2521, + ts + 2528, + ts + 2538, + ts + 2545, + ts + 2554, + ts + 2564, + ts + 2571, ts + 2579, - ts + 2587, + ts + 2593, ts + 2601, - ts + 2612, - ts + 2625, - ts + 2636, - ts + 2642, - ts + 2654, - ts + 2663, - ts + 2671, - ts + 2680, - ts + 2689, - ts + 2696, - ts + 2704, - ts + 2711, - ts + 2722, + ts + 2615, + ts + 2626, + ts + 2639, + ts + 2650, + ts + 2656, + ts + 2668, + ts + 2677, + ts + 2685, + ts + 2694, + ts + 2703, + ts + 2710, + ts + 2718, + ts + 2725, ts + 2736, - ts + 2747, - ts + 2755, + ts + 2750, ts + 2761, ts + 2769, - ts + 2777, - ts + 2787, - ts + 2800, - ts + 2810, - ts + 2823, - ts + 2832, - ts + 2843, - ts + 2851, + ts + 2775, + ts + 2783, + ts + 2791, + ts + 2801, + ts + 2814, + ts + 2824, + ts + 2837, + ts + 2846, ts + 2857, - ts + 2869, - ts + 2881, - ts + 2889, - ts + 2901, - ts + 2914, - ts + 2924, - ts + 2934, - ts + 2939, - ts + 2951, - ts + 2963, - ts + 2973, - ts + 2979, - ts + 2989, - ts + 2996, - ts + 3008, - ts + 3019, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3054, - ts + 3061, - ts + 3072, - ts + 3085, - ts + 3095, - ts + 3102, - ts + 3110, - ts + 3119, - ts + 3125, + ts + 2865, + ts + 2871, + ts + 2883, + ts + 2895, + ts + 2903, + ts + 2915, + ts + 2928, + ts + 2938, + ts + 2948, + ts + 2953, + ts + 2965, + ts + 2977, + ts + 2987, + ts + 2993, + ts + 3003, + ts + 3010, + ts + 3022, + ts + 3033, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3068, + ts + 3075, + ts + 3086, + ts + 3099, + ts + 3109, + ts + 3116, + ts + 3124, ts + 3133, - ts + 3141, - ts + 3149, - ts + 3159, - ts + 3168, - ts + 3179, - ts + 3189, - ts + 3195, - ts + 3206, - ts + 3217, - ts + 3222, - ts + 3230, + ts + 3139, + ts + 3147, + ts + 3155, + ts + 3163, + ts + 3173, + ts + 3182, + ts + 3193, + ts + 3203, + ts + 3209, + ts + 3220, + ts + 3231, + ts + 3236, + ts + 3244, } // Copyright (c) 2017 Apple Inc. All rights reserved. @@ -16994,14 +17243,6 @@ type fspecread = struct { // fspecread_t used by F_SPECULATIVE_READ type Fspecread_t = fspecread -type fbootstraptransfer = struct { - Ffbt_offset Off_t - Ffbt_length Size_t - Ffbt_buffer uintptr -} - -type Fbootstraptransfer_t = fbootstraptransfer - type log2phys = struct { Fl2p_flags uint32 F__ccgo_pad1 [4]byte @@ -17538,6 +17779,26 @@ type fsid = struct{ Fval [2]Int32_t } // @APPLE_OSREFERENCE_LICENSE_HEADER_END@ type Fsid_t = fsid +type secure_boot_cryptex_args = struct { + Fsbc_version U_int32_t + Fsbc_4cc U_int32_t + Fsbc_authentic_manifest_fd int32 + Fsbc_user_manifest_fd int32 + Fsbc_payload_fd int32 + F__ccgo_pad1 [4]byte + Fsbc_flags U_int64_t +} + +type Secure_boot_cryptex_args_t = secure_boot_cryptex_args + +type graft_args = struct { + F__ccgo_pad1 [0]uint64 + F__ccgo_pad2 [0]uint64 + Fmax_size [512]U_int8_t +} + +type Graftdmg_args_un = graft_args + type statfs = struct { Ff_bsize Uint32_t Ff_iosize Int32_t @@ -17629,6 +17890,8 @@ type fhandle = struct { type Fhandle_t = fhandle +type Graftdmg_type_t = Uint32_t + type unixShm = struct { FpShmNode uintptr FpNext uintptr @@ -17738,35 +18001,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3240, FpCurrent: 0}, - {FzName: ts + 3245, FpCurrent: 0}, - {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, + {FzName: ts + 3254, FpCurrent: 0}, + {FzName: ts + 3259, FpCurrent: 0}, {FzName: ts + 3265, FpCurrent: 0}, - {FzName: ts + 3270, FpCurrent: 0}, - {FzName: ts + 3276, FpCurrent: 0}, - {FzName: ts + 3286, FpCurrent: 0}, - {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3297, FpCurrent: 0}, - {FzName: ts + 3303}, + {FzName: ts + 3272, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3284, FpCurrent: 0}, + {FzName: ts + 3290, FpCurrent: 0}, + {FzName: ts + 3300, FpCurrent: 0}, + {FzName: ts + 3306, FpCurrent: 0}, {FzName: ts + 3311, FpCurrent: 0}, - {FzName: ts + 3317, FpCurrent: 0}, - {FzName: ts + 3324}, - {FzName: ts + 3333, FpCurrent: 0}, - {FzName: ts + 3340}, - {FzName: ts + 3350, FpCurrent: 0}, - {FzName: ts + 3357, FpCurrent: 0}, + {FzName: ts + 3317}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3331, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3347, FpCurrent: 0}, + {FzName: ts + 3354}, + {FzName: ts + 3364, FpCurrent: 0}, {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3377, FpCurrent: 0}, - {FzName: ts + 3383, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3403, FpCurrent: 0}, - {FzName: ts + 3410}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, + {FzName: ts + 3397, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3412, FpCurrent: 0}, {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3438, FpCurrent: 0}, - {FzName: ts + 3444}, + {FzName: ts + 3424}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3452, FpCurrent: 0}, + {FzName: ts + 3458}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -17859,11 +18122,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3450, libc.VaList(bp, z, fd)) + ts+3464, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3493, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3507, O_RDONLY, int32(m)) < 0 { break } } @@ -17943,13 +18209,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__error(tls))) - zErr = ts + 1527 + zErr = ts + 1547 if zPath == uintptr(0) { - zPath = ts + 1527 + zPath = ts + 1547 } Xsqlite3_log(tls, errcode, - ts+3503, + ts+3517, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -17957,7 +18223,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3245, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3259, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -17978,7 +18244,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -18025,7 +18291,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { if (*stat)(unsafe.Pointer(bp)).Fst_size == int64(0) && (*UnixFile)(unsafe.Pointer(pFile)).FfsFlags&uint32(SQLITE_FSFLAGS_IS_MSDOS) != uint32(0) { for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { - rc = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 11*24 + 8)))(tls, fd, ts+3534, uint64(1))) + rc = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 11*24 + 8)))(tls, fd, ts+3548, uint64(1))) } if rc != 1 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) @@ -18095,19 +18361,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3536, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3550, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if int32((*stat)(unsafe.Pointer(bp+32)).Fst_nlink) == 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3560, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3574, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if int32((*stat)(unsafe.Pointer(bp+32)).Fst_nlink) > 1 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3589, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3603, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3616, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3630, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -18523,7 +18789,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -19272,7 +19538,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3644, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3658, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -19290,7 +19556,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3357, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -19307,14 +19573,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3647, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3661, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -19334,7 +19600,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -19389,7 +19655,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1527, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1547, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -19402,7 +19668,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -19470,7 +19736,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -19636,7 +19902,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -19664,7 +19930,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3276, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -19727,7 +19993,7 @@ __4: ; libc.X__builtin___memset_chk(tls, pShmNode, 0, uint64(unsafe.Sizeof(unixShmNode{}))+uint64(nShmFilename), libc.X__builtin_object_size(tls, pShmNode, 0)) zShm = libc.AssignPtrUintptr(pShmNode+16, pShmNode+1*96) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3658, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3672, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -19748,7 +20014,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3665, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3679, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -19763,7 +20029,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3240, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) goto shm_open_err __10: ; @@ -19889,11 +20155,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 144)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1527, 1, bp+144) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1547, 1, bp+144) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3311, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) goto shmpage_out __14: ; @@ -19939,7 +20205,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3398, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -20140,7 +20406,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3398 + var zErr uintptr = ts + 3412 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -20178,7 +20444,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -20335,7 +20601,7 @@ func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr (*flock)(unsafe.Pointer(bp + 2176)).Fl_whence = int16(SEEK_SET) (*flock)(unsafe.Pointer(bp + 2176)).Fl_type = int16(F_RDLCK) if (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pNew)).Fh, F_GETLK, libc.VaList(bp, bp+2176)) != -1 { - if libc.Xstrcmp(tls, bp+8+72, ts+3678) == 0 { + if libc.Xstrcmp(tls, bp+8+72, ts+3692) == 0 { return uintptr(unsafe.Pointer(&nfsIoMethods)) } else { return uintptr(unsafe.Pointer(&posixIoMethods)) @@ -20352,11 +20618,11 @@ type Mapping = struct { } var aMap = [6]Mapping{ - {FzFilesystem: ts + 3682, FpMethods: 0}, - {FzFilesystem: ts + 3686, FpMethods: 0}, - {FzFilesystem: ts + 3690, FpMethods: 0}, {FzFilesystem: ts + 3696, FpMethods: 0}, - {FzFilesystem: ts + 3702, FpMethods: 0}, + {FzFilesystem: ts + 3700, FpMethods: 0}, + {FzFilesystem: ts + 3704, FpMethods: 0}, + {FzFilesystem: ts + 3710, FpMethods: 0}, + {FzFilesystem: ts + 3716, FpMethods: 0}, {}, } var autolockIoFinder uintptr = 0 @@ -20383,10 +20649,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3709, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3723, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3714) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3728) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -20405,7 +20671,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -20422,7 +20688,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, 41214) + robust_close(tls, pNew, h, 42407) h = -1 } unixLeaveMutex(tls) @@ -20436,7 +20702,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3724, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3738, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -20444,7 +20710,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -20457,15 +20723,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3732, - ts + 3741, - ts + 3750, - ts + 1540, + ts + 3746, + ts + 3755, + ts + 3764, + ts + 1560, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3755) - azTempDirs[1] = libc.Xgetenv(tls, ts+3769) + azTempDirs[0] = libc.Xgetenv(tls, ts+3769) + azTempDirs[1] = libc.Xgetenv(tls, ts+3783) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -20510,7 +20776,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3776, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3790, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -20595,7 +20861,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3793) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3807) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -20647,10 +20913,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -20764,7 +21030,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3240, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -20808,17 +21074,17 @@ __25: goto __26 } storeLastErrno(tls, p, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - robust_close(tls, p, fd, 41768) + robust_close(tls, p, fd, 42961) return SQLITE_IOERR | int32(13)<<8 __26: ; - if !(0 == libc.Xstrncmp(tls, ts+3800, bp+528+72, uint64(5))) { + if !(0 == libc.Xstrncmp(tls, ts+3814, bp+528+72, uint64(5))) { goto __27 } *(*uint32)(unsafe.Pointer(pFile + 124)) |= uint32(SQLITE_FSFLAGS_IS_MSDOS) __27: ; - if !(0 == libc.Xstrncmp(tls, ts+3806, bp+528+72, uint64(5))) { + if !(0 == libc.Xstrncmp(tls, ts+3820, bp+528+72, uint64(5))) { goto __28 } *(*uint32)(unsafe.Pointer(pFile + 124)) |= uint32(SQLITE_FSFLAGS_IS_MSDOS) @@ -20858,7 +21124,7 @@ __33: if !(isAutoProxy != 0 && zPath != uintptr(0) && !(noLock != 0) && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen != 0) { goto __34 } - envforce = libc.Xgetenv(tls, ts+3812) + envforce = libc.Xgetenv(tls, ts+3826) useProxy = 0 if !(envforce != uintptr(0)) { @@ -20877,7 +21143,7 @@ __36: if !(rc == SQLITE_OK) { goto __38 } - rc = proxyTransformUnixFile(tls, pFile, ts+3839) + rc = proxyTransformUnixFile(tls, pFile, ts+3853) if !(rc != SQLITE_OK) { goto __39 } @@ -20916,7 +21182,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+3350, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) } return rc } @@ -20924,9 +21190,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+3846, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3860, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -20993,18 +21259,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3438, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&S_IFMT == S_IFLNK { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+144, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3429, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 144 + uintptr(got))) = int8(0) @@ -21044,14 +21310,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3258, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -21083,7 +21349,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3644, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3658, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -21111,11 +21377,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.X__builtin___memset_chk(tls, zBuf, 0, uint64(nBuf), libc.X__builtin_object_size(tls, zBuf, 0)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3852, O_RDONLY, uint16(0)) + fd = robust_open(tls, ts+3866, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.X__builtin___memcpy_chk(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0))), libc.X__builtin_object_size(tls, zBuf, 0)) @@ -21126,7 +21392,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -21203,12 +21469,12 @@ func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_ if !(libc.Xconfstr(tls, X_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) != 0) { return SQLITE_IOERR | int32(15)<<8 } - len = int32(libc.Xstrlcat(tls, lPath, ts+3865, maxLen)) + len = int32(libc.Xstrlcat(tls, lPath, ts+3879, maxLen)) } if int32(*(*int8)(unsafe.Pointer(lPath + uintptr(len-1)))) != '/' { - len = int32(libc.Xstrlcat(tls, lPath, ts+3878, maxLen)) + len = int32(libc.Xstrlcat(tls, lPath, ts+3892, maxLen)) } dbLen = int32(libc.Xstrlen(tls, dbPath)) @@ -21222,7 +21488,7 @@ func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_ }() } *(*int8)(unsafe.Pointer(lPath + uintptr(i+len))) = int8(0) - libc.Xstrlcat(tls, lPath, ts+3839, maxLen) + libc.Xstrlcat(tls, lPath, ts+3853, maxLen) return SQLITE_OK } @@ -21340,7 +21606,7 @@ __11: __12: return SQLITE_IOERR | int32(15)<<8 __13: - return Xsqlite3CantopenError(tls, 42566) + return Xsqlite3CantopenError(tls, 43759) __10: ; __8: @@ -21357,7 +21623,7 @@ __14: (*UnixFile)(unsafe.Pointer(pNew)).FopenFlags = openFlags libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3_vfs{})), libc.X__builtin_object_size(tls, bp, 0)) (*Sqlite3_vfs)(unsafe.Pointer(bp)).FpAppData = uintptr(unsafe.Pointer(&autolockIoFinder)) - (*Sqlite3_vfs)(unsafe.Pointer(bp)).FzName = ts + 3880 + (*Sqlite3_vfs)(unsafe.Pointer(bp)).FzName = ts + 3894 (*UnixUnusedFd)(unsafe.Pointer(pUnused)).Ffd = fd (*UnixUnusedFd)(unsafe.Pointer(pUnused)).Fflags = openFlags (*UnixFile)(unsafe.Pointer(pNew)).FpPreallocatedUnused = pUnused @@ -21371,7 +21637,7 @@ __14: __15: ; end_create_proxy: - robust_close(tls, pNew, fd, 42590) + robust_close(tls, pNew, fd, 43783) Xsqlite3_free(tls, pNew) Xsqlite3_free(tls, pUnused) return rc @@ -21415,16 +21681,16 @@ func proxyBreakConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr) int32 { cPath = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FconchFilePath readLen = uint64(0) pathLen = uint64(0) - *(*[64]int8)(unsafe.Pointer(bp + 1088)) = *(*[64]int8)(unsafe.Pointer(ts + 3886)) + *(*[64]int8)(unsafe.Pointer(bp + 1088)) = *(*[64]int8)(unsafe.Pointer(ts + 3900)) fd = -1 rc = -1 _ = myHostID pathLen = libc.Xstrlcpy(tls, bp+64, cPath, uint64(PATH_MAX)) - if !(pathLen > uint64(PATH_MAX) || pathLen < uint64(6) || libc.Xstrlcpy(tls, bp+64+uintptr(pathLen-uint64(5)), ts+3950, uint64(6)) != uint64(5)) { + if !(pathLen > uint64(PATH_MAX) || pathLen < uint64(6) || libc.Xstrlcpy(tls, bp+64+uintptr(pathLen-uint64(5)), ts+3964, uint64(6)) != uint64(5)) { goto __1 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3956, libc.VaList(bp, int32(pathLen))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3970, libc.VaList(bp, int32(pathLen))) goto end_breaklock __1: ; @@ -21432,7 +21698,7 @@ __1: if !(readLen < uint64(PROXY_HEADERLEN+PROXY_HOSTIDLEN)) { goto __2 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3976, libc.VaList(bp+8, int32(readLen))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3990, libc.VaList(bp+8, int32(readLen))) goto end_breaklock __2: ; @@ -21440,27 +21706,27 @@ __2: if !(fd < 0) { goto __3 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+3996, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4010, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) goto end_breaklock __3: ; if !((*(*func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 12*24 + 8)))(tls, fd, bp+1152, readLen, int64(0)) != Ssize_t(readLen)) { goto __4 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4015, libc.VaList(bp+24, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4029, libc.VaList(bp+24, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) goto end_breaklock __4: ; if !(libc.Xrename(tls, bp+64, cPath) != 0) { goto __5 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4033, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+1088, ts+4047, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) goto end_breaklock __5: ; rc = 0 - libc.Xfprintf(tls, libc.X__stderrp, ts+4052, libc.VaList(bp+40, cPath)) - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 42693) + libc.Xfprintf(tls, libc.X__stderrp, ts+4066, libc.VaList(bp+40, cPath)) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 43886) (*UnixFile)(unsafe.Pointer(conchFile)).Fh = fd (*UnixFile)(unsafe.Pointer(conchFile)).FopenFlags = O_RDWR | O_CREAT @@ -21472,10 +21738,10 @@ 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, 42701) + robust_close(tls, pFile, fd, 43894) __7: ; - libc.Xfprintf(tls, libc.X__stderrp, ts+4076, libc.VaList(bp+48, cPath, bp+1088)) + libc.Xfprintf(tls, libc.X__stderrp, ts+4090, libc.VaList(bp+48, cPath, bp+1088)) __6: ; return rc @@ -21752,7 +22018,7 @@ end_takeconch: if !((*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0) { goto __29 } - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 42954) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 44147) __29: ; (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 @@ -21764,7 +22030,7 @@ __29: (*UnixFile)(unsafe.Pointer(pFile)).Fh = fd goto __31 __30: - rc = Xsqlite3CantopenError(tls, 42962) + rc = Xsqlite3CantopenError(tls, 44155) __31: ; @@ -21882,7 +22148,7 @@ func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) i++ } - libc.X__builtin___memcpy_chk(tls, conchPath+uintptr(i+1), ts+4114, uint64(7), libc.X__builtin_object_size(tls, conchPath+uintptr(i+1), 0)) + libc.X__builtin___memcpy_chk(tls, conchPath+uintptr(i+1), ts+4128, uint64(7), libc.X__builtin_object_size(tls, conchPath+uintptr(i+1), 0)) return SQLITE_OK } @@ -21896,7 +22162,7 @@ func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { return SQLITE_BUSY } - if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3839) != 0) || oldPath != 0 && !(libc.Xstrncmp(tls, oldPath, path, uint64(PATH_MAX)) != 0) { + if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3853) != 0) || oldPath != 0 && !(libc.Xstrncmp(tls, oldPath, path, uint64(PATH_MAX)) != 0) { return SQLITE_OK } else { var lockProxy uintptr = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxy @@ -21923,7 +22189,7 @@ func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int libc.Xstrlcpy(tls, dbPath, (*AfpLockingContext)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FlockingContext)).FdbPath, uint64(PATH_MAX)) } else if (*UnixFile)(unsafe.Pointer(pFile)).FpMethod == uintptr(unsafe.Pointer(&dotlockIoMethods)) { - var len int32 = int32(libc.Xstrlen(tls, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext) - libc.Xstrlen(tls, ts+4121)) + var len int32 = int32(libc.Xstrlen(tls, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext) - libc.Xstrlen(tls, ts+4135)) libc.X__builtin___memcpy_chk(tls, dbPath, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext, uint64(len+1), libc.X__builtin_object_size(tls, dbPath, 0)) } else { libc.Xstrlcpy(tls, dbPath, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext, uint64(PATH_MAX)) @@ -21944,7 +22210,7 @@ func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { return SQLITE_BUSY } proxyGetDbPathForUnixFile(tls, pFile, bp) - if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3839) != 0) { + if !(path != 0) || int32(*(*int8)(unsafe.Pointer(path))) == 0 || !(libc.Xstrcmp(tls, path, ts+3853) != 0) { lockPath = uintptr(0) } else { lockPath = path @@ -22015,7 +22281,7 @@ func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { if (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath != 0 { *(*uintptr)(unsafe.Pointer(pArg)) = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath } else { - *(*uintptr)(unsafe.Pointer(pArg)) = ts + 4127 + *(*uintptr)(unsafe.Pointer(pArg)) = ts + 4141 } } else { *(*uintptr)(unsafe.Pointer(pArg)) = uintptr(0) @@ -22038,7 +22304,7 @@ func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { var proxyPath uintptr = pArg if isProxyStyle != 0 { var pCtx uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext - if !(libc.Xstrcmp(tls, pArg, ts+3839) != 0) || + if !(libc.Xstrcmp(tls, pArg, ts+3853) != 0) || (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath != 0 && !(libc.Xstrncmp(tls, (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath, proxyPath, uint64(PATH_MAX)) != 0) { rc = SQLITE_OK } else { @@ -22188,15 +22454,15 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [9]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4145, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4150, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4160, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3714, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4173, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4184, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4195, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4204, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4213, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4159, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4164, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4174, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3728, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4187, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4198, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4209, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4218, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 4227, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -22251,7 +22517,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 4224, + FzName: ts + 4238, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -22418,40 +22684,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -22462,7 +22773,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4230, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4244, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -22518,7 +22829,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.X__builtin___memset_chk(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{})), libc.X__builtin_object_size(tls, pFile, 0)) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -22594,7 +22905,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3644, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3658, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -22715,7 +23026,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+4245, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+4259, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -22788,7 +23099,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+4268, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+4282, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -22851,6 +23162,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -23534,6 +23850,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -23566,6 +23883,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -25995,7 +26313,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+4283, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+4297, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -27132,7 +27450,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -27193,7 +27511,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.X__builtin___memcpy_chk(tls, pPtr, zPathname, uint64(nPathname), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(nPathname) - libc.X__builtin___memcpy_chk(tls, pPtr, ts+4310, uint64(8), libc.X__builtin_object_size(tls, pPtr, 0)) + libc.X__builtin___memcpy_chk(tls, pPtr, ts+4324, uint64(8), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -27206,7 +27524,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.X__builtin___memcpy_chk(tls, pPtr, zPathname, uint64(nPathname), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(nPathname) - libc.X__builtin___memcpy_chk(tls, pPtr, ts+4319, uint64(4), libc.X__builtin_object_size(tls, pPtr, 0)) + libc.X__builtin___memcpy_chk(tls, pPtr, ts+4333, uint64(4), libc.X__builtin_object_size(tls, pPtr, 0)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -27258,9 +27576,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4324, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4338, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4331, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+4345, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -27524,7 +27842,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -27648,7 +27966,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -27687,7 +28005,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -27764,7 +28082,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -27891,6 +28209,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -28764,7 +29083,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -28949,7 +29268,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+4341, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+4355, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -29520,7 +29839,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -29619,7 +29938,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -29787,7 +30106,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+4359, + ts+4373, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -30205,7 +30524,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -30350,7 +30669,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+4396, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4410, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -30480,7 +30799,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -30953,7 +31272,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -31458,7 +31777,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -31849,7 +32168,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4422)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4436)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -32114,7 +32433,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -32251,7 +32570,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -32268,7 +32587,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -32276,7 +32595,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -32319,7 +32638,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -32329,7 +32648,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -32579,7 +32898,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -32611,8 +32930,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -32627,7 +32945,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -32637,7 +32955,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -32650,7 +32968,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -32659,14 +32977,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __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)) @@ -32676,7 +32994,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -32723,63 +33041,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.X__builtin___memcpy_chk(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart), libc.X__builtin_object_size(tls, temp+uintptr(iCellStart), 0)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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.X__builtin___memcpy_chk(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart), libc.X__builtin_object_size(tls, temp+uintptr(iCellStart), 0)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.X__builtin___memcpy_chk(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size), libc.X__builtin_object_size(tls, data+uintptr(cbrk), 0)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -32811,10 +33123,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.X__builtin___memcpy_chk(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2), libc.X__builtin_object_size(tls, aData+uintptr(iAddr), 0)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -32825,15 +33136,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -32858,7 +33169,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -32869,7 +33180,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -32917,26 +33228,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -32946,7 +33257,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -32954,7 +33265,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -32962,10 +33273,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -33034,7 +33345,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -33064,11 +33375,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -33079,15 +33390,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -33115,14 +33426,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -33136,7 +33447,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -33148,7 +33459,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -33251,7 +33562,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -33279,7 +33590,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -33318,7 +33629,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -33342,7 +33653,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -33391,7 +33702,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4438) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4452) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -34163,7 +34474,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4447, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4461, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -34201,7 +34512,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -34616,7 +34927,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -34642,7 +34953,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -34650,6 +34961,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -34659,7 +34973,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -34675,7 +34989,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -34736,7 +35050,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -34771,7 +35085,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -34831,7 +35145,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -34870,7 +35184,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -34901,7 +35215,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -35242,7 +35556,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -35486,14 +35800,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -35538,7 +35852,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -35587,7 +35901,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -35666,10 +35980,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -35677,7 +35989,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -35739,7 +36052,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -35759,7 +36072,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -35779,7 +36092,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -35991,7 +36304,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -36195,7 +36508,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -36260,7 +36573,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -36308,7 +36621,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -36427,7 +36740,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -36587,7 +36900,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -36652,7 +36965,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -36688,7 +37001,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -36732,7 +37045,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -36844,7 +37157,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -37002,7 +37315,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -37059,7 +37372,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -37075,7 +37388,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -37149,7 +37462,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -37161,7 +37474,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -37172,7 +37485,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -37337,7 +37650,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -37609,12 +37922,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -37622,7 +37935,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.X__builtin___memmove_chk(tls, pData, pCell, uint64(sz), libc.X__builtin_object_size(tls, pData, 0)) @@ -37682,7 +37995,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, 74290) + Xsqlite3CorruptError(tls, 75549) 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)) @@ -37771,7 +38084,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __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)) @@ -37887,7 +38200,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -38205,7 +38518,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -38216,7 +38529,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -38374,7 +38687,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -38448,7 +38761,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -38510,7 +38823,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -38538,7 +38851,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -38799,7 +39112,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -38989,7 +39302,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -39026,6 +39339,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -39116,7 +39431,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -39139,7 +39454,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -39219,7 +39534,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -39332,7 +39647,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -39393,7 +39708,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -39431,13 +39746,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.X__builtin___memcpy_chk(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124))), libc.X__builtin_object_size(tls, oldCell, 0)) @@ -39544,7 +39859,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -39567,7 +39882,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -39668,7 +39983,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -39676,11 +39991,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -39755,7 +40070,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -39824,7 +40139,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -39853,7 +40168,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -39929,7 +40244,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -39943,7 +40258,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -40077,7 +40392,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -40265,7 +40580,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4451, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4465, 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)) @@ -40290,11 +40605,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4453, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4467, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4476, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4490, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { @@ -40315,13 +40630,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4501, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4515, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4530, + ts+4544, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -40340,7 +40655,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4584, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4598, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -40351,7 +40666,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4606, libc.VaList(bp+8, iPage)) + ts+4620, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -40374,12 +40689,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4645, + ts+4659, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4671 + return ts + 4685 } - return ts + 4676 + return ts + 4690 }(), expected-N, expected)) } @@ -40486,13 +40801,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4697 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4711 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4707, libc.VaList(bp, rc)) + ts+4721, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -40503,7 +40818,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4745, libc.VaList(bp+8, rc)) + ts+4759, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -40511,14 +40826,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4783, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4797, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4805 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4819 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -40535,7 +40850,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4831 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4845 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -40560,7 +40875,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4859, + checkAppendMsg(tls, pCheck, ts+4873, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -40573,7 +40888,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4889, 0) + checkAppendMsg(tls, pCheck, ts+4903, 0) doCoverageCheck = 0 goto __10 __13: @@ -40589,7 +40904,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4913, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4927, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -40627,7 +40942,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4937, 0) + checkAppendMsg(tls, pCheck, ts+4951, 0) depth = d2 __21: ; @@ -40700,7 +41015,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4962, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4976, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -40717,7 +41032,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4999, + ts+5013, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -40837,7 +41152,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 5051 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 5065 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)).FzPfx = uintptr(0) @@ -40873,7 +41188,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+5067, + ts+5081, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -40883,7 +41198,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+5112, 0) + ts+5126, 0) __16: ; __10: @@ -40930,13 +41245,13 @@ __23: 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+5167, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+5181, 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+5189, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+5203, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -41171,6 +41486,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -41184,8 +41508,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -41193,7 +41517,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3644, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3658, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -41204,7 +41528,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+5223, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+5237, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -41219,7 +41543,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+5243, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+5257, 0) return SQLITE_ERROR } return SQLITE_OK @@ -41239,7 +41563,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+5274, 0) + pDestDb, SQLITE_ERROR, ts+5288, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -41687,7 +42011,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+5314, + Xsqlite3_str_appendf(tls, bp+8, ts+5328, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -42104,6 +42428,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -42119,7 +42456,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -42179,6 +42516,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -42261,7 +42601,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1527 + return ts + 1547 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -42493,7 +42833,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -42725,7 +43065,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3644, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3658, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -42787,7 +43127,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1527 + zNeg = ts + 1547 rc = SQLITE_OK __1: @@ -42828,7 +43168,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 5321 + zNeg = ts + 5335 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -42847,7 +43187,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+5323, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+5337, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -43151,7 +43491,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -43166,14 +43506,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -43232,6 +43572,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -43256,10 +43599,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.X__builtin___memset_chk(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136), libc.X__builtin_object_size(tls, p+136, 0)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -43297,21 +43640,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -43660,85 +44011,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 + } + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -43838,6 +44221,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -43865,7 +44258,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -43873,12 +44266,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -43897,7 +44290,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -43948,7 +44343,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -44077,8 +44472,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -44089,10 +44484,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -44103,6 +44494,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -44118,34 +44514,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+5328, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+5342, 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 + 1527 + zColl = ts + 1547 } - if libc.Xstrcmp(tls, zColl, ts+1072) == 0 { - zColl = ts + 5333 + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 5347 } - Xsqlite3_str_appendf(tls, bp+144, ts+5335, + Xsqlite3_str_appendf(tls, bp+144, ts+5349, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 5321 + return ts + 5335 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 5343 + return ts + 5357 } - return ts + 1527 + return ts + 1547 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+5346, 1) + Xsqlite3_str_append(tls, bp+144, ts+5360, 1) break } @@ -44153,7 +44549,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+5348, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+5362, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -44161,32 +44557,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+5357, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+5371, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+5357, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+5371, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1307, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+5364, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+5378, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1301, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -44196,13 +44592,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1307, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, 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+1301, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1528 + zP4 = ts + 1548 } else { - zP4 = ts + 5367 + zP4 = ts + 5381 } break @@ -44210,7 +44606,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+5374, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+5388, libc.VaList(bp+120, pVtab)) break } @@ -44221,20 +44617,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+5382, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+5396, 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+5387, 1) + Xsqlite3_str_append(tls, bp+144, ts+5401, 1) break } case -4: { - zP4 = ts + 5389 + zP4 = ts + 5403 break } @@ -44259,7 +44655,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 5397, ts + 5399, ts + 5401, ts + 5406} +var encnames = [4]uintptr{ts + 5411, ts + 5413, ts + 5415, ts + 5420} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -44361,7 +44757,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -44710,8 +45106,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5411, ts + 5416, ts + 5423, ts + 5426, ts + 5429, ts + 5432, ts + 5435, ts + 5438, - ts + 5446, ts + 5449, ts + 5456, ts + 5464, + ts + 5425, ts + 5430, ts + 5437, ts + 5440, ts + 5443, ts + 5446, ts + 5449, ts + 5452, + ts + 5460, ts + 5463, ts + 5470, ts + 5478, } // Close a VDBE cursor and release all the resources that cursor @@ -44920,7 +45316,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5471, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5485, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -44928,16 +45324,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5483, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5497, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5497, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5511, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5512, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5526, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -45083,7 +45479,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5525, 0) + Xsqlite3VdbeError(tls, p, ts+5539, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -45363,7 +45759,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -45373,14 +45769,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -45391,16 +45789,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -45417,7 +45811,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -45968,16 +46362,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -45995,7 +46393,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -46025,7 +46427,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -46059,7 +46461,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -46082,7 +46484,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -46104,7 +46506,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -46248,7 +46657,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -46419,7 +46828,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -46445,7 +46854,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -46488,7 +46897,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -46556,13 +46965,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5555 + zContext = ts + 5569 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5574 + zContext = ts + 5588 } else { - zContext = ts + 5593 + zContext = ts + 5607 } - zMsg = Xsqlite3_mprintf(tls, ts+5602, + zMsg = Xsqlite3_mprintf(tls, ts+5616, 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) @@ -46593,7 +47002,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -46648,7 +47057,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -46667,7 +47076,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5638, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5652, 0) return 1 } else { return 0 @@ -46677,7 +47086,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5683, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5697, 0) return 1 } else { return vdbeSafety(tls, p) @@ -46719,14 +47128,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -46938,6 +47348,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -47134,7 +47548,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5723, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5737, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -47325,7 +47739,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -47400,7 +47814,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5746) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5760) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -47829,35 +48243,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5756, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5770, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -47872,7 +48285,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -47904,7 +48317,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -47919,7 +48332,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -47930,7 +48343,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -47940,7 +48353,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -48016,7 +48429,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -48160,7 +48573,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -48178,8 +48591,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -48243,7 +48659,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -48387,7 +48803,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -48559,7 +48975,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5796, 3) + Xsqlite3_str_append(tls, bp+48, ts+5810, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -48595,11 +49011,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1528, 4) + Xsqlite3_str_append(tls, bp+48, ts+1548, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1307, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1327, 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+5314, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5328, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -48614,21 +49030,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5800, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5814, 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+5807, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5821, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5820, 2) + Xsqlite3_str_append(tls, bp+48, ts+5834, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5823, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5837, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5828, 1) + Xsqlite3_str_append(tls, bp+48, ts+5842, 1) } } } @@ -48684,7 +49100,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -48788,12 +49205,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -48845,11 +49261,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1088, - ts + 1100, - ts + 1105, - ts + 1083, - ts + 1528, + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1548, } // Execute as much of a VDBE program as we can. @@ -48887,7 +49303,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -48916,11 +49331,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -48990,42 +49408,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -49033,52 +49452,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -49120,19 +49539,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -49141,7 +49560,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -49149,11 +49568,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -49389,7 +49808,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -49885,20 +50304,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5830, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5844, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5851, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5865, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5858, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5872, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -50288,14 +50707,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -50373,72 +50792,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -50455,10 +50882,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -50470,33 +50897,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -50505,43 +50932,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.X__builtin___memcpy_chk(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0))), libc.X__builtin_object_size(tls, bp+216, 0)) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.X__builtin___memcpy_chk(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0))), libc.X__builtin_object_size(tls, bp+224, 0)) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -50557,26 +50984,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -50584,12 +51011,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -50604,17 +51031,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -50629,163 +51056,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -50794,20 +51221,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -50817,15 +51244,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -50833,9 +51260,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -50847,52 +51274,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -50901,24 +51328,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -50932,13 +51359,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -50947,38 +51374,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -50987,10 +51414,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -50998,10 +51425,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -51009,35 +51436,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -51045,372 +51510,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.X__builtin___memset_chk(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{})), libc.X__builtin_object_size(tls, bp+232, 0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -51418,15 +51884,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -51435,124 +51901,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5882, + Xsqlite3VdbeError(tls, p, ts+5896, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -51562,40 +52028,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -51613,339 +52079,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.X__builtin___memcpy_chk(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0))), libc.X__builtin_object_size(tls, bp+296, 0)) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.X__builtin___memcpy_chk(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn), libc.X__builtin_object_size(tls, zPayload, 0)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.X__builtin___memcpy_chk(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn), libc.X__builtin_object_size(tls, zPayload, 0)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -51954,20 +52420,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -51978,244 +52444,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5923, 0) + Xsqlite3VdbeError(tls, p, ts+5937, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*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)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5974, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5988, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5996, 0) + ts+6010, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -52224,172 +52690,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+6050, 0) + ts+6064, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 6105 + return ts + 6119 } return func() uintptr { if iRollback != 0 { - return ts + 6153 + return ts + 6167 } - return ts + 6196 + return ts + 6210 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+6237) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+6251) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -52409,36 +52875,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -52446,22 +52912,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -52472,24 +52938,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -52497,30 +52963,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -52536,10 +53002,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -52548,10 +53014,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -52571,83 +53037,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1547 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -52656,31 +53122,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -52688,10 +53154,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -52712,105 +53178,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -52822,231 +53288,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -53056,85 +53524,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -53142,59 +53610,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -53209,121 +53677,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -53331,93 +53799,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -53430,7 +53898,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -53445,81 +53913,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -53529,38 +53997,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -53568,205 +54036,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -53776,90 +54244,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -53868,36 +54336,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -53908,88 +54376,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+6265) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+6279) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -54001,35 +54469,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -54038,63 +54506,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -54103,13 +54571,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -54117,20 +54585,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -54140,45 +54608,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -54191,10 +54659,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -54205,10 +54673,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -54216,30 +54684,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 6282 + goto __797 +__796: + zSchema = ts + 6296 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+6296, + ts+6310, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -54249,36 +54717,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -54286,10 +54754,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -54321,22 +54789,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -54346,15 +54814,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -54364,17 +54832,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -54384,34 +54852,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -54420,48 +54888,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+6339, 0) + Xsqlite3VdbeError(tls, p, ts+6353, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -54469,10 +54937,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -54494,24 +54962,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -54543,78 +55011,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -54622,11 +55090,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -54642,14 +55110,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -54657,16 +55125,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -54674,16 +55142,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -54694,10 +55162,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -54720,73 +55188,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -54796,22 +55264,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -54824,32 +55292,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -54861,70 +55329,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+6376, + ts+6390, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6428 + return ts + 6442 } - return ts + 6433 + return ts + 6447 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -54932,17 +55400,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -54952,10 +55420,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -54969,10 +55437,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -54982,69 +55450,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6440, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6454, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -55052,16 +55520,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -55074,17 +55542,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -55094,24 +55562,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -55119,52 +55587,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5746, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5760, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -55173,54 +55641,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.X__builtin___memset_chk(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{})), libc.X__builtin_object_size(tls, bp+976, 0)) @@ -55228,69 +55696,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -55302,27 +55770,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -55330,42 +55798,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -55374,41 +55842,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -55422,16 +55890,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -55443,25 +55911,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -55470,24 +55938,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -55512,16 +55980,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -55536,66 +56004,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6469, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6483, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -55616,73 +56084,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3644, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3658, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6475, + Xsqlite3_log(tls, rc, ts+6489, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -55690,13 +56158,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5723, 0) + Xsqlite3VdbeError(tls, p, ts+5737, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1463, 0) + Xsqlite3VdbeError(tls, p, ts+1483, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -55707,10 +56175,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6507, ts + 6516, ts + 6523, - ts + 6529} +var azType = [4]uintptr{ts + 6521, ts + 6530, ts + 6537, + ts + 6543} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -55759,16 +56231,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6541, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6555, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6570 + return ts + 6584 } return func() uintptr { if type1 == U32(7) { - return ts + 6575 + return ts + 6589 } - return ts + 6580 + return ts + 6594 }() }())) rc = SQLITE_ERROR @@ -55788,10 +56260,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6588, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6602, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3644, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3658, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -55801,8 +56273,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -55822,7 +56294,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -55842,8 +56314,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -55851,21 +56323,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6608, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6622, 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+6638, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6652, 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+6674, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6688, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -55874,8 +56346,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -55908,8 +56380,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6695, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6709, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -55936,7 +56408,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6716 + zFault = ts + 6730 __22: ; goto __20 @@ -55969,7 +56441,7 @@ __26: 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 + 6728 + zFault = ts + 6742 __29: ; goto __27 @@ -55989,8 +56461,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6736, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6750, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -56059,7 +56531,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -56087,12 +56559,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3644 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3658 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -56136,7 +56608,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -56219,7 +56691,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -56232,7 +56704,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -58672,11 +59144,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -58836,7 +59304,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6770, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6784, zDb) == 0) { goto __8 } @@ -58957,7 +59425,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6775) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6789) != 0) { goto __33 } goto __14 @@ -59113,14 +59581,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6777, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6791, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6781, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6795, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -59137,7 +59605,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6785, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6799, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -59231,7 +59699,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -59240,7 +59708,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -59295,7 +59763,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6794, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6808, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -59303,14 +59771,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6825, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6839, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) return WRC_Abort __87: ; @@ -59362,7 +59830,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6880, libc.VaList(bp+16, zCol)) + ts+6894, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.X__builtin___memset_chk(tls, pExpr+64, 0, uint64(unsafe.Sizeof(struct{ FpTab uintptr }{})), libc.X__builtin_object_size(tls, pExpr+64, 0)) return WRC_Prune @@ -59399,7 +59867,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6915 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6929 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -59412,23 +59880,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6924 + zErr = ts + 6938 } else { - zErr = ts + 6939 + zErr = ts + 6953 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6961, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6975, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6974, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6988, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6984, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6998, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -59531,15 +59999,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6991 + var zIn uintptr = ts + 7005 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 7019 + zIn = ts + 7033 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 7037 + zIn = ts + 7051 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 7055 + zIn = ts + 7069 } - Xsqlite3ErrorMsg(tls, pParse, ts+7073, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+7087, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -59618,10 +60086,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 7093 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7107 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7098 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7112 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -59668,7 +60136,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7104, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+7118, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -59732,7 +60200,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+7121, libc.VaList(bp, pExpr)) + ts+7135, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -59748,7 +60216,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+7185, + Xsqlite3ErrorMsg(tls, pParse, ts+7199, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -59762,7 +60230,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7221, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+7235, uintptr(0), pExpr) } } else { @@ -59785,30 +60253,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+7249, libc.VaList(bp+16, pExpr)) + ts+7263, 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 + 7292 + zType = ts + 7306 } else { - zType = ts + 7299 + zType = ts + 7313 } - Xsqlite3ErrorMsg(tls, pParse, ts+7309, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7323, 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+7337, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7351, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7359, + Xsqlite3ErrorMsg(tls, pParse, ts+7373, 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+7403, + ts+7417, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -59880,7 +60348,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7451, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7465, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -59896,7 +60364,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7462, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7476, pExpr, pExpr) } break @@ -59952,7 +60420,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -60027,7 +60495,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7473, libc.VaList(bp, i, zType, mx)) + ts+7487, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -60047,7 +60515,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7529, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7543, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -60082,7 +60550,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7563, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7577, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -60139,7 +60607,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7569, libc.VaList(bp, i+1)) + ts+7583, libc.VaList(bp, i+1)) return 1 } } @@ -60167,7 +60635,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7630, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7644, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -60381,7 +60849,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7661, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7675, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -60421,7 +60889,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7563) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7577) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -60432,7 +60900,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7700) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7714) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -60444,7 +60912,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7706, 0) + ts+7720, 0) return WRC_Abort } @@ -60544,12 +61012,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -60585,12 +61053,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -60709,9 +61177,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -60799,14 +61265,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -61134,7 +61599,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) return } @@ -61209,7 +61674,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7765, libc.VaList(bp, mxHeight)) + ts+7779, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -61377,12 +61842,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -61453,12 +61923,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7813, + Xsqlite3ErrorMsg(tls, pParse, ts+7827, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7857 + return ts + 7871 } - return ts + 1527 + return ts + 1547 }(), nElem)) break } @@ -61497,7 +61967,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7859) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7873) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -61523,7 +61993,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7861, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7875, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -61551,7 +62021,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7895, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7909, libc.VaList(bp, pExpr)) } } } @@ -61598,7 +62068,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7915, + Xsqlite3ErrorMsg(tls, pParse, ts+7929, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -61623,7 +62093,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7958, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7972, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -61644,11 +62114,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -61677,7 +62144,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -61773,7 +62244,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -62197,7 +62668,7 @@ __2: 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+7981, + Xsqlite3ErrorMsg(tls, pParse, ts+7995, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -62320,7 +62791,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+8011, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+8025, libc.VaList(bp, zObject)) } } @@ -62330,10 +62801,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -62374,10 +62847,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+7093) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+7107) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+7098) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+7112) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -62808,13 +63281,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+8034) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8048) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8042) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8056) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8048) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8062) == 0 { return 1 } return 0 @@ -63018,7 +63491,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8052, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -63096,7 +63569,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+8299, + Xsqlite3ErrorMsg(tls, pParse, ts+8313, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -64490,7 +65002,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -64504,10 +65016,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -64520,8 +65032,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -64529,12 +65041,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -64560,10 +65072,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -64574,14 +65084,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -64611,27 +65123,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -64640,9 +65152,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -64650,15 +65162,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+8352, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8366, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -64689,8 +65201,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+8379, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+8393, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -64812,8 +65324,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -64834,9 +65346,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -64849,13 +65361,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7981, + Xsqlite3ErrorMsg(tls, pParse, ts+7995, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -64866,11 +65378,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -64892,12 +65404,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -64912,14 +65424,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6862, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6876, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -64927,9 +65463,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -64939,15 +65475,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -64957,22 +65493,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -64981,51 +65517,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8403, 0) + ts+8417, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -65034,18 +65570,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8453)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8467)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -65257,7 +65793,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -65496,6 +66032,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -65722,6 +66259,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -65867,7 +66405,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -66393,7 +66935,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -66411,8 +66955,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -66480,6 +67023,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -66503,7 +67048,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -66526,7 +67073,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -66539,7 +67086,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -66559,7 +67108,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -66699,7 +67250,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -66707,7 +67258,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -66758,11 +67309,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 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+8469, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8483, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -66774,13 +67325,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8497, + ts+8511, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8672, + ts+8686, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -66790,10 +67341,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8846, libc.VaList(bp, zDb, zDb)) + ts+8860, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8993, 0) + ts+9007, 0) } } @@ -66857,7 +67408,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+9144, libc.VaList(bp, zName)) + ts+9158, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -66867,7 +67418,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+9203, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+9217, zName)) { goto __6 } goto exit_rename_table @@ -66876,7 +67427,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+9209, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9223, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -66917,19 +67468,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+9236, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+9250, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9420, + ts+9434, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9725, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9739, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9741, + ts+9755, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -66937,7 +67488,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9799, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9813, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -66949,7 +67500,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+10064, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+10078, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -66961,7 +67512,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+10077, + ts+10091, libc.VaList(bp, zErr, zDb, zTab)) } @@ -67007,12 +67558,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10115, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10129, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+10147, 0) + ts+10161, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -67022,11 +67573,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10174) + ts+10188) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+10233) + ts+10247) } if pDflt != 0 { @@ -67039,12 +67590,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+10286) + ts+10300) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+10332) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+10346) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -67055,7 +67606,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+10359, + ts+10373, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -67077,7 +67628,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10505, + ts+10519, libc.VaList(bp+40, zTab, zDb)) } } @@ -67125,14 +67676,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10735, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10749, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10769, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10783, 0) goto exit_begin_add_column __4: ; @@ -67160,7 +67711,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10799, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10813, 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 } @@ -67200,18 +67751,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10818 + zType = ts + 10832 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10823 + zType = ts + 10837 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10837, + Xsqlite3ErrorMsg(tls, pParse, ts+10851, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10855 + return ts + 10869 } - return ts + 10872 + return ts + 10886 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -67295,11 +67846,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10890, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10904, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -67312,17 +67863,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10911, + ts+10925, 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+11093, + ts+11107, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+10064, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+10078, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -67517,7 +68068,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -67580,12 +68131,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11224, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11238, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 11247 + return ts + 11261 } - return ts + 1527 + return ts + 1547 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -67625,8 +68176,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+11249, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+11263, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -67643,7 +68194,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -67665,7 +68216,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+11257, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+11271, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -67705,12 +68256,12 @@ 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+11263, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+11277, 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 + 11247 + return ts + 11261 } - return ts + 1527 + return ts + 1547 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -67883,8 +68434,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -67967,15 +68518,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.X__builtin___memset_chk(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+440, 0)) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.X__builtin___memset_chk(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+448, 0)) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -68003,7 +68554,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -68036,13 +68587,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -68055,7 +68606,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -68070,7 +68621,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -68126,8 +68677,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -68175,7 +68726,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -68195,7 +68746,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -68243,8 +68794,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -68286,11 +68837,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.X__builtin___memset_chk(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+488, 0)) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.X__builtin___memset_chk(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+496, 0)) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -68360,7 +68911,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -68383,8 +68934,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -68402,16 +68953,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.X__builtin___memset_chk(tls, bp+408, 0, uint64(unsafe.Sizeof(RenameCtx{})), libc.X__builtin_object_size(tls, bp+408, 0)) - libc.X__builtin___memset_chk(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+440, 0)) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.X__builtin___memset_chk(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{})), libc.X__builtin_object_size(tls, bp+416, 0)) + libc.X__builtin___memset_chk(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp+448, 0)) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -68426,31 +68977,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -68468,8 +69019,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -68495,9 +69046,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.X__builtin___memset_chk(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+408, 0)) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.X__builtin___memset_chk(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+416, 0)) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -68525,8 +69076,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -68563,7 +69114,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -68587,7 +69138,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+11268, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+11282, 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) @@ -68668,19 +69219,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10890, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10904, libc.VaList(bp, pName)) goto exit_drop_column __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+11275, + Xsqlite3ErrorMsg(tls, pParse, ts+11289, 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 + 11303 + return ts + 11317 } - return ts + 6516 + return ts + 6530 }(), zCol)) goto exit_drop_column @@ -68689,7 +69240,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+11315, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+11329, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -68703,13 +69254,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+11363, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11377, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11484, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11498, 1) 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 @@ -68827,11 +69378,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11502}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11523}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11543}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11562}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11581}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11516}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11537}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11557}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11576}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11595}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -68865,7 +69416,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11604, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11618, 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) } @@ -68874,10 +69425,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+11627, + ts+11641, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11657, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11671, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -68895,9 +69446,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11675, FzCols: ts + 11688}, - {FzName: ts + 11701, FzCols: ts + 11714}, - {FzName: ts + 11742}, + {FzName: ts + 11689, FzCols: ts + 11702}, + {FzName: ts + 11715, FzCols: ts + 11728}, + {FzName: ts + 11756}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -69088,7 +69639,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11755} + FzName: ts + 11769} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -69339,7 +69890,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11765} + FzName: ts + 11779} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -69353,7 +69904,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11775, + Xsqlite3_str_appendf(tls, bp+24, ts+11789, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -69366,7 +69917,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11780, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11794, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -69408,7 +69959,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11786, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11800, 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)).FnChar-- @@ -69422,7 +69973,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11792} + FzName: ts + 11806} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -69466,7 +70017,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11801, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11815, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -69483,7 +70034,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+11675, 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+11689, 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, -6) @@ -69639,7 +70190,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11811, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11825, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -69696,7 +70247,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+11811, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11825, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -69743,9 +70294,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+11815) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11829) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11819) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11833) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -69828,7 +70379,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1527 + z = ts + 1547 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -69850,15 +70401,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+11823, z) == 0 { + if Xsqlite3_strglob(tls, ts+11837, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11834, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11848, 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+11844, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11858, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -70134,11 +70685,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11701, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11715, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11856, - ts+11910, + ts+11870, + ts+11924, zDb) } return rc @@ -70185,10 +70736,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11675, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11689, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11962, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11976, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -70246,7 +70797,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6770, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6784, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -70276,20 +70827,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1527 + zFile = ts + 1547 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1527 + zName = ts + 1547 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+4224) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+4238) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -70305,13 +70856,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12003, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12017, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12006, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12020, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -70325,7 +70876,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12043, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12057, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -70336,7 +70887,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -70389,7 +70940,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12073, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12087, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -70406,7 +70957,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+12102, 0) + ts+12116, 0) rc = SQLITE_ERROR __23: ; @@ -70472,13 +71023,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1463, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12170, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12184, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -70525,7 +71076,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1527 + zName = ts + 1547 __1: ; i = 0 @@ -70556,14 +71107,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12198, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12212, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12219, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12233, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -70571,7 +71122,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12245, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12259, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -70682,7 +71233,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12267} + FzName: ts + 12281} // Called by the parser to compile an ATTACH statement. // @@ -70695,7 +71246,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12281} + FzName: ts + 12295} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -70709,7 +71260,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+12295, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+12309, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -70741,7 +71292,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+12319, + ts+12333, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -70916,7 +71467,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+12365, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12379, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -70942,11 +71493,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+12388, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+12402, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+12394, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12408, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12414, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -70993,7 +71544,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 8042 + zCol = ts + 8056 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -71017,7 +71568,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+12427, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12441, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -71111,6 +71662,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -71138,9 +71691,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -71159,62 +71711,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -71261,13 +71805,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.X__builtin___memcpy_chk(tls, bp, pParse+uintptr(uint64(uintptr(0)+272)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, bp, 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)) + libc.X__builtin___memcpy_chk(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, bp, 0)) + libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.X__builtin___memcpy_chk(tls, pParse+uintptr(uint64(uintptr(0)+272)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0)) + libc.X__builtin___memcpy_chk(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -71292,25 +71836,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6770) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6784) == 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+8461, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8475, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12442+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12461+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6282+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12456+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6296+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12475) + ts+12489) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12461+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+6282) + ts+6296) } } } @@ -71331,12 +71875,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8461, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12461+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+6282) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12442+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8475, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+6296) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12456+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12475) + ts+12489) } } } @@ -71365,9 +71909,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12494, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12508, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -71378,21 +71922,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12502 + zMsg = ts + 12516 } else { - zMsg = ts + 12515 + zMsg = ts + 12529 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6974, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6988, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6984, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6998, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -71422,12 +71966,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8461, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6282+7) == 0 { - return ts + 12461 + if Xsqlite3_strnicmp(tls, zName, ts+8475, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6296+7) == 0 { + return ts + 12475 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12475+7) == 0 { - return ts + 12442 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12489+7) == 0 { + return ts + 12456 } } return zName @@ -71532,10 +72076,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+688 { - libc.X__builtin___memcpy_chk(tls, db+688, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{})), libc.X__builtin_object_size(tls, db+688, 0)) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.X__builtin___memcpy_chk(tls, db+696, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{})), libc.X__builtin_object_size(tls, db+696, 0)) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -71691,11 +72235,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -71712,7 +72256,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -71741,7 +72285,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -71785,7 +72329,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+6282) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+6296) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -71811,7 +72355,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6770, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6784, zName) { goto __3 } @@ -71864,13 +72408,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+12529, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12543, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12546, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12560, libc.VaList(bp, pName1)) return -1 } } else { @@ -71908,13 +72452,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8461, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8475, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12566, + Xsqlite3ErrorMsg(tls, pParse, ts+12580, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -72074,9 +72618,9 @@ 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 + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -72092,7 +72636,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12608, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12622, 0) return __4: ; @@ -72120,9 +72664,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10818 + return ts + 10832 } - return ts + 9203 + return ts + 9217 }(), zName) != 0) { goto __8 } @@ -72138,9 +72682,9 @@ __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 + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -72171,12 +72715,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12649, + Xsqlite3ErrorMsg(tls, pParse, ts+12663, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10818 + return ts + 10832 } - return ts + 9203 + return ts + 9217 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -72191,7 +72735,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12670, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12684, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -72226,8 +72770,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -72248,7 +72792,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -72278,7 +72822,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12705, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12719, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -72302,7 +72846,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12736, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -72311,7 +72855,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -72322,7 +72866,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12705 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12719 (*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) @@ -72334,7 +72878,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12705, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12719, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -72368,7 +72912,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+12756, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12770, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -72376,13 +72920,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12779, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12793, 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)).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+12786, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12800, 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)).Fn-- @@ -72419,7 +72963,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+12796, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12810, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -72583,10 +73127,10 @@ 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+12822, + Xsqlite3ErrorMsg(tls, pParse, ts+12836, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12867, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12881, 0) } else { var pDfltExpr uintptr libc.X__builtin___memset_chk(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{})), libc.X__builtin_object_size(tls, bp+8, 0)) @@ -72617,7 +73161,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12908, 0) + ts+12922, 0) } } @@ -72662,7 +73206,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12960, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12974, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -72751,7 +73295,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+13001, 0) + ts+13015, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -72777,7 +73321,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -72846,7 +73390,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+13057, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13071, 0) goto generated_done __2: ; @@ -72859,13 +73403,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13100, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13114, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13108, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13122, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -72898,7 +73442,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+13115, + Xsqlite3ErrorMsg(tls, pParse, ts+13129, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -73019,13 +73563,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1527 - zSep2 = ts + 13146 - zEnd = ts + 5346 + zSep = ts + 1547 + zSep2 = ts + 13160 + zEnd = ts + 5360 } else { - zSep = ts + 13148 - zSep2 = ts + 13152 - zEnd = ts + 13157 + zSep = ts + 13162 + zSep2 = ts + 13166 + zEnd = ts + 13171 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -73033,7 +73577,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+13160, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+13174, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -73067,16 +73611,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3644, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3658, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1527, - ts + 13174, - ts + 13180, - ts + 13185, - ts + 13190, + ts + 1547, + ts + 13188, + ts + 13194, + ts + 13199, + ts + 13204, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -73215,8 +73759,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -73343,7 +73887,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -73367,7 +73911,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -73466,7 +74010,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -73483,10 +74027,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+13196, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) + ts+13210, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+13229, + Xsqlite3ErrorMsg(tls, pParse, ts+13243, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -73505,11 +74049,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+13256, 0) + ts+13270, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+13306, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13320, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -73543,7 +74087,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13338, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13352, 0) return } } @@ -73568,11 +74112,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 9203 - zType2 = ts + 13382 + zType = ts + 9217 + zType2 = ts + 13396 } else { - zType = ts + 10818 - zType2 = ts + 13388 + zType = ts + 10832 + zType2 = ts + 13402 } if pSelect != 0 { @@ -73634,7 +74178,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -73643,11 +74187,11 @@ 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+13393, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13407, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13408, + ts+13422, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -73663,13 +74207,13 @@ 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+13506, + ts+13520, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13548, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13562, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -73684,7 +74228,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9725) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9739) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -73714,7 +74258,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+13582, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13596, 0) goto create_view_fail __1: ; @@ -73730,7 +74274,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10818, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10832, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -73793,10 +74337,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -73814,12 +74355,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13618, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13632, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -73879,6 +74416,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -73938,13 +74482,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13648, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13662, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13663, + ts+13677, 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) } @@ -73985,10 +74529,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13730, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13744, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11627, + ts+11641, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -74020,12 +74564,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13744, + ts+13758, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13789, + ts+13803, 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) @@ -74053,11 +74597,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3265, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7462, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7476, 10) == 0 { return 0 } return 1 @@ -74135,9 +74679,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -74196,21 +74740,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13856, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13870, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13884, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13898, 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+13918, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -74222,7 +74766,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11819, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11833, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -74286,7 +74830,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13950, + ts+13964, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -74298,7 +74842,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto fk_end goto __7 __6: @@ -74383,7 +74927,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+14107, + ts+14121, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -74610,12 +75154,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+14153, + Xsqlite3ErrorMsg(tls, pParse, ts+14167, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 14181 + return ts + 14195 } - return ts + 14187 + return ts + 14201 }())) return 1 } @@ -74736,7 +75280,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14192, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14206, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -74755,7 +75299,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+14198, + ts+14212, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -74781,26 +75325,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+14248, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14262, 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+14276, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14290, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+14301, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14315, 0) goto exit_create_index __17: ; @@ -74814,7 +75358,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14192, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14206, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -74826,10 +75370,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+14335, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14349, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -74841,7 +75385,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+14369, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14383, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -74870,7 +75414,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+14393, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14407, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -74891,9 +75435,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -74932,7 +75476,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14192) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14206) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -75033,7 +75577,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14416, 0) + ts+14430, 0) goto exit_create_index __56: ; @@ -75047,6 +75591,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -75067,6 +75612,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -75248,7 +75794,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14477, libc.VaList(bp+48, 0)) + ts+14491, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -75300,8 +75846,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14519, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14533, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -75347,12 +75893,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14536, + zStmt = Xsqlite3MPrintf(tls, db, ts+14550, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1527 + return ts + 1547 } - return ts + 14556 + return ts + 14570 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -75360,7 +75906,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14564, + ts+14578, 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, @@ -75374,7 +75920,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14623, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14637, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -75535,7 +76081,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14650, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14664, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -75550,7 +76096,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14668, libc.VaList(bp+8, 0)) + ts+14682, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -75561,9 +76107,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -75589,9 +76135,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14741, + ts+14755, 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+11815, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11829, (*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) @@ -75672,6 +76218,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -75679,7 +76226,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -75725,7 +76272,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+14801, + Xsqlite3ErrorMsg(tls, pParse, ts+14815, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -75860,6 +76407,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -75871,11 +76419,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -75902,7 +76452,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -75930,12 +76480,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14837, + Xsqlite3ErrorMsg(tls, pParse, ts+14851, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14873 + return ts + 14887 } - return ts + 14876 + return ts + 14890 }())) goto append_from_error __1: @@ -76104,7 +76654,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14882, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14896, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -76140,9 +76690,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14888 + return ts + 14902 } - return ts + 14897 + return ts + 14911 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -76167,7 +76717,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14882, ts + 14904, ts + 14888} +var az = [3]uintptr{ts + 14896, ts + 14918, ts + 14902} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -76182,7 +76732,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14912, 0) + ts+14926, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -76200,7 +76750,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12388, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12402, 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+14996, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15010, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -76486,7 +77036,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+15005, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15019, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -76582,7 +77132,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+15051, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15065, libc.VaList(bp, zName)) } } } @@ -76682,7 +77232,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -76696,7 +77246,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*40)).FzName = pColl + 3*40 (*CollSeq)(unsafe.Pointer(pColl + 2*40)).Fenc = U8(SQLITE_UTF16BE) libc.X__builtin___memcpy_chk(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint64(nName), libc.X__builtin_object_size(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, 0)) - pDel = Xsqlite3HashInsert(tls, db+640, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -76775,7 +77325,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+15081, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15095, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -76902,7 +77452,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -76936,7 +77486,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -76959,26 +77509,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{})), libc.X__builtin_object_size(tls, bp, 0)) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -77044,10 +77595,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+15126, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -77060,19 +77627,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15112, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15159, 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+15141, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15188, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -77299,17 +77868,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -77322,10 +77893,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -77334,15 +77905,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -77351,98 +77922,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.X__builtin___memset_chk(tls, aToOpen, 1, uint64(nIdx+1), libc.X__builtin_object_size(tls, aToOpen, 0)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 72)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -77450,138 +78021,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15179) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15226) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -77684,7 +78260,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+11675) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11689) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -77914,7 +78490,7 @@ 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 + 6580, ts + 6575, ts + 8334, ts + 8329, ts + 6570} +var azType2 = [5]uintptr{ts + 6594, ts + 6589, ts + 8348, ts + 8343, ts + 6584} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -77973,7 +78549,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+15192, -1) + Xsqlite3_result_error(tls, context, ts+15239, -1) return } iVal = -iVal @@ -78277,7 +78853,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+15209, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+15256, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -78467,7 +79043,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -78580,13 +79156,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -78609,7 +79199,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+15214, -1) + Xsqlite3_result_error(tls, context, ts+15261, -1) return } if argc == 3 { @@ -78619,7 +79209,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+15247, -1) + ts+15294, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -78672,7 +79262,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3644, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3658, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -78712,13 +79302,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+5314, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+5328, 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+15292, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+15339, libc.VaList(bp+8, r1)) } } break @@ -78726,7 +79316,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1307, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1327, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -78755,13 +79345,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+15299, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+15346, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1528, 4) + Xsqlite3_str_append(tls, pStr, ts+1548, 4) break } @@ -79071,7 +79661,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 11247} +var azOne = [1]uintptr{ts + 11261} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -79083,7 +79673,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1527 + zIn = ts + 1547 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -79107,7 +79697,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+15302, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+15349, 4, uintptr(0)) } } @@ -79132,7 +79722,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12427, -1) + Xsqlite3_result_error(tls, context, ts+12441, -1) return } @@ -79210,7 +79800,7 @@ func sumFinalize(tls *libc.TLS, context 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+15192, -1) + Xsqlite3_result_error(tls, context, ts+15239, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -79471,7 +80061,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+15307, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+15354, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -79491,14 +80081,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+15313, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15360, 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+15313, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15360, 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+15313, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15313, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15360, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15360, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -79738,107 +80328,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 15318}, - {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 + 15338}, - {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 + 15351}, - {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 + 15369}, - {FnArg: int8(1), 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_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15427}, - {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 + 15452}, - {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 + 15461}, - {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 + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15479}, - {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 + 15493}, - {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 + 15493}, - {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 + 15499}, - {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 + 15499}, - {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 + 15505}, - {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 + 15505}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15510}, - {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 + 15510}, - {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 + 15514}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15514}, - {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 + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15518}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15525}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15533}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15546}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15553}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15560}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15568}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15573}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15583}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15589}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15595}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15599}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15606}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15613}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15624}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15631}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15646}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15663}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15674}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15680}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15698}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15706}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15720}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15728}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15737}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15737}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15744}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15744}, - {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 + 15754}, - {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 + 15758}, - {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 + 15764}, - {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 + 15768}, - {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 + 15768}, - {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 + 15774}, - {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 + 15774}, - {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 + 15787}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15313}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15313}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6915}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6915}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15792}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15797}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15805}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15817}, - {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 + 15820}, - {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 + 15824}, - {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 + 15830}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15820}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15835}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15839}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15843}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15849}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15853}, + {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 + 15365}, + {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 + 15385}, + {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 + 15398}, + {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 + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15448}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15474}, + {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 + 15499}, + {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 + 15508}, + {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 + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15526}, + {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 + 15540}, + {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 + 15540}, + {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 + 15546}, + {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 + 15546}, + {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 + 15552}, + {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 + 15552}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15557}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15557}, + {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 + 15557}, + {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 + 15561}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15561}, + {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 + 15561}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15565}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15572}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15580}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15593}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15600}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15607}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15615}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15620}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15624}, + {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 + 15630}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15636}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15642}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15646}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15653}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15660}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15671}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15678}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15693}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15710}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15721}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15727}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15745}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15753}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15767}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15775}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15784}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15791}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15791}, + {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 + 15801}, + {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 + 15805}, + {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 + 15811}, + {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 + 15815}, + {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 + 15815}, + {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 + 15821}, + {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 + 15821}, + {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 + 15834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15360}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15360}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6929}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6929}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15839}, + {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 + 15852}, {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(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15868}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15874}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15878}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15864}, + {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 + 15867}, + {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 + 15871}, + {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 + 15877}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15867}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15882}, - {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 + 15891}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15896}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15907}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15913}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15919}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15924}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15932}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15940}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15943}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6915}, - {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 + 15948}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15886}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15890}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15896}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15900}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15905}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15910}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15915}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15921}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15925}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15929}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15933}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15938}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15943}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15948}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15954}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15960}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15966}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15971}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15979}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15987}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15990}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6929}, + {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 + 15995}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -79959,7 +80549,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+15952, + ts+15999, 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) @@ -80619,8 +81209,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6781, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6777, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6795, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6791, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -80699,7 +81289,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5525) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5539) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -80801,7 +81391,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -80909,6 +81499,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -80949,13 +81560,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -80967,21 +81577,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -81052,7 +81652,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -81110,7 +81710,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+8299, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8313, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -81413,6 +82013,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -81576,7 +82178,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15997, + ts+16044, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -81601,7 +82203,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16038, + Xsqlite3ErrorMsg(tls, pParse, ts+16085, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -81750,7 +82352,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+16070, + ts+16117, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -81760,7 +82362,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+16122, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+16169, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -81812,7 +82414,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+16147, + Xsqlite3ErrorMsg(tls, pParse, ts+16194, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -81820,7 +82422,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+16193, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+16240, 0) goto insert_cleanup __57: ; @@ -82002,7 +82604,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -82017,137 +82632,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -82159,64 +82774,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16214) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16261) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -82224,7 +82843,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -82527,7 +83150,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12388, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12402, 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) @@ -83617,13 +84240,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1527 + zSql = ts + 1547 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -84062,6 +84685,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -84100,7 +84724,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12427, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12441, 0) __3: ; return SQLITE_ERROR @@ -84109,7 +84733,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 16228 + zEntry = ts + 16275 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -84124,7 +84748,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+12388, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+12402, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -84160,7 +84784,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16251, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16298, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -84174,7 +84798,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16260, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16307, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -84198,7 +84822,7 @@ __17: goto __18 __18: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16264, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16311, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -84216,7 +84840,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+16270, libc.VaList(bp+16, zEntry, zFile)) + ts+16317, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -84243,7 +84867,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16313, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16360, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -84281,7 +84905,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+16345, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+16392, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -84291,7 +84915,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 16382, + ts + 16429, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -84447,7 +85071,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+16388, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16435, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -84455,63 +85079,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5446, - ts + 16427, - ts + 9203, - ts + 16431, - ts + 16436, - ts + 16439, - ts + 16449, - ts + 16459, - ts + 16465, - ts + 16469, - ts + 16474, - ts + 16479, - ts + 16487, - ts + 16498, - ts + 16501, - ts + 16508, - ts + 16469, - ts + 16474, - ts + 16515, - ts + 16520, - ts + 16523, - ts + 16530, - ts + 16465, - ts + 16469, - ts + 16536, - ts + 16541, - ts + 16546, - ts + 16469, - ts + 16550, + ts + 5460, ts + 16474, - ts + 16558, + ts + 9217, + ts + 16478, + ts + 16483, + ts + 16486, + ts + 16496, + ts + 16506, + ts + 16512, + ts + 16516, + ts + 16521, + ts + 16526, + ts + 16534, + ts + 16545, + ts + 16548, + ts + 16555, + ts + 16516, + ts + 16521, ts + 16562, ts + 16567, - ts + 11819, - ts + 11815, - ts + 16573, - ts + 16578, + ts + 16570, + ts + 16577, + ts + 16512, + ts + 16516, ts + 16583, - ts + 16427, - ts + 16469, ts + 16588, - ts + 16595, - ts + 16602, - ts + 9203, - ts + 16610, - ts + 5449, - ts + 16616, - ts + 16427, - ts + 16469, - ts + 16621, - ts + 16626, - ts + 15820, - ts + 16631, - ts + 16644, - ts + 16653, - ts + 16660, - ts + 16671, + ts + 16593, + ts + 16516, + ts + 16597, + ts + 16521, + ts + 16605, + ts + 16609, + ts + 16614, + ts + 11833, + ts + 11829, + ts + 16620, + ts + 16625, + ts + 16630, + ts + 16474, + ts + 16516, + ts + 16635, + ts + 16642, + ts + 16649, + ts + 9217, + ts + 16657, + ts + 5463, + ts + 16663, + ts + 16474, + ts + 16516, + ts + 16668, + ts + 16673, + ts + 15867, + ts + 16678, + ts + 16691, + ts + 16700, + ts + 16707, + ts + 16718, } // Definitions of all built-in pragmas @@ -84529,241 +85153,241 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [67]PragmaName{ - {FzName: ts + 16679, + {FzName: ts + 16726, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16694, + {FzName: ts + 16741, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16709, + {FzName: ts + 16756, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16721, + {FzName: ts + 16768, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16737, + {FzName: ts + 16784, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16750, + {FzName: ts + 16797, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16762, + {FzName: ts + 16809, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16782, + {FzName: ts + 16829, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16798, + {FzName: ts + 16845, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16819, + {FzName: ts + 16866, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16850, + {FzName: ts + 16897, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16877, + {FzName: ts + 16924, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16910, + {FzName: ts + 16957, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16929, + {FzName: ts + 16976, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16952, + {FzName: ts + 16999, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16961, + {FzName: ts + 17008, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16979, + {FzName: ts + 17026, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16996, + {FzName: ts + 17043, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 17009, + {FzName: ts + 17056, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 17024, + {FzName: ts + 17071, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 17042, + {FzName: ts + 17089, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 17052, + {FzName: ts + 17099, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 17066, + {FzName: ts + 17113, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17082, + {FzName: ts + 17129, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 17107, + {FzName: ts + 17154, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 17126, + {FzName: ts + 17173, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 17137, + {FzName: ts + 17184, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 17148, + {FzName: ts + 17195, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 17160, + {FzName: ts + 17207, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 17176, + {FzName: ts + 17223, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17189, + {FzName: ts + 17236, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17208, + {FzName: ts + 17255, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 17227, + {FzName: ts + 17274, FePragTyp: U8(PragTyp_LOCK_PROXY_FILE), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17243, + {FzName: ts + 17290, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17256, + {FzName: ts + 17303, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17271, + {FzName: ts + 17318, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 17281, + {FzName: ts + 17328, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 17293, + {FzName: ts + 17340, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 17302, + {FzName: ts + 17349, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 17313, + {FzName: ts + 17360, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17323, + {FzName: ts + 17370, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 17335, + {FzName: ts + 17382, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 17346, + {FzName: ts + 17393, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 17358, + {FzName: ts + 17405, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 17375, + {FzName: ts + 17422, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 17394, + {FzName: ts + 17441, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 17420, + {FzName: ts + 17467, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17435, + {FzName: ts + 17482, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17449, + {FzName: ts + 17496, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17468, + {FzName: ts + 17515, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17482, + {FzName: ts + 17529, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17498, + {FzName: ts + 17545, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17510, + {FzName: ts + 17557, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17521, + {FzName: ts + 17568, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17532, + {FzName: ts + 17579, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17544, + {FzName: ts + 17591, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17555, + {FzName: ts + 17602, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17576, + {FzName: ts + 17623, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17584, + {FzName: ts + 17631, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17599, + {FzName: ts + 17646, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17612, + {FzName: ts + 17659, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17631, + {FzName: ts + 17678, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17646, + {FzName: ts + 17693, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -84785,7 +85409,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17662)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17709)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -84797,10 +85421,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17687) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17734) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17697) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17744) { return PAGER_LOCKINGMODE_NORMAL } } @@ -84809,13 +85433,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+8347) { + if 0 == Xsqlite3StrICmp(tls, z, ts+8361) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17704) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17751) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17709) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17756) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -84830,9 +85454,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16621) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16668) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17721) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17768) == 0 { return 2 } else { return 0 @@ -84846,7 +85470,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17728, 0) + ts+17775, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -84937,19 +85561,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17790 + zName = ts + 17837 break case OE_SetDflt: - zName = ts + 17799 + zName = ts + 17846 break case OE_Cascade: - zName = ts + 17811 + zName = ts + 17858 break case OE_Restrict: - zName = ts + 17819 + zName = ts + 17866 break default: - zName = ts + 17828 + zName = ts + 17875 break } return zName @@ -84966,7 +85590,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17838, ts + 17845, ts + 17853, ts + 17857, ts + 17721, ts + 17866, + ts + 17885, ts + 17892, ts + 17900, ts + 17904, ts + 17768, ts + 17913, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -85013,13 +85637,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17870 + zType = ts + 17917 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17872 + zType = ts + 17919 } else { - zType = ts + 7857 + zType = ts + 7871 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17874, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17921, 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), @@ -85027,7 +85651,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17881, ts + 17886, ts + 17894} +var azEnc = [4]uintptr{uintptr(0), ts + 17928, ts + 17933, ts + 17941} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -85052,8 +85676,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(624) - defer tls.Free(624) + bp := tls.Alloc(680) + defer tls.Free(680) var zLeft uintptr var zRight uintptr @@ -85166,13 +85790,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -85192,6 +85825,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -85242,7 +85877,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -85257,7 +85892,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -85267,7 +85902,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17902, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17949, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -85284,30 +85919,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3644, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -85531,7 +86166,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17906) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17953) == 0) { goto __65 } b = 2 @@ -85565,7 +86200,7 @@ __67: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -85574,36 +86209,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __72 __71: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __73 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __75 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __76 __75: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __77 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __77: ; __76: ; goto __74 __73: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __74: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __72: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17697 + zRet = ts + 17744 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -85641,7 +86276,7 @@ __79: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } - zRet = ts + 17687 + zRet = ts + 17734 __84: ; returnSingleText(tls, v, zRet) @@ -85722,21 +86357,21 @@ __96: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __98 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __99 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __99: ; __98: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -85778,15 +86413,15 @@ __101: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __104 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __104: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -85823,14 +86458,14 @@ __26: }()) goto __108 __107: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __109 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __109: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __110 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -85849,17 +86484,17 @@ __27: if !(zRight != 0) { goto __112 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __113 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __113: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __114 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __114: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -85870,7 +86505,7 @@ __115: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __118 } - Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __118: ; goto __116 @@ -85882,12 +86517,12 @@ __117: ; __112: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __119 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __120 __119: if !(rc != SQLITE_NOTFOUND) { @@ -85924,11 +86559,11 @@ __124: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __126 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+512) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+17911, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17958, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __127: @@ -85947,7 +86582,7 @@ __128: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __129 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+16, zRight)) goto __130 __129: Xsqlite3_temp_directory = uintptr(0) @@ -85963,11 +86598,11 @@ __30: goto __131 } pPager2 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) pFile = Xsqlite3PagerFile(tls, pPager2) Xsqlite3OsFileControlHint(tls, pFile, SQLITE_FCNTL_GET_LOCKPROXYFILE, - bp+520) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 520))) + bp+560) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 560))) goto __132 __131: pPager3 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) @@ -85986,7 +86621,7 @@ __134: if !(res1 != SQLITE_OK) { goto __135 } - Xsqlite3ErrorMsg(tls, pParse, ts+17936, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17983, 0) goto pragma_out __135: ; @@ -86005,7 +86640,7 @@ __136: goto __138 } Xsqlite3ErrorMsg(tls, pParse, - ts+17966, 0) + ts+18013, 0) goto __139 __138: if !(iDb != 1) { @@ -86059,7 +86694,7 @@ __145: __147: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+18019) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+18066) == 0) { goto __148 } @@ -86156,13 +86791,13 @@ __161: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 18025 + return ts + 18072 } - return ts + 18033 + return ts + 18080 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1527), + Xsqlite3ColumnType(tls, pCol, ts+1547), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -86227,20 +86862,20 @@ __176: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __177 } - zSql = Xsqlite3MPrintf(tls, db, ts+18040, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+18087, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __178 } - *(*uintptr)(unsafe.Pointer(bp + 528)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+528, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 528))) + *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+568, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 568))) Xsqlite3DbFree(tls, db, zSql) __178: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __179 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __179: ; @@ -86273,29 +86908,29 @@ __183: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __184 } - zType = ts + 10818 + zType = ts + 10832 goto __185 __184: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __186 } - zType = ts + 13100 + zType = ts + 13114 goto __187 __186: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __188 } - zType = ts + 18056 + zType = ts + 18103 goto __189 __188: - zType = ts + 9203 + zType = ts + 9217 __189: ; __187: ; __185: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18063, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18110, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -86361,7 +86996,7 @@ __196: goto __198 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18070, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18117, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -86371,7 +87006,7 @@ __196: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __199 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18075, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18122, 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)))) @@ -86408,12 +87043,12 @@ __202: if !(pIdx1 != 0) { goto __204 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536)) = [3]uintptr{ts + 18080, ts + 18082, ts + 16498} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18084, + *(*[3]uintptr)(unsafe.Pointer(bp + 576)) = [3]uintptr{ts + 18127, ts + 18129, ts + 16545} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18131, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 536 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 576 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __203 __203: @@ -86442,7 +87077,7 @@ __205: goto __206 __208: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18090, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18137, 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))) @@ -86458,13 +87093,13 @@ __207: __38: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __209: if !(p != 0) { goto __211 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18094, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18141, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __210 __210: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -86503,7 +87138,7 @@ __213: goto __214 __214: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __218: if !(j != 0) { goto __220 @@ -86522,13 +87157,13 @@ __220: __40: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __221: if !(j1 != 0) { goto __223 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7857, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7871, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __222 __222: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -86544,7 +87179,7 @@ __224: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __226 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7857, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7871, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __225 __225: i6++ @@ -86579,7 +87214,7 @@ __232: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __234 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18097, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18144, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -86587,7 +87222,7 @@ __232: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+18106)) + ts+18153)) goto __233 __233: j2++ @@ -86660,20 +87295,20 @@ __241: goto __242 __244: ; - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = 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+560, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, uintptr(0)) if !(x1 == 0) { goto __245 } - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) == uintptr(0)) { goto __247 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __248 __247: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 560))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 600))) __248: ; goto __246 @@ -86711,12 +87346,12 @@ __251: goto __253 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 608)) = uintptr(0) if !(pParent != 0) { goto __254 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+560, bp+568) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, bp+608) __254: ; @@ -86733,8 +87368,8 @@ __256: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __258 } - if *(*uintptr)(unsafe.Pointer(bp + 568)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 568)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 608)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 608)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -86747,11 +87382,11 @@ __257: goto __258 __258: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) != 0) { goto __259 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __260 @@ -86776,10 +87411,10 @@ __262: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __263: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18111, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18158, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 608))) goto __252 __252: i8++ @@ -86817,17 +87452,17 @@ __265: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __266 } - if !(Xsqlite3GetInt32(tls, zRight, bp+576) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+616) != 0) { goto __267 } - if !(*(*int32)(unsafe.Pointer(bp + 576)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 616)) <= 0) { goto __269 } - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __269: ; goto __268 @@ -86843,7 +87478,7 @@ __268: ; __266: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 576))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 616))-1, 1) i9 = 0 __270: @@ -86993,7 +87628,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+18115, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+18162, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -87020,178 +87655,307 @@ __299: goto __297 __300: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __301 } + pPk1 = uintptr(0) + r2 = 0 + goto __302 +__301: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__302: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+580, bp+584) + 1, uintptr(0), bp+620, bp+624) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__301: +__303: if !(pIdx5 != 0) { - goto __303 + goto __305 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __302 -__302: + goto __304 +__304: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __301 goto __303 -__303: + goto __305 +__305: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 580)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 620)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__306: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __307 + } + mxCol-- + goto __306 +__307: + ; + if !(mxCol >= 0) { + goto __308 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__308: + ; if !!(isQuick != 0) { - goto __304 + goto __309 } + if !(pPk1 != 0) { + goto __310 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 620)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 580)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__304: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+18186, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__311: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __313 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 620)), j4, r2+j4) + goto __312 +__312: + j4++ + goto __311 + goto __313 +__313: + ; +__310: + ; +__309: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__305: +__314: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __307 + goto __316 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __308 + goto __317 } - goto __306 -__308: + goto __315 +__317: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __309 + if !(bStrict != 0) { + goto __318 } - goto __306 -__309: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __319 +__318: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__319: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __320 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 580)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __310 + goto __315 +__320: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __321 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__310: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) + p11 = -1 + p3 = 3 + goto __322 +__321: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __323 + } + *(*uintptr)(unsafe.Pointer(bp + 632)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+632) + if !(*(*uintptr)(unsafe.Pointer(bp + 632)) != 0) { + goto __324 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) +__324: + ; +__323: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 620)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __325 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __326 +__325: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__326: + ; +__322: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __311 + goto __327 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+18139, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18222, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __312 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __328 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __313 -__312: - integrityCheckResultRow(tls, v) -__313: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__311: + goto __329 +__328: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __314 +__329: + ; +__327: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __330 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+18159, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18242, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__314: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __331 +__330: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __332 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18264, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __333 +__332: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __334 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __335 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) +__335: ; - goto __306 -__306: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+18287, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+18289, + libc.VaList(bp+432, (*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, zErr1, -6) +__334: + ; +__333: + ; +__331: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __315 +__315: j4++ - goto __305 - goto __307 -__307: + goto __314 + goto __316 +__316: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __315 + goto __336 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __316 + goto __337 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 580)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 620)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__317: +__338: if !(k3 > 0) { - goto __319 + goto __340 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __318 -__318: + goto __339 +__339: k3-- - goto __317 - goto __319 -__319: + goto __338 + goto __340 +__340: ; 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+18181, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+18309, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__316: +__337: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__315: +__336: ; if !!(isQuick != 0) { - goto __320 + goto __341 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__321: +__342: if !(pIdx5 != 0) { - goto __323 + goto __344 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __324 + goto __345 } - goto __322 -__324: + goto __343 +__345: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 580)), 0, 0, bp+588, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 620)), 0, 0, bp+640, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 624))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18211) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18339) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+18216) + Xsqlite3VdbeLoadString(tls, v, 4, ts+18344) 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) @@ -87199,87 +87963,93 @@ __324: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __325 + goto __346 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__326: +__347: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __328 + goto __349 } 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 __329 + goto __350 } - goto __327 -__329: + goto __348 +__350: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __327 -__327: + goto __348 +__348: kk++ - goto __326 - goto __328 -__328: + goto __347 + goto __349 +__349: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 584))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 624))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 624))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18237) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18365) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__325: +__346: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 588))) - goto __322 -__322: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 640))) + goto __343 +__343: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __321 - goto __323 -__323: + goto __342 + goto __344 +__344: ; -__320: +__341: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 580)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 620)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __330 + goto __351 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+18264) + Xsqlite3VdbeLoadString(tls, v, 2, ts+18392) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__331: +__352: if !(pIdx5 != 0) { - goto __333 + goto __354 } if !(pPk1 == pIdx5) { - goto __334 + goto __355 } - goto __332 -__334: + goto __353 +__355: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 584))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 624))+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 __332 -__332: + goto __353 +__353: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __331 - goto __333 -__333: + goto __352 + goto __354 +__354: ; -__330: + if !(pPk1 != 0) { + goto __356 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__356: + ; +__351: ; goto __297 __297: @@ -87297,14 +88067,14 @@ __272: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __335 + goto __357 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 616)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18293 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18421 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__335: +__357: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -87312,27 +88082,27 @@ __335: __46: if !!(zRight != 0) { - goto __336 + goto __358 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __338 + goto __360 } goto pragma_out -__338: +__360: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __337 -__336: + goto __359 +__358: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __339 + goto __361 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__340: +__362: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __342 + goto __364 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __343 + goto __365 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -87341,25 +88111,25 @@ __340: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __342 -__343: + goto __364 +__365: ; - goto __341 -__341: + goto __363 +__363: pEnc += 16 - goto __340 - goto __342 -__342: + goto __362 + goto __364 +__364: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __344 + goto __366 } - Xsqlite3ErrorMsg(tls, pParse, ts+18296, libc.VaList(bp+416, zRight)) -__344: + Xsqlite3ErrorMsg(tls, pParse, ts+18424, libc.VaList(bp+456, zRight)) +__366: ; -__339: +__361: ; -__337: +__359: ; goto __15 @@ -87367,50 +88137,57 @@ __47: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __345 + goto __367 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __347 + goto __369 } goto __15 -__347: +__369: ; (*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 __346 -__345: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __370 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__370: + ; + goto __368 +__367: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __348 + goto __371 } goto __15 -__348: +__371: ; (*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) -__346: +__368: ; goto __15 __48: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__349: +__372: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __350 + goto __373 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __349 -__350: + goto __372 +__373: ; Xsqlite3VdbeReusable(tls, v) @@ -87425,31 +88202,31 @@ __49: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __351 + goto __374 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17704) == 0) { - goto __352 + if !(Xsqlite3StrICmp(tls, zRight, ts+17751) == 0) { + goto __375 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __353 -__352: - if !(Xsqlite3StrICmp(tls, zRight, ts+18321) == 0) { - goto __354 + goto __376 +__375: + if !(Xsqlite3StrICmp(tls, zRight, ts+18449) == 0) { + goto __377 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __355 -__354: - if !(Xsqlite3StrICmp(tls, zRight, ts+17857) == 0) { - goto __356 + goto __378 +__377: + if !(Xsqlite3StrICmp(tls, zRight, ts+17904) == 0) { + goto __379 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__356: +__379: ; -__355: +__378: ; -__353: +__376: ; -__351: +__374: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -87459,10 +88236,10 @@ __351: __50: if !(zRight != 0) { - goto __357 + goto __380 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__357: +__380: ; returnSingleInt(tls, v, func() int64 { @@ -87482,19 +88259,19 @@ __51: __52: if !(zRight != 0) { - goto __358 + goto __381 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __360 + goto __383 } goto __15 -__360: +__383: ; - goto __359 -__358: + goto __382 +__381: opMask = U32(0xfffe) -__359: +__382: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -87503,86 +88280,86 @@ __359: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__361: +__384: if !(iDb <= iDbLast) { - goto __363 + goto __386 } if !(iDb == 1) { - goto __364 + goto __387 } - goto __362 -__364: + goto __385 +__387: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__365: +__388: if !(k4 != 0) { - goto __367 + goto __390 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __368 + goto __391 } - goto __366 -__368: + goto __389 +__391: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__369: +__392: if !(pIdx6 != 0) { - goto __371 + goto __394 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __372 + goto __395 } szThreshold = int16(0) - goto __371 -__372: + goto __394 +__395: ; - goto __370 -__370: + goto __393 +__393: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __369 - goto __371 -__371: + goto __392 + goto __394 +__394: ; if !(szThreshold != 0) { - goto __373 + goto __396 } 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)) -__373: +__396: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+18329, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18457, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __374 + goto __397 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __375 -__374: + goto __398 +__397: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__375: +__398: ; - goto __366 -__366: + goto __389 +__389: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __365 - goto __367 -__367: + goto __388 + goto __390 +__390: ; - goto __362 -__362: + goto __385 +__385: iDb++ - goto __361 - goto __363 -__363: + goto __384 + goto __386 +__386: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -87590,60 +88367,60 @@ __363: __53: ; if !(zRight != 0) { - goto __376 + goto __399 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__376: +__399: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __377 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __400 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__377: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__400: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __55: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK) { - goto __378 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK) { + goto __401 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)))) { - goto __379 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)))) { + goto __402 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 600))) -__379: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 656))) +__402: ; -__378: +__401: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __380 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __403 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608))&int64(0x7fffffff))) -__380: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664))&int64(0x7fffffff))) +__403: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __57: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+616) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) >= int64(0)) { - goto __381 + Xsqlite3DecOrHexToI64(tls, zRight, bp+672) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) >= int64(0)) { + goto __404 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) & int64(0x7fffffff)) -__381: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) & int64(0x7fffffff)) +__404: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -87651,10 +88428,10 @@ __381: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __382 + goto __405 } -__382: +__405: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -87687,6 +88464,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -87698,14 +88483,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 18347, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18352, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18358, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18367, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18376, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18384, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18392}, - {FzName: ts + 18399}, + {FzName: ts + 18475, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18480, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18486, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18495, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18504, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18512, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18520}, + {FzName: ts + 18527}, {}, } var setCookie = [2]VdbeOpList{ @@ -87757,7 +88542,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+18405) + Xsqlite3_str_appendall(tls, bp+32, ts+18533) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -87765,7 +88550,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+18420, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18548, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -87778,19 +88563,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18427, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18555, 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+18433) + Xsqlite3_str_appendall(tls, bp+32, ts+18561) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18445) + Xsqlite3_str_appendall(tls, bp+32, ts+18573) j++ } - Xsqlite3_str_append(tls, bp+32, ts+5346, 1) + Xsqlite3_str_append(tls, bp+32, ts+5360, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -87806,7 +88591,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -87954,7 +88739,7 @@ __1: 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+3644, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -87970,13 +88755,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+18460) + Xsqlite3_str_appendall(tls, bp+32, ts+18588) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18468, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18596, 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+18472, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18600, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -87985,7 +88770,7 @@ __3: 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+3644, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -88053,33 +88838,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18476, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18604, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 5397 + zObj = ts + 5411 } - z = Xsqlite3MPrintf(tls, db, ts+18504, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18632, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18535, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18663, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18543, - ts + 18550, - ts + 18562, + ts + 18671, + ts + 18678, + ts + 18690, } // Check to see if any sibling index (another index on the same table) @@ -88139,7 +88924,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+14519) + corruptSchema(tls, pData, argv, ts+14533) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -88171,13 +88956,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+18573) + corruptSchema(tls, pData, argv, ts+18701) } 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+14519) + corruptSchema(tls, pData, argv, ts+14533) } } } @@ -88210,16 +88995,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 9203 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 9217 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 8267 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18586 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 8281 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18714 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -88304,7 +89089,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+12102) + ts+12116) rc = SQLITE_ERROR goto initone_error_out __13: @@ -88339,7 +89124,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+18658) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18786) rc = SQLITE_ERROR goto initone_error_out __17: @@ -88353,7 +89138,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18682, + ts+18810, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -88536,16 +89321,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -88613,20 +89402,20 @@ 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) { - 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)) + libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-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)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0)) (*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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -88638,8 +89427,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0)) - libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0)) + libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0)) + libc.X__builtin___memset_chk(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280), libc.X__builtin_object_size(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -88648,7 +89437,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1463, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1483, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -88659,7 +89448,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -88679,7 +89468,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18716, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18844, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -88695,100 +89484,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18746, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18874, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3644, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3658, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -88801,7 +89594,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -88900,7 +89693,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -89043,7 +89836,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -89218,8 +90011,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 11247 - var zSp2 uintptr = ts + 11247 + var zSp1 uintptr = ts + 11261 + var zSp2 uintptr = ts + 11261 if pB == uintptr(0) { zSp1++ } @@ -89227,13 +90020,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18765, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18893, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18795)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18923)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -89408,7 +90201,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18829, libc.VaList(bp, 0)) + ts+18957, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -89453,7 +90246,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18879, libc.VaList(bp+8, zName)) + ts+19007, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -89464,7 +90257,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18943, + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp+16, zName)) break } @@ -89508,7 +90301,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6915, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6929, Fn: uint32(8)} // 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. @@ -89855,6 +90648,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -90030,7 +90826,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -90092,16 +90888,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18980 + z = ts + 19108 break case TK_INTERSECT: - z = ts + 18990 + z = ts + 19118 break case TK_EXCEPT: - z = ts + 19000 + z = ts + 19128 break default: - z = ts + 19007 + z = ts + 19135 break } return z @@ -90111,7 +90907,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19013, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19141, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -90317,8 +91113,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1092 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16610 + zType = ts + 1112 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16657 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -90457,13 +91253,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16610 + zCol = ts + 16657 } 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+12388, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+12402, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -90471,7 +91267,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+19036, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+19164, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -90561,7 +91357,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16610 + zName = ts + 16657 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -90571,7 +91367,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+19036, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+19164, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -90587,7 +91383,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+19045, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+19173, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -90874,7 +91670,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+19053, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19181, 0) return __1: ; @@ -90965,7 +91761,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19102, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19230, 0) goto end_of_recursive_query __15: ; @@ -90985,7 +91781,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19144, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19272, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -91022,7 +91818,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19150, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19278, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -91056,11 +91852,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+19165, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19293, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1527 + return ts + 1547 } - return ts + 3534 + return ts + 3548 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -91161,8 +91957,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19188, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19203, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19316, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19331, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -91209,7 +92005,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18980, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19108, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -91276,7 +92072,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19222, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19350, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -91338,7 +92134,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19222, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19350, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -91491,10 +92287,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19243, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+19289, + ts+19417, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -91748,8 +92544,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7563) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7563) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7577) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7577) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -91776,13 +92572,13 @@ 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+19371, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19499, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+19382, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19510, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -91794,7 +92590,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+19387, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19515, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -91895,7 +92691,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -91921,6 +92717,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -91937,7 +92734,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -91974,7 +92771,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -91985,6 +92783,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -92009,15 +92808,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1072 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1092 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -92194,9 +92998,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -92265,7 +93076,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -92281,17 +93091,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -92312,7 +93113,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -92324,6 +93124,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -92479,6 +93290,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -92502,8 +93314,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -92679,8 +93491,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -92697,6 +93509,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -92726,6 +93543,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -92759,12 +93577,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15510) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15557) == 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+15514) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15561) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -92830,7 +93648,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+19393, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19521, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -92913,7 +93731,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19411, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19539, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -93042,7 +93860,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+19434, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19562, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -93068,7 +93886,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19454, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19582, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -93084,7 +93902,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19497 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19625 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -93110,7 +93928,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+19520, + Xsqlite3ErrorMsg(tls, pParse, ts+19648, 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 @@ -93121,9 +93939,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 + 19558 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19686 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19592 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19720 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -93150,9 +93968,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -93170,7 +93988,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+19630, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19758, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -93282,7 +94100,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19634, + Xsqlite3ErrorMsg(tls, pParse, ts+19762, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -93301,7 +94119,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+19673, + Xsqlite3ErrorMsg(tls, pParse, ts+19801, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -93309,7 +94127,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19704, + Xsqlite3ErrorMsg(tls, pParse, ts+15126, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -93410,7 +94228,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6775 + zSchemaName = ts + 6789 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -93425,7 +94243,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19737, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19832, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -93490,7 +94308,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19742, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19837, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -93502,7 +94320,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+12388, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+12402, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -93521,9 +94339,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19751, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19846, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19769, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19864, 0) } } } @@ -93533,7 +94351,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+19789, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -93683,13 +94501,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19820, 0) + ts+19915, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19871, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19966, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -93870,19 +94688,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19904, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19999, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19916 + return ts + 20011 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1527 + return ts + 1547 }())) } } @@ -93895,7 +94713,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+8267) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+8281) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -94053,7 +94871,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -94152,7 +94969,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19939, + ts+20034, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -94213,7 +95030,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19993, + Xsqlite3ErrorMsg(tls, pParse, ts+20088, 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 __15: @@ -94317,7 +95134,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1527, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1547, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -94327,7 +95144,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -94359,7 +95176,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20033, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20128, 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), 5, 0x20) @@ -94417,8 +95234,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20048, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20143, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -94452,7 +95272,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -94545,16 +95365,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -94563,13 +95388,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -94581,52 +95406,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -94644,111 +95469,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.X__builtin___memset_chk(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+152, 0)) @@ -94767,33 +95592,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -94801,28 +95626,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -94833,7 +95658,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -94844,7 +95669,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -94870,7 +95695,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -94883,27 +95708,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 20064 + return ts + 20159 } - return ts + 20073 + return ts + 20168 }()) groupBySort = 1 @@ -94911,49 +95736,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -94967,45 +95792,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -95024,16 +95849,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -95064,16 +95889,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -95086,98 +95911,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -95186,79 +96011,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+20064) -__147: + explainTempTable(tls, pParse, ts+20159) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 20082 + return ts + 20177 } - return ts + 20105 + return ts + 20200 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -95333,7 +96158,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -95355,7 +96180,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+20114, 0) + ts+20209, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -95451,7 +96276,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3644, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -95543,7 +96368,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -95588,7 +96413,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+20179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20274, 0) goto trigger_cleanup __3: ; @@ -95632,7 +96457,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20225, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20320, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -95650,7 +96475,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+20233, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20328, 0) goto trigger_orphan_error __11: ; @@ -95662,7 +96487,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20225, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20320, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -95677,7 +96502,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+20274, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20369, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -95689,22 +96514,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8461, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8475, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20300, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20395, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+20338, + Xsqlite3ErrorMsg(tls, pParse, ts+20433, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 20375 + return ts + 20470 } - return ts + 20382 + return ts + 20477 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -95713,7 +96538,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+20388, libc.VaList(bp+24, pTableName+8)) + ts+20483, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -95742,9 +96567,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -95862,7 +96687,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+20225, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+20320, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -95895,7 +96720,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+20434, + ts+20529, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -95920,13 +96745,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20482, + ts+20577, libc.VaList(bp+16, (*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+20557, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20652, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -96182,7 +97007,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20586, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20681, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -96221,9 +97046,9 @@ 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 + 12475 + return ts + 12489 } - return ts + 6282 + return ts + 6296 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -96235,7 +97060,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20606, + ts+20701, 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) @@ -96349,12 +97174,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20668, + ts+20763, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20716 + return ts + 20811 } - return ts + 20723 + return ts + 20818 }())) __15: ; @@ -96468,7 +97293,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20730, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20825, 0) return 1 } @@ -96519,7 +97344,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Select{})), libc.X__builtin_object_size(tls, bp, 0)) libc.X__builtin___memset_chk(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{})), libc.X__builtin_object_size(tls, bp+128, 0)) @@ -96588,7 +97413,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6469, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6483, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -96651,8 +97476,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -96685,26 +97510,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.X__builtin___memset_chk(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+416, 0)) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.X__builtin___memset_chk(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{})), libc.X__builtin_object_size(tls, bp+424, 0)) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20772, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20867, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -96721,7 +97546,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -96914,10 +97739,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -96926,7 +97753,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -97288,7 +98115,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20786, + ts+20881, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -97320,7 +98147,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20822, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20917, 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: @@ -97330,7 +98157,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 8042 + return ts + 8056 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -98200,7 +99027,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20841) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20936) __169: ; update_cleanup: @@ -98506,10 +99333,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+20854, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20949, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20858, libc.VaList(bp+8, bp+216)) + ts+20953, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -98600,7 +99427,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+12529, -1) + ts+12543, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -98632,7 +99459,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20931, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20935, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+21026, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21030, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -98769,23 +99596,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20939) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21034) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20979) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21074) return SQLITE_ERROR __2: ; @@ -98796,7 +99625,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21022) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21117) return SQLITE_ERROR __5: ; @@ -98805,7 +99634,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1527 + zOut = ts + 1547 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -98824,7 +99653,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21040, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+21135, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -98844,20 +99673,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21063) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21158) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14882) + rc = execSql(tls, db, pzErrMsg, ts+14896) if !(rc != SQLITE_OK) { goto __9 } @@ -98902,7 +99733,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+21090, + ts+21185, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -98911,7 +99742,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21198, + ts+21293, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -98922,7 +99753,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+21252, + ts+21347, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -98933,7 +99764,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21403, + ts+21498, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -99055,7 +99886,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -99097,7 +99928,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -99254,7 +100085,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -99278,7 +100109,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+12756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12770, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -99362,11 +100193,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21533, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21628, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21557, + ts+21652, 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, @@ -99376,7 +100207,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21656, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21751, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -99410,7 +100241,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -99437,7 +100268,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+21675, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21770, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -99475,9 +100306,9 @@ 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+21717, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21812, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3644, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3658, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -99487,7 +100318,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 + 21747 + var zFormat uintptr = ts + 21842 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -99499,12 +100330,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1527) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1547) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16501, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16548, 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 @@ -99557,17 +100388,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21793, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21888, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3644, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -99616,10 +100447,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21793, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21888, 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) @@ -99639,8 +100470,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -99653,7 +100484,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -99695,7 +100526,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -100063,7 +100894,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -100106,7 +100937,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -100133,7 +100964,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -100361,31 +101192,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21812 + return ts + 21907 } if i == -1 { - return ts + 16610 + return ts + 16657 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -100394,35 +101207,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21819, 5) + Xsqlite3_str_append(tls, pStr, ts+21914, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21825, 1) + Xsqlite3_str_append(tls, pStr, ts+21920, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13146, 1) + Xsqlite3_str_append(tls, pStr, ts+13160, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+5346, 1) + Xsqlite3_str_append(tls, pStr, ts+5360, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21825, 1) + Xsqlite3_str_append(tls, pStr, ts+21920, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13146, 1) + Xsqlite3_str_append(tls, pStr, ts+13160, 1) } - Xsqlite3_str_append(tls, pStr, ts+5397, 1) + Xsqlite3_str_append(tls, pStr, ts+5411, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+5346, 1) + Xsqlite3_str_append(tls, pStr, ts+5360, 1) } } @@ -100439,29 +101252,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21827, 2) + Xsqlite3_str_append(tls, pStr, ts+21922, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21819, 5) + Xsqlite3_str_append(tls, pStr, ts+21914, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21830 + return ts + 21925 } - return ts + 21835 + return ts + 21930 }(), 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))), j, i, ts+21843) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21938) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21845) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21940) } - Xsqlite3_str_append(tls, pStr, ts+5346, 1) + Xsqlite3_str_append(tls, pStr, ts+5360, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -100502,11 +101315,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21847, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21942, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21853 + return ts + 21948 } - return ts + 21860 + return ts + 21955 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -100516,43 +101329,43 @@ 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 + 11303 + zFmt = ts + 11317 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21865 + zFmt = ts + 21960 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21898 + zFmt = ts + 21993 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21923 + zFmt = ts + 22018 } else { - zFmt = ts + 21941 + zFmt = ts + 22036 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21950, 7) + Xsqlite3_str_append(tls, bp+64, ts+22045, 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 + 16610 - Xsqlite3_str_appendf(tls, bp+64, ts+21958, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16657 + Xsqlite3_str_appendf(tls, bp+64, ts+22053, 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+21989, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+22084, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21999, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+22094, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22004, + Xsqlite3_str_appendf(tls, bp+64, ts+22099, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+22031, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+22126, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -100584,25 +101397,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22042, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+22137, 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+21830, 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+21925, 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+22063, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+22158, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21819, 5) + Xsqlite3_str_append(tls, bp+24, ts+21914, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21830, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21925, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+5346, 1) + Xsqlite3_str_append(tls, bp+24, ts+5360, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -100963,7 +101776,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -101016,104 +101829,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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.X__builtin___memcpy_chk(tls, pNew+16, pExpr, uint64(unsafe.Sizeof(Expr{})), libc.X__builtin_object_size(tls, pNew+16, 0)) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp, 0)) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -101152,7 +101867,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -101172,6 +101887,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -101322,12 +102039,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -101346,13 +102063,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -101365,7 +102082,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -101427,7 +102144,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -101574,6 +102291,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -101916,13 +102635,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -101930,104 +102656,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -102036,92 +102771,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -102131,24 +102860,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -102168,152 +102897,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc = U32(U8(nNotReady + 1)) (*SrcList)(unsafe.Pointer(pOrTab)).FnSrc = int32((*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc) libc.X__builtin___memcpy_chk(tls, pOrTab+8, pTabItem, uint64(unsafe.Sizeof(SrcItem{})), libc.X__builtin_object_size(tls, pOrTab+8, 0)) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.X__builtin___memcpy_chk(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{})), libc.X__builtin_object_size(tls, pOrTab+8+uintptr(k)*104, 0)) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22071, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22166, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22086, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22181, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -102322,121 +103052,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -102445,36 +103175,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -102492,219 +103222,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -102714,24 +103444,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -102742,41 +103472,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -102810,7 +103540,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -102818,13 +103548,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22095, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22190, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -103102,7 +103832,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -103115,7 +103845,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -103139,11 +103869,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -103175,10 +103905,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16459, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15787, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 15313, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 22109, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16506, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15834, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 15360, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 22204, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -103320,7 +104050,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -103337,10 +104067,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -103397,7 +104127,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -103583,6 +104313,7 @@ __3: 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 @@ -103638,7 +104369,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -103675,12 +104406,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+22116, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22211, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22116, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22211, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -103759,7 +104490,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7098 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7112 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -103853,7 +104584,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 22157 + return ts + 22252 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -104047,7 +104778,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -104226,7 +104957,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+22164, + Xsqlite3ErrorMsg(tls, pParse, ts+22259, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -104296,6 +105027,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -104322,10 +105056,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -104345,14 +105079,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -104389,14 +105123,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.X__builtin___memcpy_chk(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2), libc.X__builtin_object_size(tls, aiCur, 0)) + libc.X__builtin___memcpy_chk(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -104839,6 +105573,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -104848,11 +105594,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -104947,7 +105691,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+22200, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+22295, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -105018,7 +105762,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22226 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22321 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -105252,7 +105996,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -105314,11 +106058,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -105386,7 +106128,7 @@ __3: 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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -105508,9 +106250,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3644, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3644, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3658, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -105578,7 +106320,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -105927,9 +106669,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -105953,7 +106698,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + 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)) return SQLITE_NOMEM } @@ -105969,32 +106715,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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.X__builtin___memcpy_chk(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, p+16, uint64(unsafe.Sizeof(Expr{})), libc.X__builtin_object_size(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, 0)) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -106140,7 +106876,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -106383,13 +107119,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -106400,7 +107133,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -106455,31 +107189,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -106682,6 +107418,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, bp, 0)) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -106813,6 +107607,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -106827,6 +107624,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -106857,7 +107657,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -107013,7 +107813,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+22237, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22332, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -107071,7 +107871,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22237, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22332, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -107429,7 +108229,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -107441,7 +108241,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -107456,7 +108256,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -107469,7 +108269,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+22263, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+22358, 0) rc = SQLITE_OK } else { goto __3 @@ -107570,7 +108370,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -107744,7 +108544,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -107796,7 +108596,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -107824,7 +108624,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -107845,7 +108644,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -107867,7 +108665,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -107929,9 +108727,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -107947,7 +108744,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -107967,6 +108766,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -108063,8 +108867,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22298, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+22393, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -108076,7 +108880,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -108091,7 +108895,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -108111,7 +108915,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -108119,7 +108923,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -108129,7 +108933,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -108137,7 +108941,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -108169,7 +108973,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -108226,10 +109030,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -108273,16 +109077,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -108315,7 +109119,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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.X__builtin___memmove_chk(tls, pWInfo+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte), libc.X__builtin_object_size(tls, pWInfo+872+uintptr(i)*104, 0)) + libc.X__builtin___memmove_chk(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte), libc.X__builtin_object_size(tls, pWInfo+856+uintptr(i)*104, 0)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -108327,9 +109131,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -108347,6 +109151,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -108433,7 +109289,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -108490,7 +109346,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22316, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+22411, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -108513,30 +109369,29 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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.X__builtin___memset_chk(tls, pWInfo+73, 0, uint64(uintptr(0)+120)-uint64(uintptr(0)+73), libc.X__builtin_object_size(tls, pWInfo+73, 0)) - libc.X__builtin___memset_chk(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{})), libc.X__builtin_object_size(tls, pWInfo+872, 0)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.X__builtin___memset_chk(tls, pWInfo+65, 0, uint64(uintptr(0)+104)-uint64(uintptr(0)+65), libc.X__builtin_object_size(tls, pWInfo+65, 0)) + libc.X__builtin___memset_chk(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{})), libc.X__builtin_object_size(tls, pWInfo+856, 0)) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -108554,13 +109409,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22344, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22439, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -108571,169 +109426,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -108742,26 +109602,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -108769,37 +109629,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -108807,92 +109667,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -108902,24 +109768,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -108929,96 +109795,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -109026,30 +109892,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -109069,7 +109933,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -109205,11 +110069,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -109248,6 +110109,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -109420,7 +110291,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+22362, -1) + pCtx, ts+22457, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -109553,7 +110424,7 @@ 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+22418, -1) + pCtx, ts+22513, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -109643,17 +110514,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22463)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22474)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22485)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22490)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22503)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22513)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22519)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22530)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22540)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22552)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22557)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22558)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22569)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22580)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22585)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22598)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22608)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22614)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22625)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22635)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22647)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22652)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -109699,7 +110570,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22561, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22656, libc.VaList(bp, zName)) } return p } @@ -109743,12 +110614,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+22580, 0) + ts+22675, 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+22651, 0) + ts+22746, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -109771,7 +110642,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+8267) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+8281) } break } @@ -109939,7 +110810,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -109976,7 +110846,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22714, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22809, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -110092,7 +110962,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7859)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7873)) } pSub = Xsqlite3SelectNew(tls, @@ -110206,7 +111076,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22740, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22835, 0) goto windowAllocErr __2: ; @@ -110271,15 +111141,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22772 + zErr = ts + 22867 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22789 + zErr = ts + 22884 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22805 + zErr = ts + 22900 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22825, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22920, 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 { @@ -110300,7 +111170,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+22858, 0) + ts+22953, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -110438,7 +111308,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -110456,11 +111326,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22905, - ts + 22958, - ts + 22362, - ts + 23009, - ts + 23061, + ts + 23000, + ts + 23053, + ts + 22457, + ts + 23104, + ts + 23156, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -110941,13 +111811,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -111855,19 +112729,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23111, + Xsqlite3ErrorMsg(tls, pParse, ts+23206, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 20105 + return ts + 20200 } - return ts + 23153 + return ts + 23248 }(), 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+23159, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23254, 0) } } @@ -111935,7 +112809,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+23193, + Xsqlite3ErrorMsg(tls, pParse, ts+23288, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -113032,7 +113906,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+23231, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23326, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -114007,21 +114881,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16610, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16657, 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+23253, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23348, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16523, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16570, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+23253, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23348, 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)) @@ -114764,7 +115638,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+23280) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+23375) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -114928,7 +115802,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23289, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+23384, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -115145,9 +116019,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 7093 + return ts + 7107 } - return ts + 7098 + return ts + 7112 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -115426,19 +116300,19 @@ 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+23313, 0) + ts+23408, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+23408, 0) + ts+23503, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23492, 0) + ts+23587, 0) } break case uint32(273): @@ -115817,9 +116691,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23289, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+23384, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23577, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23672, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -116587,7 +117461,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23594, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23689, libc.VaList(bp, bp+2464)) break } } @@ -116608,9 +117482,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3644, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3658, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23619, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23714, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -116623,7 +117497,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -116783,7 +117657,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23630, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23725, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -116796,11 +117670,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20225, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20320, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23637, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23732, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23642, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23737, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -116813,9 +117687,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23652, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23747, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23656, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23751, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -116925,36 +117799,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -117071,7 +117923,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -117342,16 +118194,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -117415,6 +118268,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -117465,6 +118319,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -117613,7 +118468,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -117643,7 +118498,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -117658,7 +118513,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23664, 0) + ts+23759, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -117754,7 +118609,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -117765,8 +118620,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -117776,13 +118631,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -117849,23 +118704,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23732 + var zErr uintptr = ts + 23827 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23746 + zErr = ts + 23841 break } case SQLITE_ROW: { - zErr = ts + 23768 + zErr = ts + 23863 break } case SQLITE_DONE: { - zErr = ts + 23790 + zErr = ts + 23885 break } @@ -117883,35 +118738,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23813, - ts + 23826, + ts + 23908, + ts + 23921, uintptr(0), - ts + 23842, - ts + 23867, - ts + 23881, - ts + 23900, - ts + 1463, - ts + 23925, + ts + 23937, ts + 23962, - ts + 23974, - ts + 23989, - ts + 24022, - ts + 24040, - ts + 24065, - ts + 24094, + ts + 23976, + ts + 23995, + ts + 1483, + ts + 24020, + ts + 24057, + ts + 24069, + ts + 24084, + ts + 24117, + ts + 24135, + ts + 24160, + ts + 24189, uintptr(0), - ts + 6237, - ts + 5723, - ts + 24111, - ts + 24129, - ts + 24147, + ts + 6251, + ts + 5737, + ts + 24206, + ts + 24224, + ts + 24242, uintptr(0), - ts + 24181, + ts + 24276, uintptr(0), - ts + 24202, - ts + 24228, - ts + 24251, - ts + 24272, + ts + 24297, + ts + 24323, + ts + 24346, + ts + 24367, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -118026,7 +118881,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -118071,7 +118926,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+24288, 0) + ts+24383, 0) return SQLITE_BUSY } else { @@ -118188,7 +119043,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+24351, libc.VaList(bp, zName)) + ts+24446, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -118204,6 +119059,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -118213,7 +119071,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -118421,7 +119279,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+24402, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24497, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -118514,7 +119372,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -118584,7 +119442,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -118594,7 +119452,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -118626,20 +119484,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+24423, 0) + ts+24518, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -118763,7 +119621,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+24491, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24586, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -118808,10 +119666,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24497, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24592, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24507, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24602, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -118916,7 +119774,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24535, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24630, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -118927,17 +119785,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24539, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24634, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24539 + zModeType = ts + 24634 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24545, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24640, zOpt, uint64(4)) == 0) { goto __32 } @@ -118945,7 +119803,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3251 + zModeType = ts + 3265 __32: ; if !(aMode != 0) { @@ -118975,7 +119833,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24550, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24645, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -118983,7 +119841,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24570, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24665, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -119023,7 +119881,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24594, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24689, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -119047,15 +119905,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24610, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24617, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24705, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24712, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24625, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24628, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24631, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17721, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24720, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24723, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24726, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17768, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -119170,7 +120028,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -119189,8 +120047,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -119201,10 +120059,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+22157, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+22252, 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+24635, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24730, 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) { @@ -119218,7 +120076,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -119235,7 +120093,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -119269,9 +120127,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6770 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6784 (*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 + 23637 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23732 (*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) @@ -119376,7 +120234,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24641 + zFilename = ts + 24736 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -119479,21 +120337,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24644, + Xsqlite3_log(tls, iErr, ts+24739, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24669) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24764) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24689) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24784) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24696) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24791) } // This is a convenience routine that makes sure that all thread-specific @@ -119604,7 +120462,7 @@ __4: 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 + 1092 + zDataType = ts + 1112 primarykey = 1 __13: ; @@ -119651,14 +120509,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24713, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24808, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3644 + return ts + 3658 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -119728,6 +120586,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -120304,7 +121165,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24741, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24836, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -120337,7 +121198,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -120348,7 +121209,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -120422,7 +121283,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 + 24749 + return ts + 24844 } return uintptr(0) }(), 0) @@ -120517,7 +121378,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -120600,7 +121461,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6570, ts + 7093, ts + 7098, ts + 6580, ts + 6575, ts + 8334, ts + 24772, ts + 24778, + ts + 6584, ts + 7107, ts + 7112, ts + 6594, ts + 6589, ts + 8348, ts + 24867, ts + 24873, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -120753,7 +121614,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 + 24785 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24880 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -120779,7 +121640,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6570, uint32(4)) + jsonAppendRaw(tls, p, ts+6584, uint32(4)) break } @@ -120808,7 +121669,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24802, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24897, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -120866,19 +121727,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6570, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6584, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+7093, uint32(4)) + jsonAppendRaw(tls, pOut, ts+7107, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+7098, uint32(5)) + jsonAppendRaw(tls, pOut, ts+7112, uint32(5)) break } @@ -121423,17 +122284,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6570, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6584, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+7093, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+7107, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+7098, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+7112, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -121534,7 +122395,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+24831, -1) + Xsqlite3_result_error(tls, pCtx, ts+24926, -1) } } jsonParseReset(tls, pParse) @@ -121840,7 +122701,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+24846, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24941, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -121855,7 +122716,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24850, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24945, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -121909,7 +122770,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24876, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -122014,11 +122875,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24919, uint32(2)) + jsonAppendRaw(tls, bp, ts+25014, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+5387, uint32(2)) + jsonAppendRaw(tls, bp, ts+5401, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24922, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+25017, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -122059,7 +122920,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6570, uint32(4)) + jsonAppendRaw(tls, bp, ts+6584, uint32(4)) } } if i == argc { @@ -122175,14 +123036,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24925, -1) + ts+25020, -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+24976, -1) + Xsqlite3_result_error(tls, ctx, ts+25071, -1) jsonReset(tls, bp) return } @@ -122277,7 +123138,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15720) + jsonWrongNumArgs(tls, ctx, ts+15767) return __2: ; @@ -122352,9 +123213,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 25010 + return ts + 25105 } - return ts + 25014 + return ts + 25109 }()) return __2: @@ -122487,7 +123348,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25021, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25116, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -122584,7 +123445,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25024, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25119, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -122628,7 +123489,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25027) + ts+25122) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -122759,7 +123620,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+25110, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+25205, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -122778,7 +123639,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+25116, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+25211, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -122874,7 +123735,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+25116, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+25211, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -122898,7 +123759,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 + 25121 + zRoot = ts + 25216 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -123014,7 +123875,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+24831, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24926, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -123109,25 +123970,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 25123}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25128}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25139}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25139}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 25170}, - {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 + 25173}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25177}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25189}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25201}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25212}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25218}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25223}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25235}, - {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 + 25248}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25257}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25257}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25267}, - {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 + 25278}, - {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 + 25295}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25234}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25234}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25252}, + {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 + 25265}, + {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 + 25268}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25272}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25284}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25296}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25307}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25318}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25330}, + {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 + 25343}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25352}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25352}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25362}, + {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 + 25373}, + {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 + 25390}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -123146,8 +124007,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 25313, FpModule: 0}, - {FzName: ts + 25323, FpModule: 0}, + {FzName: ts + 25408, FpModule: 0}, + {FzName: ts + 25418, FpModule: 0}, } type Rtree1 = struct { @@ -123407,11 +124268,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+25333, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+25428, 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+25341, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25436, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -123622,7 +124483,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+25346, + ts+25441, 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)) @@ -124325,7 +125186,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25428) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25523) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -124537,7 +125398,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3644, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -125666,7 +126527,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+25442, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25537, 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 { @@ -125678,12 +126539,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25462, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25557, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25494, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25589, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -125724,7 +126585,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{})), libc.X__builtin_object_size(tls, bp, 0)) if !(nData > 1) { goto __2 @@ -125909,7 +126770,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25531, 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+25626, 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)) @@ -125932,14 +126793,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25676 + var zFmt uintptr = ts + 25771 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11675, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11689, 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 { @@ -125980,7 +126841,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25732, ts + 5449, ts + 16610, + ts + 25827, ts + 5463, ts + 16657, } var rtreeModule = Sqlite3_module{ @@ -126023,19 +126884,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+25737, + ts+25832, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25799, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25894, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25804, + ts+25899, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25868, + ts+25963, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25938, + ts+26033, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -126064,7 +126925,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25987 + zFormat = ts + 26082 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -126076,7 +126937,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+26095, + ts+26190, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -126084,18 +126945,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+26140, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+26235, 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+13146, 1) + Xsqlite3_str_append(tls, p, ts+13160, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+26167, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+26262, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+26189, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+26284, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+26197, 0) + Xsqlite3_str_appendf(tls, p, ts+26292, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -126110,14 +126971,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 26213, - ts + 26266, - ts + 26311, - ts + 26363, - ts + 26417, - ts + 26462, - ts + 26520, - ts + 26575, + ts + 26308, + ts + 26361, + ts + 26406, + ts + 26458, + ts + 26512, + ts + 26557, + ts + 26615, + ts + 26670, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -126146,7 +127007,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26622, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26717, 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 @@ -126154,19 +127015,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26642, + ts+26737, 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+3644, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, 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+26699, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26794, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -126208,16 +127069,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26734, - ts + 26777, - ts + 26812, - ts + 26848, + ts + 26829, + ts + 26872, + ts + 26907, + ts + 26943, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -126242,7 +127103,7 @@ __2: libc.X__builtin___memcpy_chk(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName), libc.X__builtin_object_size(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, 0)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26885, + Xsqlite3_str_appendf(tls, pSql, ts+26980, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -126254,7 +127115,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26909, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+27004, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -126277,7 +127138,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26915, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27010, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -126288,14 +127149,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, 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+3644, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -126338,7 +127199,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -126355,7 +127216,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -126373,7 +127234,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26918, ts + 26929} +var azFormat = [2]uintptr{ts + 27013, ts + 27024} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -126411,13 +127272,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+11247, 1) + Xsqlite3_str_append(tls, pOut, ts+11261, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26939, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+27034, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26945, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+27040, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26949, 1) + Xsqlite3_str_append(tls, pOut, ts+27044, 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}))) @@ -126428,7 +127289,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26951, -1) + Xsqlite3_result_error(tls, ctx, ts+27046, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -126506,12 +127367,12 @@ 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+26984, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+27079, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4451 + return ts + 4465 } - return ts + 1527 + return ts + 1547 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -126530,7 +127391,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+26991, + ts+27086, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -126549,7 +127410,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+27036, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+27131, libc.VaList(bp+16, iNode)) } } @@ -126563,8 +127424,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 27068, - ts + 27122, + ts + 27163, + ts + 27217, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -126579,23 +127440,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+27170, + rtreeCheckAppendMsg(tls, pCheck, ts+27265, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 27215 + return ts + 27310 } - return ts + 27223 + return ts + 27318 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+27232, + ts+27327, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 27215 + return ts + 27310 } - return ts + 27223 + return ts + 27318 }(), iKey, iVal)) } } @@ -126619,7 +127480,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+27290, libc.VaList(bp, i, iCell, iNode)) + ts+27385, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -126639,7 +127500,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+27338, libc.VaList(bp+24, i, iCell, iNode)) + ts+27433, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -126656,14 +127517,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+27405, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27500, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+27439, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27534, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -126671,7 +127532,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+27469, + ts+27564, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -126700,14 +127561,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27524, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27619, 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+27555, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27650, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -126729,12 +127590,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14882, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14896, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27622, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27717, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -126743,12 +127604,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+25442, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25537, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27650, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27745, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -126762,8 +127623,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+27681, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27688, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27776, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27783, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -126771,7 +127632,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27696, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27791, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -126786,7 +127647,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27700, -1) + ts+27795, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -126794,7 +127655,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6770 + zDb = ts + 6784 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -126804,7 +127665,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 18293 + return ts + 18421 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -127173,11 +128034,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+27751, 1) + Xsqlite3_str_append(tls, x, ts+27846, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27753, 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+27848, 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+27764, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27859, 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) } @@ -127197,19 +128058,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+27775, 0) + Xsqlite3_str_appendf(tls, x, ts+27870, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27793, 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+27888, 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+27801, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27896, 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+27809, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27904, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27813, 0) + Xsqlite3_str_appendf(tls, x, ts+27908, 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) } @@ -128115,7 +128976,7 @@ __1: libc.X__builtin___memcpy_chk(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName), libc.X__builtin_object_size(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, 0)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27826, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27921, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -128124,7 +128985,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27848, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27943, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -128132,7 +128993,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26915, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27010, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -128143,7 +129004,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -128168,7 +129029,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -128357,7 +129218,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16610 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16657 (*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 @@ -128367,7 +129228,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27852 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27947 (*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 @@ -128375,7 +129236,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27858 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27953 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -128487,7 +129348,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27867, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27962, 0) __4: ; goto geopoly_update_end @@ -128617,14 +129478,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27907) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28002) == 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+27923) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28018) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -128689,7 +129550,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27938, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28033, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -128701,25 +129562,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27946}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27959}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27972}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27985}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27923}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27997}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27907}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 28020}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28034}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28047}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28061}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28077}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28041}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28054}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28067}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 28080}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28018}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 28092}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28002}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 28115}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28129}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28142}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28156}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28172}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 28089}, + {FxStep: 0, FxFinal: 0, FzName: ts + 28184}, } // Register the r-tree module with database handle db. This creates the @@ -128729,26 +129590,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+28108, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28203, 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+28118, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28213, 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+28129, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28224, -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+27852, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27947, 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+28140, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28235, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -128802,7 +129663,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25428, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25523, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -128869,6 +129730,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -129127,7 +129990,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+28150, -1) + Xsqlite3_result_error(tls, context, ts+28245, -1) return } @@ -129138,7 +130001,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+28150, -1) + Xsqlite3_result_error(tls, context, ts+28245, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -129151,7 +130014,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -129163,7 +130026,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -129239,7 +130102,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+28171, uintptr(0), uintptr(0), p+64) + ts+28266, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -129303,7 +130166,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+25341, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25436, 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++ { } @@ -129324,16 +130187,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+28342, libc.VaList(bp, func() uintptr { + ts+28437, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28492 + return ts + 28587 } - return ts + 1527 + return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28533) + ts+28628) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -129431,7 +130294,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -129449,7 +130312,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+28658, libc.VaList(bp, zTab))) + ts+28753, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -129467,7 +130330,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+28777, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28872, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -129485,7 +130348,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28798, libc.VaList(bp+16, zIdx))) + ts+28893, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -129508,7 +130371,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28849, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28944, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -129554,7 +130417,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28870, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28965, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -129569,7 +130432,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28898, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28993, 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)), 1) if iCid >= 0 { @@ -129609,7 +130472,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+19751, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19846, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -129619,18 +130482,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28927, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+29022, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28946, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+29041, 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+28951, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+29046, zName) { bRbuRowid = 1 } } @@ -129642,18 +130505,18 @@ 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+28961, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+29056, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28990 + return ts + 29085 } - return ts + 29003 + return ts + 29098 }())) } 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+29012, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29107, 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)), 1) @@ -129667,7 +130530,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+29034, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29129, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -129710,12 +130573,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29061, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14993 + zList = rbuMPrintf(tls, p, ts+29156, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 15007 } return zList } @@ -129726,13 +130589,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29070, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+29165, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -129754,25 +130617,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+29083, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+29178, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+29115, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+29210, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14993, ts+29138) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29144, ts+29151, ts+5346) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14993, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+15007, ts+29233) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29239, ts+29246, ts+5360) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+15007, ts+1547) 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+29159, + ts+29254, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+29201, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+29296, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -129809,12 +130672,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28993, 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 @@ -129849,7 +130712,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 29221 + zCol = ts + 29316 __7: ; goto __5 @@ -129857,13 +130720,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+29229, + zLhs = rbuMPrintf(tls, p, ts+29324, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+29250, + zOrder = rbuMPrintf(tls, p, ts+29345, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+29286, + zSelect = rbuMPrintf(tls, p, ts+29381, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14993 + zSep = ts + 15007 iCol++ goto __1 __2: @@ -129881,12 +130744,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+29313, + Xsqlite3_mprintf(tls, ts+29408, 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 + 1527 + zSep = ts + 1547 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -129908,8 +130771,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+29361, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14993 + zVector = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 15007 goto __15 __15: iCol++ @@ -129920,7 +130783,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -129947,13 +130810,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1527 - var zAnd uintptr = ts + 1527 + var zCom uintptr = ts + 1547 + var zAnd uintptr = ts + 1547 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28993, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -129965,9 +130828,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+29380, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29475, 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 + zType = ts + 1547 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -129977,37 +130840,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 + 29221 + zCol = ts + 29316 } else { - zCol = ts + 28951 + zCol = ts + 29046 } - zType = ts + 1092 + zType = ts + 1112 } 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+29402, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29497, 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 + 29138 + return ts + 29233 } - return ts + 1527 + return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+29422, + zImpPK = Xsqlite3_mprintf(tls, ts+29517, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+29443, + zImpCols = Xsqlite3_mprintf(tls, ts+29538, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29476, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29571, 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 + 14993 - zAnd = ts + 21819 + zCom = ts + 15007 + zAnd = ts + 21914 nBind++ } @@ -130041,16 +130904,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1527 + var zS uintptr = ts + 1547 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+29500, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29595, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29512, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29607, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14993 + zS = ts + 15007 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -130058,7 +130921,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29521, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29616, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -130070,27 +130933,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29631, 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 zSep uintptr = ts + 1547 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+29550, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21819 + zList = rbuMPrintf(tls, p, ts+29645, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21914 } } zList = rbuMPrintf(tls, p, - ts+29562, libc.VaList(bp+40, zList)) + ts+29657, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29612, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21819 + zList = rbuMPrintf(tls, p, ts+29707, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21914 } } } @@ -130099,7 +130962,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29625, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29720, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -130113,21 +130976,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29612, + zList = rbuMPrintf(tls, p, ts+29707, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14993 + zSep = ts + 15007 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29651, + zList = rbuMPrintf(tls, p, ts+29746, 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 + 14993 + zSep = ts + 15007 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29681, + zList = rbuMPrintf(tls, p, ts+29776, 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 + 14993 + zSep = ts + 15007 } } } @@ -130162,19 +131025,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29718 + var zSep uintptr = ts + 29813 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28870, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28965, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16498) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16545) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28993, libc.VaList(bp+8, zIdx))) } break } @@ -130186,15 +131049,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 29138 + zDesc = ts + 29233 } else { - zDesc = ts + 1527 + zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29731, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14993 + z = rbuMPrintf(tls, p, ts+29826, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 15007 } } - z = rbuMPrintf(tls, p, ts+29742, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29837, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -130209,12 +131072,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1527 + var zComma uintptr = ts + 1547 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29746) + ts+29841) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -130223,7 +131086,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28898, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28993, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -130233,25 +131096,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29796, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29891, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29818, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29913, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 29138 + return ts + 29233 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14993 + zComma = ts + 15007 } } - zCols = rbuMPrintf(tls, p, ts+29828, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29923, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29843, + ts+29938, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 0)) } } @@ -130261,50 +131124,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1527 + var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1527 + var zPk uintptr = ts + 1547 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, (*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 { - zPk = ts + 29905 + zPk = ts + 30000 } - zSql = rbuMPrintf(tls, p, ts+29918, + zSql = rbuMPrintf(tls, p, ts+30013, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29945 + return ts + 30040 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14993 + zComma = ts + 15007 } 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+29955, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+30050, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29962, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30057, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29994 + return ts + 30089 } - return ts + 1527 + return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 0)) } } @@ -130317,7 +131180,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+30009, + ts+30104, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -130354,7 +131217,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30066) + ts+30161) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -130459,7 +131322,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+30132, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+30227, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -130479,24 +131342,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30152, + ts+30247, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+30217, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+30312, libc.VaList(bp+128, zTbl, zBind))) } 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+30253, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+30348, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -130512,7 +131375,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+30287, + ts+30382, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -130520,31 +131383,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 30348 + return ts + 30443 } - return ts + 30352 + return ts + 30447 }() } - return ts + 1527 + return ts + 1547 }(), 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+30358, + ts+30453, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+30419, + ts+30514, 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 + 30348 + return ts + 30443 } - return ts + 30352 + return ts + 30447 }(), zCollist, zLimit)) } @@ -130569,8 +131432,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6781) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6777) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6795) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6791) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -130579,52 +131442,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1527 + return ts + 1547 } - return ts + 30578 + return ts + 30673 }() 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+30587, + ts+30682, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30623 + return ts + 30718 } - return ts + 1527 + return ts + 1547 }(), zBindings))) } 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+30633, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30728, 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 + var zRbuRowid uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30661 + zRbuRowid = ts + 30756 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30673, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30768, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30749 + return ts + 30844 } - return ts + 1527 + return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30766, + ts+30861, 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+31065, + ts+31160, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -130632,14 +131495,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1527 + var zRbuRowid uintptr = ts + 1547 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 31164 + zRbuRowid = ts + 31259 } else { - zRbuRowid = ts + 31174 + zRbuRowid = ts + 31269 } } @@ -130652,35 +131515,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+29221, 0) + zOrder = rbuMPrintf(tls, p, ts+29316, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14993, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+15007, ts+1547) } } 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+31185, + ts+31280, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 31233 + return ts + 31328 } - return ts + 1527 + return ts + 1547 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zOrder != 0 { - return ts + 20105 + return ts + 20200 } - return ts + 1527 + return ts + 1547 }(), zOrder, zLimit))) } @@ -130743,12 +131606,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1527 + var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30578 + zPrefix = ts + 30673 } - zUpdate = Xsqlite3_mprintf(tls, ts+31239, + zUpdate = Xsqlite3_mprintf(tls, ts+31334, 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) @@ -130775,7 +131638,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -130807,7 +131670,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+31364, 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)), 0) { case RBU_STATE_STAGE: @@ -130877,28 +131740,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6770, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784, 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+6770) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31299, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31394, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31326, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.X__builtin___memcpy_chk(tls, p+48, ts+3265, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31422, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.X__builtin___memcpy_chk(tls, p+48, ts+3279, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } else { - libc.X__builtin___memcpy_chk(tls, p+48, ts+6770, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) + libc.X__builtin___memcpy_chk(tls, p+48, ts+6784, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31344, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31440, 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+6770, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -130931,11 +131794,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+31410, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31506, 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+24491, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24586, (*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)))) == '?' { @@ -130947,16 +131810,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+31442, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6770), + zTarget = Xsqlite3_mprintf(tls, ts+31538, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } - return ts + 31474 + return ts + 31570 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } return zExtra }())) @@ -130972,37 +131835,37 @@ 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+31476, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31572, -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+31491, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31587, 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+31508, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31604, -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+6770, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31524, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31620, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784, 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+31552, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31648, 0) } } @@ -131031,14 +131894,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31524, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31620, uintptr(0), uintptr(0), uintptr(0)) } } 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+31570, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31666, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -131147,7 +132010,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6770, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6784, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -131164,23 +132027,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31605, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31701, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6770) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6784) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6770) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6784) } - zOal = Xsqlite3_mprintf(tls, ts+31630, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31637, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31726, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31733, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -131201,12 +132064,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -131300,7 +132160,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+24129, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+24224, 0) return } @@ -131393,7 +132253,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31644) + ts+31740) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -131401,7 +132261,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31666, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31762, libc.VaList(bp, iCookie+1)) } } } @@ -131422,7 +132282,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31693, + ts+31789, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -131452,9 +132312,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31851, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31947, 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+31866, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31962, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -131468,10 +132328,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31886, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31982, 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+31911) + ts+32007) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -131485,12 +132345,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32019) + ts+32115) } 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+32084) + ts+32180) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -131502,7 +132362,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32128, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32224, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -131522,15 +132382,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17599) - rbuCopyPragma(tls, p, ts+16694) + rbuCopyPragma(tls, p, ts+17646) + rbuCopyPragma(tls, p, ts+16741) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+32153, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+32249, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -131554,10 +132414,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14911, 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14911, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -131652,7 +132512,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32181, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32277, 0) } if rc == SQLITE_OK { @@ -131668,7 +132528,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31630, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31726, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -131684,7 +132544,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32206, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32302, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -131718,7 +132578,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+32217, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+32313, 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)), -1) } else { @@ -131748,13 +132608,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32289, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32385, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32303) + ts+32399) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -131765,7 +132625,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+32360) + ts+32456) 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)), 0) @@ -131795,10 +132655,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{})), libc.X__builtin_object_size(tls, p, 0)) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -131809,7 +132670,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.X__builtin___memcpy_chk(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+uint64(1), libc.X__builtin_object_size(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, 0)) pCsr += uintptr(nRbu + uint64(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3644, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3658, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -131838,7 +132699,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+32434, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32530, 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 @@ -131856,12 +132717,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32466, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32562, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32498 + return ts + 32594 } - return ts + 32505 + return ts + 32601 }())) } } @@ -131869,7 +132730,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+14882, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14896, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -131880,19 +132741,19 @@ 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+17313) - rbuCopyPragma(tls, p, ts+16709) + rbuCopyPragma(tls, p, ts+17360) + rbuCopyPragma(tls, p, ts+16756) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32512, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32608, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6770, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6784, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32528, uintptr(0), uintptr(0), p+64) + db, ts+32624, uintptr(0), uintptr(0), p+64) } } @@ -131946,7 +132807,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32552, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32648, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -131973,7 +132834,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30578, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30673, 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++ @@ -131990,7 +132851,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14911, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -132003,13 +132864,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14897, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14911, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32560, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32656, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -132104,7 +132965,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14897, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14911, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132121,19 +132982,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14897, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14911, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14882 + zBegin = ts + 14896 } else { - zBegin = ts + 32512 + zBegin = ts + 32608 } 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+32512, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32608, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132141,6 +133002,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -132159,7 +133042,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -132454,7 +133337,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32587, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32683, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -132479,7 +133362,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+32610, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32706, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -132524,7 +133407,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -135335,7 +136218,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -135377,7 +136260,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -135438,7 +136321,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -135512,13 +136395,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -135580,7 +136463,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -135592,6 +136475,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -135944,7 +136836,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -136112,45 +137004,45 @@ 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+11675) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11689) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(SessionBuffer{})), libc.X__builtin_object_size(tls, bp, 0)) (*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+33197, bp+16) + sessionAppendStr(tls, bp, ts+33293, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+33210, bp+16) + sessionAppendStr(tls, bp, ts+33306, bp+16) 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+33216, bp+16) + sessionAppendStr(tls, bp, ts+33312, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14993 + zSep = ts + 15007 } } - zSep = ts + 1527 - sessionAppendStr(tls, bp, ts+33145, bp+16) + zSep = ts + 1547 + sessionAppendStr(tls, bp, ts+33241, 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+33221, bp+16) + ts+33317, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33153, bp+16) + sessionAppendStr(tls, bp, ts+33249, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21819 + zSep = ts + 21914 } } @@ -136197,42 +137089,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+33296, bp+16) + sessionAppendStr(tls, bp, ts+33392, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+33145, bp+16) + sessionAppendStr(tls, bp, ts+33241, 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+33216, bp+16) + sessionAppendStr(tls, bp, ts+33312, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21819 + zSep = ts + 21914 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+33314, bp+16) + sessionAppendStr(tls, bp, ts+33410, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32857, bp+16) + sessionAppendStr(tls, bp, ts+32953, bp+16) - zSep = ts + 1527 + zSep = ts + 1547 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+33153, bp+16) + sessionAppendStr(tls, bp, ts+33249, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 33322 + zSep = ts + 33418 } } - sessionAppendStr(tls, bp, ts+5346, bp+16) + sessionAppendStr(tls, bp, ts+5360, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -136245,7 +137137,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6770, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6784, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -136256,21 +137148,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+33327, bp+16) + sessionAppendStr(tls, bp, ts+33423, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21825, bp+16) + sessionAppendStr(tls, bp, ts+21920, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14993, bp+16) + sessionAppendStr(tls, bp, ts+15007, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+33345, bp+16) + sessionAppendStr(tls, bp, ts+33441, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+33356, bp+16) + sessionAppendStr(tls, bp, ts+33452, bp+16) } - sessionAppendStr(tls, bp, ts+5346, bp+16) + sessionAppendStr(tls, bp, ts+5360, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -136284,14 +137176,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11675, p) + var rc int32 = sessionSelectRow(tls, db, ts+11689, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+33360) + ts+33456) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33473) + ts+33569) } return rc } @@ -136319,7 +137211,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -136572,7 +137464,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33617, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33713, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -136588,7 +137480,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+33638, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33734, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -136661,10 +137553,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33657, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33753, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33683, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33779, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -136697,7 +137589,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3644, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -136710,7 +137602,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6770, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6784, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -136723,19 +137615,19 @@ 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+33713, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33809, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33757, + ts+33853, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33828, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33924, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11675) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11689) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -136786,14 +137678,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33888, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33984, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33918, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34014, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33942, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33918, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34038, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34014, uintptr(0), uintptr(0), uintptr(0)) } } @@ -137307,7 +138199,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.X__builtin___memcpy_chk(tls, pOut, a1, uint64(n1), libc.X__builtin_object_size(tls, pOut, 0)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.X__builtin___memcpy_chk(tls, pOut, a2, uint64(n2), libc.X__builtin_object_size(tls, pOut, 0)) pOut += uintptr(n2) @@ -138041,7 +138933,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33970, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34066, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -138329,7 +139221,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33998, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+34094, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -138516,7 +139408,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+34029, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34125, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -138584,7 +139476,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34036 + var zErr uintptr = ts + 34132 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -138743,7 +139635,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1527 + return ts + 1547 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -138766,7 +139658,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 34086 + var zErr uintptr = ts + 34182 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -139090,13 +139982,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 34134, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34230, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 34142, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34238, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 34152, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34248, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -139507,7 +140399,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6570, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6584, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -139647,7 +140539,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+34157, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34253, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -139674,14 +140566,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+34164, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34260, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+34195, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+34291, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -139692,7 +140584,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34228, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34324, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -139705,7 +140597,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34265, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34361, 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))) @@ -139714,7 +140606,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+34274, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34370, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -139733,7 +140625,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34307, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34403, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -139748,14 +140640,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34341, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34437, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34349, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34445, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+34381, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34477, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -139763,9 +140655,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34387, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34483, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34401, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34497, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -139773,9 +140665,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34439, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34535, 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+34450, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34546, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -139783,21 +140675,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5464, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5478, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 8347, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17704}, - {FzName: ts + 34485, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 8361, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17751}, + {FzName: ts + 34581, 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+34493, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34589, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34524, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34620, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -139844,15 +140736,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22485) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16610) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34552, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22580) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16657) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34648, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34582) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34678) { *(*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+34592, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34688, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -139869,13 +140761,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34623, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34719, 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+34628, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34724, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34635, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34731, libc.VaList(bp+16, i)) } } } @@ -139913,8 +140805,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+22485) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34643, 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+22580) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34739, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -139946,7 +140838,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+34672, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34768, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -139955,13 +140847,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1527 + return ts + 1547 }(), pzErr) } else { @@ -139983,19 +140875,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 + 34341 + zTail = ts + 34437 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34692 + zTail = ts + 34788 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34700, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34796, 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+16610, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16657, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -140039,18 +140931,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34711, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34807, 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 + 1547 } - return ts + 14993 + return ts + 15007 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34727, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34823, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34734, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22485)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34830, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22580)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -140160,7 +141052,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34760) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34856) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -140170,7 +141062,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+34765) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34861) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -140180,7 +141072,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+34774) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34870) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -140193,7 +141085,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+34784) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34880) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -140203,7 +141095,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+34794) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34890) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -140219,7 +141111,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+22485) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22580) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -140242,7 +141134,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34806 + var zSelect uintptr = ts + 34902 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -140264,7 +141156,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34838) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34934) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -140278,7 +141170,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34846, + ts+34942, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -140376,7 +141268,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34911, 0) + sqlite3Fts5ParseError(tls, pParse, ts+35007, 0) return FTS5_EOF } } @@ -140389,20 +141281,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+34931, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+35027, 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+34962, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35058, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34965, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35061, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30348, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30443, uint64(3)) == 0 { tok = FTS5_AND } break @@ -142169,9 +143061,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34969, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35065, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33998, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+34094, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -142187,7 +143079,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+34974, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+35070, 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') @@ -142274,7 +143166,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20822, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20917, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -142355,7 +143247,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+35003, 0) + ts+35099, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -142525,12 +143417,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+35056, + ts+35152, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 35106 + return ts + 35202 } - return ts + 34969 + return ts + 35065 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -143473,7 +144365,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+35113, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+35209, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -143552,7 +144444,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+35119, + ts+35215, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -143577,7 +144469,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+35170, + ts+35266, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -143600,7 +144492,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+35219, + ts+35315, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -143839,7 +144731,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+35259, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+35355, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -143912,13 +144804,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -145038,7 +145930,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+35282, + ts+35378, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -146231,7 +147123,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1527 + return ts + 1547 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -146397,10 +147289,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -146428,7 +147320,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -146504,7 +147396,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+35366, + ts+35462, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -146547,7 +147439,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -146559,7 +147451,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -146679,7 +147571,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -147078,12 +147970,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -147094,7 +147986,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -147275,7 +148167,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -147399,7 +148291,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -147408,7 +148300,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -147440,8 +148332,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -147494,8 +148386,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -147565,7 +148457,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.X__builtin___memset_chk(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{})), libc.X__builtin_object_size(tls, bp, 0)) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1527, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1547, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -147581,13 +148473,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+35423, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35519, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+25341, ts+35431, 0, pzErr) + pConfig, ts+25436, ts+35527, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11815, - ts+35466, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11829, + ts+35562, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -147840,7 +148732,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+35113, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+35209, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -147954,7 +148846,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35510, + ts+35606, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -148113,6 +149005,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -148120,7 +149016,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35596) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35692) 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)) @@ -148391,7 +149287,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+35601, 0) + ts+35697, 0) return SQLITE_ERROR } @@ -148422,7 +149318,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5364, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5378, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -148437,7 +149333,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5364, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+5378, 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) @@ -148751,7 +149647,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -148783,7 +149679,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -148815,25 +149711,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35640, + ts+35736, 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 + 14993 + return ts + 15007 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bDesc != 0 { - return ts + 35695 + return ts + 35791 } - return ts + 35700 + return ts + 35796 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -148879,12 +149775,12 @@ 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+35704, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35800, 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+5446, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5460, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35806, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -148915,7 +149811,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35738, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35834, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -148946,7 +149842,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35748, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35844, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -148978,14 +149874,14 @@ 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+35769, libc.VaList(bp, z)) + ts+35865, 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 + 34152 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 34248 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -149041,7 +149937,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+35601, 0) + ts+35697, 0) return SQLITE_ERROR __1: ; @@ -149084,7 +149980,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -149258,7 +150154,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -149379,7 +150275,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3644, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3658, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -149403,28 +150299,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35838, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35934, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35849, 0) + ts+35945, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35929, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36025, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35937, 0) + ts+36033, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+17293, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+17340, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35993, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36089, 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+35999, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36095, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -149482,7 +150378,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17838, z) { + 0 == Xsqlite3_stricmp(tls, ts+17885, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -149495,12 +150391,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36015, + ts+36111, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20723 + return ts + 20818 } - return ts + 36052 + return ts + 36148 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -150130,7 +151026,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+36064, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+36160, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -150374,7 +151270,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+36085, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36181, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -150393,7 +151289,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+36107, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36203, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -150440,7 +151336,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36138) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36234) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -150449,7 +151345,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+36151, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+36247, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -150463,7 +151359,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 36242, ts + 34341, ts + 25341, ts + 34692, ts + 11815, + ts + 36338, ts + 34437, ts + 25436, ts + 34788, ts + 11829, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -150487,7 +151383,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+36249, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+36345, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -150505,13 +151401,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+36249, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36345, 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+36254, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36350, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -150566,17 +151462,17 @@ 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)) = [11]uintptr{ - ts + 36269, - ts + 36337, - ts + 36406, - ts + 36439, - ts + 36478, - ts + 36518, - ts + 36557, - ts + 36598, - ts + 36637, - ts + 36679, - ts + 36719, + ts + 36365, + ts + 36433, + ts + 36502, + ts + 36535, + ts + 36574, + ts + 36614, + ts + 36653, + ts + 36694, + ts + 36733, + ts + 36775, + ts + 36815, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -150643,7 +151539,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3644, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3658, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -150678,18 +151574,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36742, + ts+36838, 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+36846, + ts+36942, 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+36884, + ts+36980, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -150701,7 +151597,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36922, + ts+37018, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -150713,14 +151609,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+25341, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11815, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+36242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+25436, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11829, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+36338, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34692, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34788, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+34341, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34437, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -150732,17 +151628,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36964, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37060, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29994 + return ts + 30089 } - return ts + 1527 + return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36994, + ts+37090, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -150779,27 +151675,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37038, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37134, 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+37061, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37157, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34341, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34437, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34692, ts+37067, 0, pzErr) + pConfig, ts+34788, ts+37163, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+36242, ts+37099, 1, pzErr) + pConfig, ts+36338, ts+37195, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34838, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34934, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -151005,12 +151901,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37116, + ts+37212, 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+37166, + ts+37262, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -151018,7 +151914,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34838, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34934, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -151194,7 +152090,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+37195, + zSql = Xsqlite3_mprintf(tls, ts+37291, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -151376,14 +152272,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34341, bp+48) + rc = fts5StorageCount(tls, p, ts+34437, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34692, bp+56) + rc = fts5StorageCount(tls, p, ts+34788, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -151578,9 +152474,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+37227) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37323) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37238) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37334) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -151795,7 +152691,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 + 37249 + var zCat uintptr = ts + 37345 var i int32 libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{})), libc.X__builtin_object_size(tls, p, 0)) @@ -151807,7 +152703,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37258) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37354) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -151818,18 +152714,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+37269) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37365) { 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+37227) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37323) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37238) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37334) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37258) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37354) { } else { rc = SQLITE_ERROR } @@ -152105,7 +153001,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)) = uintptr(0) - var zBase uintptr = ts + 37287 + var zBase uintptr = ts + 37383 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -152247,7 +153143,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37297, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37393, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -152255,11 +153151,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37300, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37396, 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+37305, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37401, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -152267,7 +153163,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37310, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37406, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -152275,7 +153171,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37313, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37409, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -152283,11 +153179,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37316, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37412, 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+37321, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37417, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -152295,19 +153191,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37326, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37422, 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+37330, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37426, 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+37336, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37432, 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+37341, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37437, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152315,11 +153211,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37345, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37441, 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+37349, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37445, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -152327,7 +153223,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37352, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37448, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152335,11 +153231,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37356, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37452, 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+37360, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37456, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152347,7 +153243,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37364, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37460, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152355,7 +153251,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37368, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37464, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152363,7 +153259,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37372, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37468, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152379,24 +153275,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37376, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37472, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37452, 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+37379, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37382, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37475, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37478, 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+37386, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37372, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37482, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37468, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -152411,137 +153307,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37389, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37485, 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+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37452, 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+37397, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37493, 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+37404, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37500, 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+37409, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37505, 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+37305, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37401, 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+37414, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37510, 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+37300, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37396, 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+37419, 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+37372, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37468, 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+37424, 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 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15820, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15867, 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+37429, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37525, 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+37382, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37478, 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+37433, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37529, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37393, 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+37438, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37534, 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+37341, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37437, 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+37444, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37540, 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+37448, uint64(1), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37544, 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+37450, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37546, 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+37364, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37460, 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+37456, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37552, 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+37372, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37468, 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+37464, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37560, 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+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37452, 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+37470, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37566, 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+37356, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37452, 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+37475, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37571, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37393, 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+37481, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37577, 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+37368, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37464, 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+37489, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37585, 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+37497, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37593, 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+37501, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37597, 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+37364, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37460, 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+37509, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37605, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37393, 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+37515, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37611, 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+37368, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37464, 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+37521, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37617, 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+37382, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37478, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -152556,16 +153452,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37528, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37624, 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+37313, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37409, 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+37533, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37629, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -152573,21 +153469,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37538, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37634, 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+37313, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37409, 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+37544, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37640, 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+37313, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37409, 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+37497, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37593, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -152595,7 +153491,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37550, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37646, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -152603,9 +153499,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37556, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37652, 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+37297, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37393, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -152620,12 +153516,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37562, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37658, 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+37566, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37662, 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+37569, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37665, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -152634,7 +153530,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37572, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37668, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -152790,7 +153686,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+37576) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37672) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -152970,22 +153866,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 37287, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37383, 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 + 37591, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37687, 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 + 37597, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37693, 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 + 37604, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37700, 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 @@ -154128,14 +155024,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+37612) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37708) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37616) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37712) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37620) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37716) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37629, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37725, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -154161,19 +155057,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37663, - ts + 37703, - ts + 37738, + ts + 37759, + ts + 37799, + ts + 37834, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23637, *(*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+23732, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37781, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37877, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -154306,11 +155202,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+37814, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37910, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37845, + ts+37941, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -154334,7 +155230,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37896, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37992, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -154618,7 +155514,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1527 + zCopy = ts + 1547 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -154729,7 +155625,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37922, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+38018, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -154751,7 +155647,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37932 + return ts + 38028 } func init() { @@ -155425,7 +156321,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -155771,16 +156667,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -155837,12 +156733,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -155857,6 +156753,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -155878,5 +156775,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-14.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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-14.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 5fdd0e094b..74e2ff6ec7 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -300,7 +300,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -832,7 +831,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -845,49 +844,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -896,21 +895,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -922,8 +921,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -935,22 +934,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -958,13 +957,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -979,13 +978,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0x0003 @@ -1509,7 +1508,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1605,6 +1604,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1740,6 +1740,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1770,6 +1771,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1870,6 +1872,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1943,7 +1947,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2051,8 +2055,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2470,6 +2474,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3363,7 +3368,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3694,6 +3708,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3704,6 +3719,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5211,6 +5244,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5248,6 +5292,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5296,7 +5341,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5310,6 +5355,7 @@ type Parse1 = struct { FnLabelAlloc int32 FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5665,8 +5711,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5683,7 +5728,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -5939,8 +5983,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6261,17 +6305,6 @@ type IdxCover = struct { FiCur int32 } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6301,7 +6334,13 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -6310,49 +6349,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 849, - ts + 875, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, ts + 895, - ts + 921, - ts + 944, - ts + 970, - ts + 992, - ts + 1013, - ts + 1024, - ts + 1032, - ts + 1046, - ts + 1059, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -6454,7 +6494,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -6502,10 +6541,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1092)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -6517,10 +6556,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -6530,21 +6565,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1079, - ts + 1083, - ts + 1088, - ts + 1092, - ts + 1100, - ts + 1105, + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, } // SQL is translated into a sequence of instructions to be @@ -6840,7 +6867,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -6976,6 +7003,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FpSchema if pSchema != uintptr(0) { @@ -6999,6 +7028,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7013,9 +7043,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7237,7 +7270,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1110, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -7263,13 +7296,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1118, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1126, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -7345,7 +7378,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -7367,7 +7400,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -7424,7 +7457,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1142) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 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))) @@ -7557,7 +7590,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 92)) = Time_t((*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000)) } if osLocaltime(tls, bp+92, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1146, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -7581,12 +7614,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1169)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1189)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -7598,7 +7631,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1231) == 0 { if idx > 1 { return 1 } @@ -7620,7 +7653,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1216) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1236) == 0 { if idx > 1 { return 1 } @@ -7634,7 +7667,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1226) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -7642,7 +7675,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1236) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1256) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -7654,7 +7687,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -7688,9 +7721,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -7709,7 +7742,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1259, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1279, 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) { @@ -7723,14 +7756,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1269) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1289) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1275) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1295) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1300) == 0 { rc = 0 } break @@ -8056,7 +8089,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8066,13 +8099,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1289, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8090,41 +8123,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1321, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1307, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1327, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8137,7 +8170,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1332, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -8187,15 +8220,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1216}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1236}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1317}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1322}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1256}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1342}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1356}, + {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 + 1378}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1396}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -8346,7 +8379,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -8610,7 +8643,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1389, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1409, libc.VaList(bp, nByte)) } return p } @@ -8643,7 +8676,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1427, + ts+1447, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9053,7 +9086,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(4) defer tls.Free(4) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9089,7 +9122,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9109,7 +9142,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9158,24 +9191,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -9491,7 +9551,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -9564,8 +9624,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1497)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1530)) 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)}, @@ -9777,7 +9837,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1517, 1) + Xsqlite3_str_append(tls, pAccum, ts+1537, 1) goto __5 __11: ; @@ -10338,7 +10398,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1519 + bufpt = ts + 1539 length = 3 goto __58 __127: @@ -10398,7 +10458,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1523, uint32(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1543, uint32(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -10739,7 +10799,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1527 + bufpt = ts + 1547 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -10863,9 +10923,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1528 + return ts + 1548 } - return ts + 1533 + return ts + 1553 }() __220: ; @@ -11013,7 +11073,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1540, 1) + Xsqlite3_str_append(tls, pAccum, ts+1560, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11030,10 +11090,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1542, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1552, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11088,7 +11148,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1566)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1586)) // 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 @@ -11253,7 +11313,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1527, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1547, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -11485,20 +11545,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint32(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11511,46 +11677,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint32(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint32(44)) } 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(*(*int8)(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 + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - sqlite3Prng.FisInit = uint8(1) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint32(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint32(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -12855,7 +13021,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1575 + var pow63 uintptr = ts + 1595 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -13401,7 +13567,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1594, + ts+1614, libc.VaList(bp, zType)) } @@ -13420,13 +13586,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1528) + logBadConnection(tls, ts+1548) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1639) + logBadConnection(tls, ts+1659) } return 0 } else { @@ -13439,7 +13605,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1648) + logBadConnection(tls, ts+1668) return 0 } else { return 1 @@ -13964,193 +14130,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1656, - ts + 1666, - ts + 1677, - ts + 1689, - ts + 1700, - ts + 1712, - ts + 1719, - ts + 1727, - ts + 1735, - ts + 1740, - ts + 1746, + ts + 1676, + ts + 1686, + ts + 1697, + ts + 1709, + ts + 1720, + ts + 1732, + ts + 1739, + ts + 1747, + ts + 1755, ts + 1760, - ts + 1766, - ts + 1776, - ts + 1781, - ts + 1786, - ts + 1789, - ts + 1795, - ts + 1808, - ts + 1818, - ts + 1822, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1860, + ts + 1765, + ts + 1771, + ts + 1785, + ts + 1791, + ts + 1801, + ts + 1806, + ts + 1811, + ts + 1814, + ts + 1820, + ts + 1827, + ts + 1831, + ts + 1841, + ts + 1848, + ts + 1855, + ts + 1862, ts + 1869, - ts + 1880, - ts + 1889, - ts + 1895, - ts + 1905, - ts + 1915, - ts + 1920, - ts + 1930, - ts + 1941, - ts + 1946, - ts + 1953, - ts + 1964, - ts + 1969, - ts + 1974, - ts + 1980, - ts + 1986, - ts + 1992, - ts + 1998, - ts + 2001, + ts + 1879, + ts + 1888, + ts + 1899, + ts + 1908, + ts + 1914, + ts + 1924, + ts + 1934, + ts + 1939, + ts + 1949, + ts + 1960, + ts + 1965, + ts + 1972, + ts + 1983, + ts + 1988, + ts + 1993, + ts + 1999, ts + 2005, - ts + 2016, - ts + 2027, + ts + 2011, + ts + 2014, + ts + 2018, + ts + 2024, ts + 2035, - ts + 2044, - ts + 2050, - ts + 2057, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, - ts + 2083, + ts + 2046, + ts + 2054, + ts + 2063, + ts + 2070, + ts + 2078, + ts + 2081, + ts + 2084, + ts + 2087, ts + 2090, - ts + 2100, - ts + 2113, - ts + 2124, - ts + 2130, - ts + 2137, - ts + 2142, - ts + 2151, - ts + 2160, - ts + 2167, - ts + 2180, - ts + 2191, - ts + 2196, - ts + 2204, + ts + 2093, + ts + 2096, + ts + 2103, + ts + 2109, + ts + 2119, + ts + 2132, + ts + 2143, + ts + 2149, + ts + 2156, + ts + 2165, + ts + 2174, + ts + 2181, + ts + 2194, + ts + 2205, ts + 2210, - ts + 2217, - ts + 2229, - ts + 2234, + ts + 2218, + ts + 2224, + ts + 2231, ts + 2243, ts + 2248, ts + 2257, ts + 2262, - ts + 2267, - ts + 2273, + ts + 2271, + ts + 2276, ts + 2281, - ts + 2289, - ts + 2299, - ts + 2307, - ts + 2314, - ts + 2327, - ts + 2332, - ts + 2344, - ts + 2352, - ts + 2359, - ts + 2370, - ts + 2377, + ts + 2287, + ts + 2295, + ts + 2303, + ts + 2313, + ts + 2321, + ts + 2328, + ts + 2341, + ts + 2346, + ts + 2358, + ts + 2366, + ts + 2373, ts + 2384, - ts + 2394, - ts + 2403, - ts + 2414, - ts + 2420, - ts + 2431, - ts + 2441, - ts + 2451, - ts + 2458, - ts + 2464, - ts + 2474, - ts + 2485, - ts + 2489, - ts + 2498, - ts + 2507, - ts + 2514, - ts + 2524, - ts + 2531, - ts + 2540, - ts + 2550, - ts + 2557, - ts + 2565, + ts + 2391, + ts + 2398, + ts + 2408, + ts + 2417, + ts + 2428, + ts + 2434, + ts + 2445, + ts + 2455, + ts + 2465, + ts + 2472, + ts + 2478, + ts + 2488, + ts + 2499, + ts + 2503, + ts + 2512, + ts + 2521, + ts + 2528, + ts + 2538, + ts + 2545, + ts + 2554, + ts + 2564, + ts + 2571, ts + 2579, - ts + 2587, + ts + 2593, ts + 2601, - ts + 2612, - ts + 2625, - ts + 2636, - ts + 2642, - ts + 2654, - ts + 2663, - ts + 2671, - ts + 2680, - ts + 2689, - ts + 2696, - ts + 2704, - ts + 2711, - ts + 2722, + ts + 2615, + ts + 2626, + ts + 2639, + ts + 2650, + ts + 2656, + ts + 2668, + ts + 2677, + ts + 2685, + ts + 2694, + ts + 2703, + ts + 2710, + ts + 2718, + ts + 2725, ts + 2736, - ts + 2747, - ts + 2755, + ts + 2750, ts + 2761, ts + 2769, - ts + 2777, - ts + 2787, - ts + 2800, - ts + 2810, - ts + 2823, - ts + 2832, - ts + 2843, - ts + 2851, + ts + 2775, + ts + 2783, + ts + 2791, + ts + 2801, + ts + 2814, + ts + 2824, + ts + 2837, + ts + 2846, ts + 2857, - ts + 2869, - ts + 2881, - ts + 2889, - ts + 2901, - ts + 2914, - ts + 2924, - ts + 2934, - ts + 2939, - ts + 2951, - ts + 2963, - ts + 2973, - ts + 2979, - ts + 2989, - ts + 2996, - ts + 3008, - ts + 3019, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3054, - ts + 3061, - ts + 3072, - ts + 3085, - ts + 3095, - ts + 3102, - ts + 3110, - ts + 3119, - ts + 3125, + ts + 2865, + ts + 2871, + ts + 2883, + ts + 2895, + ts + 2903, + ts + 2915, + ts + 2928, + ts + 2938, + ts + 2948, + ts + 2953, + ts + 2965, + ts + 2977, + ts + 2987, + ts + 2993, + ts + 3003, + ts + 3010, + ts + 3022, + ts + 3033, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3068, + ts + 3075, + ts + 3086, + ts + 3099, + ts + 3109, + ts + 3116, + ts + 3124, ts + 3133, - ts + 3141, - ts + 3149, - ts + 3159, - ts + 3168, - ts + 3179, - ts + 3189, - ts + 3195, - ts + 3206, - ts + 3217, - ts + 3222, - ts + 3230, + ts + 3139, + ts + 3147, + ts + 3155, + ts + 3163, + ts + 3173, + ts + 3182, + ts + 3193, + ts + 3203, + ts + 3209, + ts + 3220, + ts + 3231, + ts + 3236, + ts + 3244, } type pthread_once = struct { @@ -14583,35 +14749,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3240, FpCurrent: 0}, - {FzName: ts + 3245, FpCurrent: 0}, - {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, + {FzName: ts + 3254, FpCurrent: 0}, + {FzName: ts + 3259, FpCurrent: 0}, {FzName: ts + 3265, FpCurrent: 0}, - {FzName: ts + 3270, FpCurrent: 0}, - {FzName: ts + 3276, FpCurrent: 0}, - {FzName: ts + 3286, FpCurrent: 0}, - {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3297}, - {FzName: ts + 3303}, - {FzName: ts + 3311, FpCurrent: 0}, + {FzName: ts + 3272, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3284, FpCurrent: 0}, + {FzName: ts + 3290, FpCurrent: 0}, + {FzName: ts + 3300, FpCurrent: 0}, + {FzName: ts + 3306, FpCurrent: 0}, + {FzName: ts + 3311}, {FzName: ts + 3317}, - {FzName: ts + 3324}, - {FzName: ts + 3333, FpCurrent: 0}, - {FzName: ts + 3340}, - {FzName: ts + 3350, FpCurrent: 0}, - {FzName: ts + 3357, FpCurrent: 0}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3331}, + {FzName: ts + 3338}, + {FzName: ts + 3347, FpCurrent: 0}, + {FzName: ts + 3354}, + {FzName: ts + 3364, FpCurrent: 0}, {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3377, FpCurrent: 0}, - {FzName: ts + 3383, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3403, FpCurrent: 0}, - {FzName: ts + 3410}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, + {FzName: ts + 3397, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3412, FpCurrent: 0}, {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3438, FpCurrent: 0}, - {FzName: ts + 3444}, + {FzName: ts + 3424}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3452, FpCurrent: 0}, + {FzName: ts + 3458}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -14704,11 +14870,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*12 + 4)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3450, libc.VaList(bp, z, fd)) + ts+3464, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3493, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3507, O_RDONLY, int32(m)) < 0 { break } } @@ -14787,13 +14956,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__error(tls))) - zErr = ts + 1527 + zErr = ts + 1547 if zPath == uintptr(0) { - zPath = ts + 1527 + zPath = ts + 1547 } Xsqlite3_log(tls, errcode, - ts+3503, + ts+3517, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14801,7 +14970,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3245, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3259, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14822,7 +14991,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -14924,19 +15093,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32) if rc != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3534, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3548, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3558, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3572, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3587, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3601, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3614, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3628, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15299,7 +15468,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15572,7 +15741,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3642, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3656, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15590,7 +15759,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3357, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15607,14 +15776,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3645, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3659, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -15634,7 +15803,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -15689,7 +15858,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1527, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1547, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -15702,7 +15871,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -15770,7 +15939,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -15929,7 +16098,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -15957,7 +16126,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3276, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16020,7 +16189,7 @@ __4: ; libc.Xmemset(tls, pShmNode, 0, uint32(unsafe.Sizeof(unixShmNode{}))+uint32(nShmFilename)) zShm = libc.AssignPtrUintptr(pShmNode+8, pShmNode+1*68) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3656, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3670, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16041,7 +16210,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3663, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3677, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -16056,7 +16225,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3240, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) goto shm_open_err __10: ; @@ -16182,11 +16351,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 208)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1527, 1, bp+208) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1547, 1, bp+208) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3311, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) goto shmpage_out __14: ; @@ -16232,7 +16401,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3398, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -16433,7 +16602,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3398 + var zErr uintptr = ts + 3412 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -16471,7 +16640,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -16586,10 +16755,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3676, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3690, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3681) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3695) == 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_EXCL) } @@ -16605,7 +16774,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+8) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -16618,7 +16787,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3691, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3705, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16626,7 +16795,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16639,15 +16808,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3699, - ts + 3708, - ts + 3717, - ts + 1540, + ts + 3713, + ts + 3722, + ts + 3731, + ts + 1560, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3722) - azTempDirs[1] = libc.Xgetenv(tls, ts+3736) + azTempDirs[0] = libc.Xgetenv(tls, ts+3736) + azTempDirs[1] = libc.Xgetenv(tls, ts+3750) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16692,7 +16861,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3743, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3757, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16777,7 +16946,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3760) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3774) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16825,10 +16994,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -16942,7 +17111,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3240, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17033,7 +17202,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+3350, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) } return rc } @@ -17041,9 +17210,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+3767, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3781, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17110,18 +17279,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3438, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000 { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, bp+208, uint32(unsafe.Sizeof([1026]int8{}))-uint32(2)) if got <= 0 || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-2 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3429, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 208 + uintptr(got))) = int8(0) @@ -17161,14 +17330,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1028)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, bp, uint32(unsafe.Sizeof([1026]int8{}))-uint32(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3258, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) } appendAllPathElements(tls, bp+1028, bp) } appendAllPathElements(tls, bp+1028, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1028)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1028)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1028)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1028)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17220,7 +17389,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3642, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3656, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17248,11 +17417,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint32(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3773, O_RDONLY, uint16(0)) + fd = robust_open(tls, ts+3787, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint32(unsafe.Sizeof(Time_t(0)))) @@ -17263,7 +17432,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -17340,10 +17509,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3786, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3791, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3801, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3681, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3800, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3805, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3815, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3695, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -17395,7 +17564,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3814, + FzName: ts + 3828, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17562,40 +17731,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -17606,7 +17820,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3820, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3834, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17662,7 +17876,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint32(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -17738,7 +17952,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3642, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3656, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17859,7 +18073,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3835, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3849, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -17932,7 +18146,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3858, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3872, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -17995,6 +18209,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -18678,6 +18897,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18710,6 +18930,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 28)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21137,7 +21358,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3873, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3887, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -22274,7 +22495,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -22335,7 +22556,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3900, uint32(8)) + libc.Xmemcpy(tls, pPtr, ts+3914, uint32(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -22348,7 +22569,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3909, uint32(4)) + libc.Xmemcpy(tls, pPtr, ts+3923, uint32(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -22400,9 +22621,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3914, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22666,7 +22887,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22790,7 +23011,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22829,7 +23050,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -22906,7 +23127,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23033,6 +23254,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -23906,7 +24128,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24091,7 +24313,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3931, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3945, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24660,7 +24882,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24759,7 +24981,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -24927,7 +25149,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3949, + ts+3963, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -25344,7 +25566,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+12) @@ -25489,7 +25711,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3986, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4000, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25619,7 +25841,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26092,7 +26314,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -26597,7 +26819,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -26987,7 +27209,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4012)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4026)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27252,7 +27474,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -27389,7 +27611,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -27406,7 +27628,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -27414,7 +27636,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -27457,7 +27679,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -27467,7 +27689,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -27717,7 +27939,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27749,8 +27971,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27765,7 +27986,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -27775,7 +27996,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27788,7 +28009,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -27797,14 +28018,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -27814,7 +28035,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -27861,63 +28082,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint32(usableSize-iCellStart)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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), uint32(usableSize-iCellStart)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint32(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -27949,10 +28164,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint32(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -27963,15 +28177,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -27996,7 +28210,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28007,7 +28221,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28055,26 +28269,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28084,7 +28298,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28092,7 +28306,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28100,10 +28314,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28172,7 +28386,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -28202,11 +28416,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -28217,15 +28431,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28253,14 +28467,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -28274,7 +28488,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -28286,7 +28500,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -28389,7 +28603,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -28417,7 +28631,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -28456,7 +28670,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -28480,7 +28694,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+452) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+456) } // Open a database file. @@ -28529,7 +28743,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4028) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4042) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -29301,7 +29515,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4037, uint32(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4051, uint32(3)) != 0) { goto __14 } goto page1_init_failed @@ -29339,7 +29553,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -29754,7 +29968,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29780,7 +29994,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -29788,6 +30002,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29797,7 +30014,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29813,7 +30030,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29874,7 +30091,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -29909,7 +30126,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) if *(*Pgno)(unsafe.Pointer(bp + 24)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -29969,7 +30186,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30008,7 +30225,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30039,7 +30256,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -30380,7 +30597,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30624,14 +30841,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } getCellInfo(tls, pCur) aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload if Uptr((int32(aPayload)-int32((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > (*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30676,7 +30893,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30725,7 +30942,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -30804,10 +31021,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30815,7 +31030,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*uintptr)(unsafe.Pointer(pCur + 112 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*4)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ - return getAndInitPage(tls, pBt, newPgno, pCur+108, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+108, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30877,7 +31093,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+108, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+108, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30897,7 +31113,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -30917,7 +31133,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31129,7 +31345,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -31333,7 +31549,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -31398,7 +31614,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -31446,7 +31662,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -31565,7 +31781,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31725,7 +31941,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -31790,7 +32006,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -31826,7 +32042,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -31870,7 +32086,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -31982,7 +32198,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32140,7 +32356,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -32197,7 +32413,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -32213,7 +32429,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -32287,7 +32503,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -32299,7 +32515,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 4)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -32310,7 +32526,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -32475,7 +32691,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32746,12 +32962,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -32759,7 +32975,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -32819,7 +33035,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -32908,7 +33124,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -33024,7 +33240,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 80)) = allocateBtreePage(tls, pBt, bp, bp+4, uint32(0), uint8(0)) @@ -33342,7 +33558,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -33353,7 +33569,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -33511,7 +33727,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -33585,7 +33801,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -33647,7 +33863,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -33675,7 +33891,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -33936,7 +34152,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34128,7 +34344,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34165,6 +34381,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } else { var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 112 + uintptr(iPage-1)*4)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 64 + uintptr(iPage-1)*2))) @@ -34255,7 +34473,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -34278,7 +34496,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -34358,7 +34576,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -34471,7 +34689,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 84)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 84)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 84)) = btreeComputeFreeSpace(tls, pPage) @@ -34532,7 +34750,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 84)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34570,13 +34788,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 88))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 88)))) @@ -34683,7 +34901,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34706,7 +34924,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34807,7 +35025,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 20)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -34815,11 +35033,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34894,7 +35112,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -34963,7 +35181,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -34992,7 +35210,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12))) @@ -35068,7 +35286,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 24)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35082,7 +35300,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -35216,7 +35434,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35404,7 +35622,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+40, ts+4041, 1) + Xsqlite3_str_append(tls, pCheck+40, ts+4055, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+40, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -35429,11 +35647,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4043, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4057, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4066, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4080, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 304)) != 0 { @@ -35454,13 +35672,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4091, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4105, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4120, + ts+4134, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -35479,7 +35697,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4174, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4188, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -35490,7 +35708,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4196, libc.VaList(bp+8, iPage)) + ts+4210, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35513,12 +35731,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4235, + ts+4249, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4261 + return ts + 4275 } - return ts + 4266 + return ts + 4280 }(), expected-N, expected)) } @@ -35625,13 +35843,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4287 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4301 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4297, libc.VaList(bp, rc)) + ts+4311, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35642,7 +35860,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4335, libc.VaList(bp+8, rc)) + ts+4349, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35650,14 +35868,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4373, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4387, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4395 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4409 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35674,7 +35892,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4421 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4435 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35699,7 +35917,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4449, + checkAppendMsg(tls, pCheck, ts+4463, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35712,7 +35930,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+108)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4479, 0) + checkAppendMsg(tls, pCheck, ts+4493, 0) doCoverageCheck = 0 goto __10 __13: @@ -35728,7 +35946,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4503, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+108)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4517, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+108)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 100)) = (*CellInfo)(unsafe.Pointer(bp + 108)).FnKey @@ -35766,7 +35984,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4527, 0) + checkAppendMsg(tls, pCheck, ts+4541, 0) depth = d2 __21: ; @@ -35839,7 +36057,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4552, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 128))>>16, iPage)) + ts+4566, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 128))>>16, iPage)) goto __30 goto __32 __31: @@ -35856,7 +36074,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4589, + ts+4603, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -35976,7 +36194,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4641 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4655 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)).FzPfx = uintptr(0) @@ -36012,7 +36230,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4657, + ts+4671, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36022,7 +36240,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4702, 0) + ts+4716, 0) __16: ; __10: @@ -36069,13 +36287,13 @@ __23: 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+4757, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4771, 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+4779, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4793, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -36310,6 +36528,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -36323,8 +36550,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -36332,7 +36559,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3642, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3656, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -36343,7 +36570,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4813, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4827, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -36358,7 +36585,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4833, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4847, 0) return SQLITE_ERROR } return SQLITE_OK @@ -36378,7 +36605,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4864, 0) + pDestDb, SQLITE_ERROR, ts+4878, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36826,7 +37053,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+4904, + Xsqlite3_str_appendf(tls, bp+8, ts+4918, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37243,6 +37470,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37258,7 +37498,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -37318,6 +37558,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 12)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -37400,7 +37643,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1527 + return ts + 1547 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -37632,7 +37875,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37863,7 +38106,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -37925,7 +38168,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1527 + zNeg = ts + 1547 rc = SQLITE_OK __1: @@ -37966,7 +38209,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4911 + zNeg = ts + 4925 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -37985,7 +38228,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4913, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4927, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -38289,7 +38532,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -38304,14 +38547,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -38370,6 +38613,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -38394,10 +38640,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+100, 0, uint32(unsafe.Sizeof(Vdbe{}))-uint32(uintptr(0)+100)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 8 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 4 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -38435,21 +38681,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38798,85 +39052,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 + } + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 20 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -38976,6 +39262,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39003,7 +39299,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39011,12 +39307,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39035,7 +39331,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39086,7 +39384,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 20 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -39215,8 +39513,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -39227,10 +39525,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39241,6 +39535,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39256,34 +39555,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4918, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4932, 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 + 20 + uintptr(j)*4)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { - zColl = ts + 1527 + zColl = ts + 1547 } - if libc.Xstrcmp(tls, zColl, ts+1072) == 0 { - zColl = ts + 4923 + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 4937 } - Xsqlite3_str_appendf(tls, bp+144, ts+4925, + Xsqlite3_str_appendf(tls, bp+144, ts+4939, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4911 + return ts + 4925 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4933 + return ts + 4947 } - return ts + 1527 + return ts + 1547 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4936, 1) + Xsqlite3_str_append(tls, bp+144, ts+4950, 1) break } @@ -39291,7 +39590,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -39299,32 +39598,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1307, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1301, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -39334,13 +39633,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1307, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, 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+1301, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1528 + zP4 = ts + 1548 } else { - zP4 = ts + 4957 + zP4 = ts + 4971 } break @@ -39348,7 +39647,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4964, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4978, libc.VaList(bp+120, pVtab)) break } @@ -39359,20 +39658,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4972, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4986, 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+4977, 1) + Xsqlite3_str_append(tls, bp+144, ts+4991, 1) break } case -4: { - zP4 = ts + 4979 + zP4 = ts + 4993 break } @@ -39397,7 +39696,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4987, ts + 4989, ts + 4991, ts + 4996} +var encnames = [4]uintptr{ts + 5001, ts + 5003, ts + 5005, ts + 5010} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -39499,7 +39798,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39848,8 +40147,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5001, ts + 5006, ts + 5013, ts + 5016, ts + 5019, ts + 5022, ts + 5025, ts + 5028, - ts + 5036, ts + 5039, ts + 5046, ts + 5054, + ts + 5015, ts + 5020, ts + 5027, ts + 5030, ts + 5033, ts + 5036, ts + 5039, ts + 5042, + ts + 5050, ts + 5053, ts + 5060, ts + 5068, } // Close a VDBE cursor and release all the resources that cursor @@ -40058,7 +40357,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5061, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5075, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40066,16 +40365,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5073, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5101, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5102, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5116, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -40221,7 +40520,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5115, 0) + Xsqlite3VdbeError(tls, p, ts+5129, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -40501,7 +40800,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40511,14 +40810,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40529,16 +40830,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40555,7 +40852,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41106,16 +41403,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(7) { @@ -41133,7 +41434,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else { @@ -41163,7 +41468,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41197,7 +41502,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41220,7 +41525,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 48)) != U32(10)) } if rc != 0 { @@ -41242,7 +41547,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 40 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 48))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 48))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -41386,7 +41698,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -41557,7 +41869,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41583,7 +41895,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41626,7 +41938,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+144, Bft(iCode+1), 0, 0x3) } } @@ -41694,13 +42006,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5145 + zContext = ts + 5159 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5164 + zContext = ts + 5178 } else { - zContext = ts + 5183 + zContext = ts + 5197 } - zMsg = Xsqlite3_mprintf(tls, ts+5192, + zMsg = Xsqlite3_mprintf(tls, ts+5206, 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) @@ -41731,7 +42043,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41786,7 +42098,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*40) } - Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41805,7 +42117,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5228, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5242, 0) return 1 } else { return 0 @@ -41815,7 +42127,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5273, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5287, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41857,14 +42169,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42076,6 +42389,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -42272,7 +42589,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5313, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5327, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -42463,7 +42780,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42538,7 +42855,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5336) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5350) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -42967,35 +43284,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5346, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5360, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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)*40 Xsqlite3VdbeMemRelease(tls, pVar) (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43010,7 +43326,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*40 @@ -43042,7 +43358,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, rValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43057,7 +43373,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, iValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43068,7 +43384,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43078,7 +43394,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, pPtr, zPTtype, xDestructor) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43154,7 +43470,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, n) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43298,7 +43614,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -43316,8 +43632,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 156 + uintptr(op)*4)) @@ -43381,7 +43700,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -43525,7 +43844,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -43697,7 +44016,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5386, 3) + Xsqlite3_str_append(tls, bp+48, ts+5400, 3) Xsqlite3_str_append(tls, bp+48, zStart, (int32(zRawSql)-int32(zStart))/1) } @@ -43733,11 +44052,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 76))-1)*40 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { - Xsqlite3_str_append(tls, bp+48, ts+1528, 4) + Xsqlite3_str_append(tls, bp+48, ts+1548, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1307, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1327, 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+4904, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4918, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43752,21 +44071,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 80 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5390, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+80) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5410, 2) + Xsqlite3_str_append(tls, bp+48, ts+5424, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5413, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5427, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5418, 1) + Xsqlite3_str_append(tls, bp+48, ts+5432, 1) } } } @@ -43822,7 +44141,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -43926,12 +44246,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -43983,11 +44302,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1088, - ts + 1100, - ts + 1105, - ts + 1083, - ts + 1528, + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1548, } // Execute as much of a VDBE program as we can. @@ -44025,7 +44344,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44054,11 +44372,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44128,42 +44449,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44171,52 +44493,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44258,19 +44580,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -44279,7 +44601,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -44287,11 +44609,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44527,7 +44849,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45023,20 +45345,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5420, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5434, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5441, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5455, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = (int32(pOp) - int32(aOp)) / 20 - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5448, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5462, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -45426,14 +45748,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) if !(int32(type1)&int32(type2)&MEM_Int != 0) { goto __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45511,72 +45833,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45593,10 +45923,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, int64(0)) -__275: +__276: ; goto __8 @@ -45608,33 +45938,33 @@ __43: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45643,43 +45973,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint32(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45695,26 +46025,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45722,12 +46052,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45742,17 +46072,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45767,163 +46097,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -45932,20 +46262,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -45955,15 +46285,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -45971,9 +46301,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -45985,52 +46315,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*40, aMem+uintptr(U32(p21)+idx)*40, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&KEYINFO_ORDER_BIGNULL != 0 && (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*40)).Fflags)&MEM_Null != 0)) { - goto __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*20 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*20 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46039,24 +46369,24 @@ __59: v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { - goto __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46070,13 +46400,13 @@ __61: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46085,38 +46415,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } iAddr = U32((int32(pOp) - int32((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 20) 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46125,10 +46455,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46136,10 +46466,10 @@ __65: c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) if !(c1 != 0) { - goto __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46147,35 +46477,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 80 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fflags)&MEM_Null != 0) { - goto __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, int64(0)) -__353: +__362: ; goto __8 @@ -46183,372 +46551,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { - goto __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*40 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*40 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272)) - *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) + *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 272)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 272)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 272))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 116))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 272))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 272)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 272))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 116))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 272)), pDest) *(*U16)(unsafe.Pointer(pDest + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46556,15 +46925,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46573,124 +46942,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 40 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 40 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5472, + Xsqlite3VdbeError(tls, p, ts+5486, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46700,40 +47069,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 40 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46751,339 +47120,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 40 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 40 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 16)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+276, pRec, uint32(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 276)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 276)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 276)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 40 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47092,20 +47461,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 284)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 284)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+284) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 284)) @@ -47116,244 +47485,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5513, 0) + Xsqlite3VdbeError(tls, p, ts+5527, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*24 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5564, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5578, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5586, 0) + ts+5600, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -47362,172 +47731,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5640, 0) + ts+5654, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5695 + return ts + 5709 } return func() uintptr { if iRollback != 0 { - return ts + 5743 + return ts + 5757 } - return ts + 5786 + return ts + 5800 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 292)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+292) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 144))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; 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(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5827) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5841) 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 __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47547,36 +47916,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47584,22 +47953,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 144))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47610,24 +47979,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*40 @@ -47635,30 +48004,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47674,10 +48043,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47686,10 +48055,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47709,83 +48078,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1547 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47794,31 +48163,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47826,10 +48195,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47850,105 +48219,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) eqOnly = 0 - (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+300) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+300) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+300) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), int64(U64(iKey)), 0, bp+300) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 304)).Fdefault_rc = func() int8 { @@ -47960,231 +48329,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304, bp+300) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+304, bp+300) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+304)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 300)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 20 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*20 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 332)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 360)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+332, bp+360) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+332, bp+360) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 360)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 360)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 360)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 360)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+364)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 364)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), bp+364, pC7+28) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+364, pC9+28) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48194,85 +48565,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, pC7+28) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), pIdxKey, pC9+28) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+364)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -48280,59 +48651,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 392)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+392, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+392)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 392))) goto notExistsWithKey -__669: +__678: ; __104: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) notExistsWithKey: - pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 36)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 36)) *(*int32)(unsafe.Pointer(bp + 432)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+432) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 432)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 432)) if !(*(*int32)(unsafe.Pointer(bp + 432)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -48347,121 +48718,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 436)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+436) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), bp+436) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 436)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 440)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 440)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) + *(*I64)(unsafe.Pointer(bp + 440)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 440)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 440))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 440)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 440)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 440)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+440) *(*I64)(unsafe.Pointer(bp + 440)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 440))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 440)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 440)))), 0, bp+436)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 436)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 436)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 440)) goto __8 @@ -48469,93 +48840,93 @@ __689: __107: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 448)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+448)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+448)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 448)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 448)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 448)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 448)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 448)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 448)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+448, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 36)), bp+448, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48568,7 +48939,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+448)).FnKey) -__706: +__715: ; goto __8 @@ -48583,81 +48954,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) - (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48667,38 +49038,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 480)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+480) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+480) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48706,205 +49077,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 36)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 36)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 484)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 484)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 36)))).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 + 36)), bp+484) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36)), bp+484) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 484)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 36))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 36)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) *(*int32)(unsafe.Pointer(bp + 492)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+492) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 492))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 492))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 492)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 36)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+496) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 496)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 496)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 496)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -48914,90 +49285,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+500) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+500) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+500) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) if !(*(*int32)(unsafe.Pointer(bp + 500)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 156 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49006,36 +49377,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 504)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 504)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 504)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 504)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 36)), bp+504, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 36)), bp+504, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 @@ -49046,88 +49417,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) - (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 536)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+536, bp+564) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 568)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+568) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+568) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -49139,35 +49510,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 568)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -49176,63 +49547,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 616)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 616)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 36)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 36)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+576, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+576) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+576) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+576)).Fn, (*Mem)(unsafe.Pointer(bp+576)).Fz, bp+616, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+576) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49241,13 +49612,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 644)) = 0 @@ -49255,20 +49626,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 644))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 644)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 644))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -49278,45 +49649,45 @@ __136: 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+648) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 40)) += *(*I64)(unsafe.Pointer(bp + 648)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 648)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -49329,10 +49700,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+656, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 656))) goto __8 @@ -49343,10 +49714,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -49354,30 +49725,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+120, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5872 + goto __797 +__796: + zSchema = ts + 5886 (*InitData)(unsafe.Pointer(bp + 660)).Fdb = db (*InitData)(unsafe.Pointer(bp + 660)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 660)).FpzErrMsg = p + 120 (*InitData)(unsafe.Pointer(bp + 660)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 660)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5886, + ts+5900, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 660)).Frc = SQLITE_OK @@ -49387,36 +49758,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+660, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 660)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+660)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -49424,10 +49795,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -49459,22 +49830,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+688) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 688)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 688)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -49484,15 +49855,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -49502,17 +49873,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+692) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 692))) -__803: +__812: ; goto check_for_interrupt @@ -49522,34 +49893,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49558,48 +49929,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 116 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5929, 0) + Xsqlite3VdbeError(tls, p, ts+5943, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -49607,10 +49978,10 @@ __817: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49632,24 +50003,24 @@ __818: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem1 = pFrame2 + 88 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 40 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49681,78 +50052,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 524)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 528)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 516)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 520)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 60)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49760,11 +50131,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49780,14 +50151,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 700)) -__838: +__847: ; goto __8 @@ -49795,16 +50166,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49812,16 +50183,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49832,10 +50203,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -49858,73 +50229,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -49934,22 +50305,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -49962,32 +50333,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+708+1*4, bp+708+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 708)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 708 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 40 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -49999,70 +50370,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5966, + ts+5980, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6018 + return ts + 6032 } - return ts + 6023 + return ts + 6037 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50070,17 +50441,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50090,10 +50461,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50107,10 +50478,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50120,69 +50491,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+144, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 36))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 36))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 36))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6030, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6044, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -50190,16 +50561,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -50212,17 +50583,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+720) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+120) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+720) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -50232,24 +50603,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 760)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50257,52 +50628,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+760) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 760)) + *(*uintptr)(unsafe.Pointer(pCur3 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 760)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 760))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5336, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5350, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pArgc = pQuery + 1*40 - pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 36)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 36)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -50311,54 +50682,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+764, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) @@ -50366,69 +50737,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 764)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+764, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36)), bp+764, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+764)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 764)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule rc = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -50440,27 +50811,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 28)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -50468,42 +50839,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 796)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50512,41 +50883,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 796)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50560,16 +50931,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50581,25 +50952,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50608,24 +50979,24 @@ __924: })(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+28) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+220, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50650,16 +51021,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 156 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 156 + 7*4))++ -__932: +__941: ; goto __8 @@ -50674,66 +51045,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 156 + 6*4))++ @@ -50754,73 +51125,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6065, + Xsqlite3_log(tls, rc, ts+6079, libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 28)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 156 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50828,13 +51199,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5313, 0) + Xsqlite3VdbeError(tls, p, ts+5327, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1463, 0) + Xsqlite3VdbeError(tls, p, ts+1483, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -50845,10 +51216,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6097, ts + 6106, ts + 6113, - ts + 6119} +var azType = [4]uintptr{ts + 6111, ts + 6120, ts + 6127, + ts + 6133} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -50897,16 +51272,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6131, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6145, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6160 + return ts + 6174 } return func() uintptr { if type1 == U32(7) { - return ts + 6165 + return ts + 6179 } - return ts + 6170 + return ts + 6184 }() }())) rc = SQLITE_ERROR @@ -50926,10 +51301,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6178, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6192, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -50939,8 +51314,8 @@ 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 { - bp := tls.Alloc(324) - defer tls.Free(324) + bp := tls.Alloc(328) + defer tls.Free(328) var nAttempt int32 var iCol int32 @@ -50960,7 +51335,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -50980,8 +51355,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -50989,21 +51364,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6198, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6212, 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+6228, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6242, 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+6264, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6278, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51012,8 +51387,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51046,8 +51421,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6285, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6299, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51074,7 +51449,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+36+uintptr(j)*8)).FiFrom == iCol) { goto __22 } - zFault = ts + 6306 + zFault = ts + 6320 __22: ; goto __20 @@ -51107,7 +51482,7 @@ __26: 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 + 6318 + zFault = ts + 6332 __29: ; goto __27 @@ -51127,8 +51502,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6326, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6340, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51197,7 +51572,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+320) + rc = blobSeekToRow(tls, pBlob, iRow, bp+324) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51225,12 +51600,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 320)) != 0 { - return ts + 3642 + if *(*uintptr)(unsafe.Pointer(bp + 324)) != 0 { + return ts + 3656 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 320)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 324)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51274,7 +51649,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51357,7 +51732,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51370,7 +51745,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53800,11 +54175,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -53964,7 +54335,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6360, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6374, zDb) == 0) { goto __8 } @@ -54085,7 +54456,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6365) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6379) != 0) { goto __33 } goto __14 @@ -54241,14 +54612,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6367, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6381, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6371, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6385, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -54265,7 +54636,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 8)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6375, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6389, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -54359,7 +54730,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 140)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54368,7 +54739,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 148)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54423,7 +54794,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6384, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6398, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -54431,14 +54802,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6415, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6429, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return WRC_Abort __87: ; @@ -54490,7 +54861,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6470, libc.VaList(bp+16, zCol)) + ts+6484, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+44, 0, uint32(unsafe.Sizeof(struct { FpTab uintptr @@ -54530,7 +54901,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6505 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6519 *(*uintptr)(unsafe.Pointer(pExpr + 20)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54543,23 +54914,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6514 + zErr = ts + 6528 } else { - zErr = ts + 6529 + zErr = ts + 6543 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6551, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54662,15 +55033,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6581 + var zIn uintptr = ts + 6595 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6609 + zIn = ts + 6623 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6627 + zIn = ts + 6641 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6645 + zIn = ts + 6659 } - Xsqlite3ErrorMsg(tls, pParse, ts+6663, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6677, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54749,10 +55120,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6683 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6697 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54799,7 +55170,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6694, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6708, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54863,7 +55234,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*20)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6711, libc.VaList(bp, pExpr)) + ts+6725, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54879,7 +55250,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6775, + Xsqlite3ErrorMsg(tls, pParse, ts+6789, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54893,7 +55264,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6811, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6825, uintptr(0), pExpr) } } else { @@ -54916,30 +55287,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6839, libc.VaList(bp+16, pExpr)) + ts+6853, 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 + 6882 + zType = ts + 6896 } else { - zType = ts + 6889 + zType = ts + 6903 } - Xsqlite3ErrorMsg(tls, pParse, ts+6899, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6913, 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+6927, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6941, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6949, + Xsqlite3ErrorMsg(tls, pParse, ts+6963, 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+6993, + ts+7007, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55011,7 +55382,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7041, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7055, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20))) } @@ -55027,7 +55398,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7052, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7066, pExpr, pExpr) } break @@ -55083,7 +55454,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55158,7 +55529,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7063, libc.VaList(bp, i, zType, mx)) + ts+7077, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55178,7 +55549,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7133, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55213,7 +55584,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7153, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7167, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55270,7 +55641,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 8 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7159, libc.VaList(bp, i+1)) + ts+7173, libc.VaList(bp, i+1)) return 1 } } @@ -55298,7 +55669,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7220, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7234, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55512,7 +55883,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7251, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7265, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55552,7 +55923,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7153) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55563,7 +55934,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7290) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7304) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55575,7 +55946,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7296, 0) + ts+7310, 0) return WRC_Abort } @@ -55675,12 +56046,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg @@ -55716,12 +56087,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*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)) @@ -55840,9 +56211,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) } if op == TK_COLUMN || op == TK_AGG_COLUMN { - if *(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0 { - return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) } if op == TK_SELECT { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList+8)).FpExpr) @@ -55930,14 +56299,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { - if *(*uintptr)(unsafe.Pointer(p + 44)) != uintptr(0) { - var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) - if j >= 0 { - var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) - pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) - } - break + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { + var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) + 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 @@ -56265,7 +56633,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return } @@ -56340,7 +56708,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7355, libc.VaList(bp, mxHeight)) + ts+7369, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -56508,12 +56876,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56584,12 +56957,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7403, + Xsqlite3ErrorMsg(tls, pParse, ts+7417, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7447 + return ts + 7461 } - return ts + 1527 + return ts + 1547 }(), nElem)) break } @@ -56628,7 +57001,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56654,7 +57027,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7451, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7465, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 20)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56682,7 +57055,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7485, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7499, libc.VaList(bp, pExpr)) } } } @@ -56729,7 +57102,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 116 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7505, + Xsqlite3ErrorMsg(tls, pParse, ts+7519, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 116 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56754,7 +57127,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 116 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7548, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7562, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56775,11 +57148,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56808,7 +57178,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -56904,7 +57278,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -57328,7 +57702,7 @@ __2: 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+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57451,7 +57825,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7601, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7615, libc.VaList(bp, zObject)) } } @@ -57461,10 +57835,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 20 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -57505,10 +57881,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6683) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6697) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6688) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6702) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -57939,13 +58315,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7624) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7652) == 0 { return 1 } return 0 @@ -58149,7 +58525,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7642, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7656, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58227,7 +58603,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { - goto __56 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - goto __60 -__59: - ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { - goto __61 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0) { - goto __63 - } aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) - goto __64 -__63: - aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) -__64: - ; if !(aff > SQLITE_AFF_BLOB) { - goto __65 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*16 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __70 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7889, + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, (*Expr)(unsafe.Pointer(pExpr)).Fop2) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { - goto __76 - } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) -__76: - ; return iReg -__6: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59621,7 +60036,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59635,10 +60050,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59651,8 +60066,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59660,12 +60075,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59691,10 +60106,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59705,14 +60118,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59742,27 +60157,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59771,9 +60186,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59781,15 +60196,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7942, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7956, libc.VaList(bp+8, pExpr)) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem __88: ; - goto __3 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59820,8 +60235,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7969, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7983, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -59943,8 +60358,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -59965,9 +60380,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -59980,13 +60395,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -59997,11 +60412,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60023,12 +60438,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60043,14 +60458,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60058,9 +60497,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60070,15 +60509,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60088,22 +60527,22 @@ __125: pTest = bp + 100 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 100)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60112,51 +60551,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*20)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*20)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7993, 0) + ts+8007, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60165,18 +60604,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8043)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8057)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -60388,7 +60827,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60627,6 +61066,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60853,6 +61293,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60998,7 +61439,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61524,7 +61969,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) } - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+28)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+28)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+28)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61542,8 +61989,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*20)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61611,6 +62057,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 8)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61634,7 +62082,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61657,7 +62107,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61670,7 +62120,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61690,7 +62142,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61830,7 +62284,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } - return *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61838,7 +62292,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -61889,11 +62343,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 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+8059, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -61905,13 +62359,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8087, + ts+8101, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8262, + ts+8276, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -61921,10 +62375,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8436, libc.VaList(bp, zDb, zDb)) + ts+8450, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8583, 0) + ts+8597, 0) } } @@ -61988,7 +62442,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8734, libc.VaList(bp, zName)) + ts+8748, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -61998,7 +62452,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8793, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8807, zName)) { goto __6 } goto exit_rename_table @@ -62007,7 +62461,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8813, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62048,19 +62502,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8826, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8840, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9010, + ts+9024, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9315, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9329, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9331, + ts+9345, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62068,7 +62522,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9389, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9403, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62080,7 +62534,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9654, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9668, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62092,7 +62546,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9667, + ts+9681, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62138,12 +62592,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9705, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9719, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9737, 0) + ts+9751, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62153,11 +62607,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 44 + 4)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9764) + ts+9778) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9823) + ts+9837) } if pDflt != 0 { @@ -62170,12 +62624,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9876) + ts+9890) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9922) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9936) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62186,7 +62640,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9949, + ts+9963, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 44)), zCol, *(*int32)(unsafe.Pointer(pNew + 44)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62208,7 +62662,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10095, + ts+10109, libc.VaList(bp+40, zTab, zDb)) } } @@ -62256,14 +62710,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10325, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10339, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10359, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10373, 0) goto exit_begin_add_column __4: ; @@ -62291,7 +62745,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nAlloc))) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10389, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10403, 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 } @@ -62331,18 +62785,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10408 + zType = ts + 10422 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10413 + zType = ts + 10427 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10427, + Xsqlite3ErrorMsg(tls, pParse, ts+10441, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10445 + return ts + 10459 } - return ts + 10462 + return ts + 10476 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62426,11 +62880,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -62443,17 +62897,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10501, + ts+10515, 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+10683, + ts+10697, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9654, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9668, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62648,7 +63102,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 268; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { + for pp = pParse + 272; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { @@ -62711,12 +63165,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10814, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10828, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -62756,8 +63210,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10839, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10853, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62774,7 +63228,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62796,7 +63250,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10847, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10861, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62836,12 +63290,12 @@ 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+10853, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10867, 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 + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63015,8 +63469,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr @@ -63099,15 +63553,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+20, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp + 20 - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + 20 + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63135,7 +63589,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63168,13 +63622,13 @@ __15: renameTokenFind(tls, bp+20, bp, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) __16: ; - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 20)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63187,7 +63641,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63202,7 +63656,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FaCol+uintptr(i)*16) - Xsqlite3WalkExpr(tls, bp+292, pExpr) + Xsqlite3WalkExpr(tls, bp+296, pExpr) goto __24 __24: i++ @@ -63258,8 +63712,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+20) @@ -63307,7 +63761,7 @@ __39: renameColumnIdlistNames(tls, bp+20, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) __35: ; __8: @@ -63327,7 +63781,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+20)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -63375,8 +63829,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(352) - defer tls.Free(352) + bp := tls.Alloc(356) + defer tls.Free(356) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63418,11 +63872,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 44)) - libc.Xmemset(tls, bp+320, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 320)).FpParse = bp + 48 + libc.Xmemset(tls, bp+324, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 324)).FpParse = bp + 48 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+320) + Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+324) if (*Parse)(unsafe.Pointer(bp+48)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 48)).Frc } else { @@ -63492,7 +63946,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*4))) } else if (*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0 { - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -63515,8 +63969,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63534,16 +63988,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + 272 + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp + 276 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63558,31 +64012,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+292, + Xsqlite3WalkExpr(tls, bp+296, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*16)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+272, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+276, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+272)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+276)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63600,8 +64054,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(304) - defer tls.Free(304) + bp := tls.Alloc(308) + defer tls.Free(308) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63627,9 +64081,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*U64)(unsafe.Pointer(db + 28)) |= 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 { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 272)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+272) + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 276)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+276) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63657,8 +64111,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(296) - defer tls.Free(296) + bp := tls.Alloc(300) + defer tls.Free(300) var db uintptr var iSchema int32 @@ -63695,7 +64149,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -63719,7 +64173,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10858, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10872, 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) @@ -63800,19 +64254,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pName)) goto exit_drop_column __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+10865, + Xsqlite3ErrorMsg(tls, pParse, ts+10879, 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 + 10893 + return ts + 10907 } - return ts + 6106 + return ts + 6120 }(), zCol)) goto exit_drop_column @@ -63821,7 +64275,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10905, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10919, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63835,13 +64289,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10953, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10967, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11074, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11088, 1) if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 @@ -63959,11 +64413,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11092}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11133}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11152}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11171}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11106}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11127}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11147}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11166}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11185}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -63997,7 +64451,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11194, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11208, 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) } @@ -64006,10 +64460,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+11217, + ts+11231, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11247, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11261, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64027,9 +64481,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11265, FzCols: ts + 11278}, - {FzName: ts + 11291, FzCols: ts + 11304}, - {FzName: ts + 11332}, + {FzName: ts + 11279, FzCols: ts + 11292}, + {FzName: ts + 11305, FzCols: ts + 11318}, + {FzName: ts + 11346}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64219,7 +64673,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11345} + FzName: ts + 11359} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -64470,7 +64924,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11355} + FzName: ts + 11369} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(72) @@ -64484,7 +64938,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11365, + Xsqlite3_str_appendf(tls, bp+24, ts+11379, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -64497,7 +64951,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11370, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11384, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64539,7 +64993,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11376, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11390, 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)).FnChar-- @@ -64553,7 +65007,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11382} + FzName: ts + 11396} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64597,7 +65051,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11391, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11405, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64614,7 +65068,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+11265, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11279, 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, -6) @@ -64770,7 +65224,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64827,7 +65281,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+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64874,9 +65328,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+11405) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11419) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11409) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11423) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -64959,7 +65413,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1527 + z = ts + 1547 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -64981,15 +65435,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+11413, z) == 0 { + if Xsqlite3_strglob(tls, ts+11427, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11424, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11438, 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+11434, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11448, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -65265,11 +65719,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11291, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11305, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11446, - ts+11500, + ts+11460, + ts+11514, zDb) } return rc @@ -65316,10 +65770,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11265, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11279, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11552, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11566, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65377,7 +65831,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6360, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6374, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -65407,20 +65861,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1527 + zFile = ts + 1547 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1527 + zName = ts + 1547 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 168 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3814) + *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3828) if !(*(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0)) { goto __5 } @@ -65436,13 +65890,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11593, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11607, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 116 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11596, + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11610, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 116 + 7*4)))) goto attach_error __7: @@ -65456,7 +65910,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11633, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11647, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -65467,7 +65921,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+464) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+468) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Db{}))*uint32(3))) @@ -65520,7 +65974,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11663, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11677, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65537,7 +65991,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, - ts+11692, 0) + ts+11706, 0) rc = SQLITE_ERROR __23: ; @@ -65603,13 +66057,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1463, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11760, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11774, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65656,7 +66110,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1527 + zName = ts + 1547 __1: ; i = 0 @@ -65687,14 +66141,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11788, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11802, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11809, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11823, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65702,7 +66156,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11835, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11849, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65813,7 +66267,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11857} + FzName: ts + 11871} // Called by the parser to compile an ATTACH statement. // @@ -65826,7 +66280,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11871} + FzName: ts + 11885} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65840,7 +66294,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11885, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11899, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65872,7 +66326,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+11909, + ts+11923, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66047,7 +66501,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11955, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11969, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66073,11 +66527,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+11978, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11984, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11998, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11990, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12004, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66124,7 +66578,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName } else { - zCol = ts + 7632 + zCol = ts + 7646 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66148,7 +66602,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+12017, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12031, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66242,6 +66696,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66269,9 +66725,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -66290,62 +66745,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) - } - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*20 + 16)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) } + } - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) } - - Xsqlite3VdbeGoto(tls, v, 1) } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -66392,13 +66839,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+196)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+200)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+196)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+200)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66423,25 +66870,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6360) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6374) == 0 { i = 0 } else { return uintptr(0) } } 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+8051, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12065) + ts+12079) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, - ts+5872) + ts+5886) } } } @@ -66462,12 +66909,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5872) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5886) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12065) + ts+12079) } } } @@ -66496,9 +66943,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12084, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+396, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12098, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -66509,21 +66956,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12092 + zMsg = ts + 12106 } else { - zMsg = ts + 12105 + zMsg = ts + 12119 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66553,12 +67000,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { - return ts + 12051 + if Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { + return ts + 12065 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { - return ts + 12032 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12079+7) == 0 { + return ts + 12046 } } return zName @@ -66663,10 +67110,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+464 { - libc.Xmemcpy(tls, db+464, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+468 { + libc.Xmemcpy(tls, db+468, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 464 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 468 } } @@ -66822,11 +67269,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 8))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66843,7 +67290,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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+24, zName, uintptr(0)) @@ -66872,7 +67319,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -66916,7 +67363,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5872) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5886) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -66942,7 +67389,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6360, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6374, zName) { goto __3 } @@ -66995,13 +67442,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+12119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12133, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12136, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12150, libc.VaList(bp, pName1)) return -1 } } else { @@ -67039,13 +67486,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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*4))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*4))) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8051, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8065, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12156, + Xsqlite3ErrorMsg(tls, pParse, ts+12170, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67205,9 +67652,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67223,7 +67670,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12212, 0) return __4: ; @@ -67251,9 +67698,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), zName) != 0) { goto __8 } @@ -67269,9 +67716,9 @@ __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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67302,12 +67749,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12239, + Xsqlite3ErrorMsg(tls, pParse, ts+12253, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67322,7 +67769,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12274, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67357,8 +67804,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - reg1 = libc.AssignPtrInt32(pParse+88, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) - reg2 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg1 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+96, 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) @@ -67379,7 +67826,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 132)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 136)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -67409,7 +67856,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12295, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12309, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67433,7 +67880,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12326, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67442,7 +67889,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 132)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 136)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -67453,7 +67900,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12295 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12309 (*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) @@ -67465,7 +67912,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12295, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12309, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -67499,7 +67946,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -67507,13 +67954,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12369, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12383, 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)).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+12376, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12390, 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)).Fn-- @@ -67550,7 +67997,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+12386, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67714,10 +68161,10 @@ 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+12412, + Xsqlite3ErrorMsg(tls, pParse, ts+12426, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12471, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Expr{}))) @@ -67748,7 +68195,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12498, 0) + ts+12512, 0) } } @@ -67793,7 +68240,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12550, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12564, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67882,7 +68329,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12591, 0) + ts+12605, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -67908,7 +68355,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*16)).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+72, 1) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+76, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -67977,7 +68424,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12647, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12661, 0) goto generated_done __2: ; @@ -67990,13 +68437,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12690, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12704, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12698, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12712, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68029,7 +68476,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12705, + Xsqlite3ErrorMsg(tls, pParse, ts+12719, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68150,13 +68597,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1527 - zSep2 = ts + 12736 - zEnd = ts + 4936 + zSep = ts + 1547 + zSep2 = ts + 12750 + zEnd = ts + 4950 } else { - zSep = ts + 12738 - zSep2 = ts + 12742 - zEnd = ts + 12747 + zSep = ts + 12752 + zSep2 = ts + 12756 + zEnd = ts + 12761 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68164,7 +68611,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12750, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12764, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -68198,16 +68645,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3642, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3656, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1527, - ts + 12764, - ts + 12770, - ts + 12775, - ts + 12780, + ts + 1547, + ts + 12778, + ts + 12784, + ts + 12789, + ts + 12794, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -68346,8 +68793,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 132)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 132)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 136)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 136)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -68474,7 +68921,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+392, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+396, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return 0 } @@ -68498,7 +68945,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+392, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+396, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return } @@ -68597,7 +69044,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -68614,10 +69061,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+12786, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) + ts+12800, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12819, + Xsqlite3ErrorMsg(tls, pParse, ts+12833, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68636,11 +69083,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+12846, 0) + ts+12860, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12896, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12910, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68674,7 +69121,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12928, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12942, 0) return } } @@ -68699,11 +69146,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8793 - zType2 = ts + 12972 + zType = ts + 8807 + zType2 = ts + 12986 } else { - zType = ts + 10408 - zType2 = ts + 12978 + zType = ts + 10422 + zType2 = ts + 12992 } if pSelect != 0 { @@ -68765,7 +69212,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 196 + pEnd2 = pParse + 200 } else { pEnd2 = pEnd } @@ -68774,11 +69221,11 @@ 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+12983, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12997, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12998, + ts+13012, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68794,13 +69241,13 @@ 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+13096, + ts+13110, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13138, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13152, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68815,7 +69262,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9315) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9329) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68845,7 +69292,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+13172, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13186, 0) goto create_view_fail __1: ; @@ -68861,7 +69308,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10408, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10422, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+4, pSelect) != 0) { goto __3 } @@ -68924,10 +69371,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -68945,12 +69389,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13208, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69010,6 +69450,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69069,13 +69516,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13238, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13252, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13253, + ts+13267, 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) } @@ -69116,10 +69563,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13320, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13334, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11217, + ts+11231, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69151,12 +69598,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13334, + ts+13348, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13379, + ts+13393, 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) @@ -69184,11 +69631,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3265, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7052, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7066, 10) == 0 { return 0 } return 1 @@ -69266,9 +69713,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zArg2 = uintptr(0) @@ -69327,21 +69774,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13446, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13460, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13474, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13488, 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+13508, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13522, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69353,7 +69800,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11409, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11423, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69417,7 +69864,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13540, + ts+13554, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -69429,7 +69876,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13603, 0) + ts+13617, 0) goto fk_end goto __7 __6: @@ -69514,7 +69961,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13697, + ts+13711, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -69741,12 +70188,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 8 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13743, + Xsqlite3ErrorMsg(tls, pParse, ts+13757, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13771 + return ts + 13785 } - return ts + 13777 + return ts + 13791 }())) return 1 } @@ -69867,7 +70314,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13782, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13796, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -69886,7 +70333,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13788, + ts+13802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -69912,26 +70359,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13838, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13852, 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+13866, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13880, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13891, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13905, 0) goto exit_create_index __17: ; @@ -69945,7 +70392,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13782, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13796, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -69957,10 +70404,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13925, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13939, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -69972,7 +70419,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13959, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13973, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70001,7 +70448,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13983, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13997, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70022,9 +70469,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70063,7 +70510,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13782) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13796) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70164,7 +70611,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14006, 0) + ts+14020, 0) goto exit_create_index __56: ; @@ -70178,6 +70625,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -70198,6 +70646,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) __61: ; __59: @@ -70379,7 +70828,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14067, libc.VaList(bp+48, 0)) + ts+14081, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70431,8 +70880,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14109, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14123, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -70478,12 +70927,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14126, + zStmt = Xsqlite3MPrintf(tls, db, ts+14140, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1527 + return ts + 1547 } - return ts + 14146 + return ts + 14160 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70491,7 +70940,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14154, + ts+14168, 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, @@ -70505,7 +70954,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14213, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14227, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70666,7 +71115,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14240, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14254, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70681,7 +71130,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14258, libc.VaList(bp+8, 0)) + ts+14272, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70692,9 +71141,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70720,9 +71169,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14331, + ts+14345, 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+11405, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11419, (*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) @@ -70803,6 +71252,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70810,7 +71260,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*8)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70856,7 +71306,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+14391, + Xsqlite3ErrorMsg(tls, pParse, ts+14405, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -70991,6 +71441,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71002,11 +71453,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 36 + 4))&0x2>>1)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 60))) @@ -71033,7 +71486,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71061,12 +71514,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14427, + Xsqlite3ErrorMsg(tls, pParse, ts+14441, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14463 + return ts + 14477 } - return ts + 14466 + return ts + 14480 }())) goto append_from_error __1: @@ -71235,7 +71688,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14472, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14486, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71271,9 +71724,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14478 + return ts + 14492 } - return ts + 14487 + return ts + 14501 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71298,7 +71751,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14472, ts + 14494, ts + 14478} +var az = [3]uintptr{ts + 14486, ts + 14508, ts + 14492} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71313,7 +71766,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14502, 0) + ts+14516, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71331,7 +71784,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11992, 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+14586, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14600, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71617,7 +72070,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14595, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71713,7 +72166,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+14641, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, zName)) } } } @@ -71813,7 +72266,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+436, zName) + pColl = Xsqlite3HashFind(tls, db+440, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71827,7 +72280,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*20)).FzName = pColl + 3*20 (*CollSeq)(unsafe.Pointer(pColl + 2*20)).Fenc = U8(SQLITE_UTF16BE) libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint32(nName)) - pDel = Xsqlite3HashInsert(tls, db+436, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+440, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -71906,7 +72359,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14671, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14685, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72033,7 +72486,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+420, zName) + p = Xsqlite3HashFind(tls, db+424, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72067,7 +72520,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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+420, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) + pOther = Xsqlite3HashInsert(tls, db+424, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72090,26 +72543,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(592) + defer tls.Free(592) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 16)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 576)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 560)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash Xsqlite3HashInit(tls, pSchema+40) Xsqlite3HashClear(tls, pSchema+24) - for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { - Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) + for pElem = (*Hash)(unsafe.Pointer(bp + 560)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+560) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 16)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 576)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+16) + Xsqlite3HashClear(tls, bp+576) Xsqlite3HashClear(tls, pSchema+56) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -72175,10 +72629,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14716, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -72191,19 +72661,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14702, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14749, 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+14731, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14778, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -72430,17 +72902,19 @@ __18: goto __20 } - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } - Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -72453,10 +72927,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+8)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -72465,15 +72939,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -72482,98 +72956,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+40) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.Xmemset(tls, aToOpen, 1, uint32(nIdx+1)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 40)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72581,138 +73055,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+48, bp+52) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 48))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 48)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 48)), *(*int32)(unsafe.Pointer(bp + 52)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 40 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14816) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72815,7 +73294,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+11265) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11279) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73045,7 +73524,7 @@ 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 + 6170, ts + 6165, ts + 7924, ts + 7919, ts + 6160} +var azType2 = [5]uintptr{ts + 6184, ts + 6179, ts + 7938, ts + 7933, ts + 6174} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73104,7 +73583,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) return } iVal = -iVal @@ -73408,7 +73887,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14799, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14846, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73598,7 +74077,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 8)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73711,13 +74190,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73740,7 +74233,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 116 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14804, -1) + Xsqlite3_result_error(tls, context, ts+14851, -1) return } if argc == 3 { @@ -73750,7 +74243,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14837, -1) + ts+14884, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73803,7 +74296,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73843,13 +74336,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4904, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4918, 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+14882, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14929, libc.VaList(bp+8, r1)) } } break @@ -73857,7 +74350,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1307, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1327, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -73886,13 +74379,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14889, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1528, 4) + Xsqlite3_str_append(tls, pStr, ts+1548, 4) break } @@ -74202,7 +74695,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10837} +var azOne = [1]uintptr{ts + 10851} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74214,7 +74707,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1527 + zIn = ts + 1547 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -74238,7 +74731,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14892, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14939, 4, uintptr(0)) } } @@ -74263,7 +74756,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12017, -1) + Xsqlite3_result_error(tls, context, ts+12031, -1) return } @@ -74341,7 +74834,7 @@ func sumFinalize(tls *libc.TLS, context 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+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74603,7 +75096,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14897, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14944, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74623,14 +75116,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14903, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14903, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74870,107 +75363,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14908}, - {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 + 14928}, - {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 + 14941}, - {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 + 14959}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14968}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14991}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15017}, - {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 + 15042}, - {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 + 15051}, - {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 + 15062}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15095}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15095}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15100}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15100}, - {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 + 15100}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15104}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15104}, - {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 + 15104}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15108}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15136}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15179}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15185}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15189}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15236}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15253}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15296}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15310}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {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 + 15344}, - {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 + 15348}, - {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 + 15354}, - {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 + 15358}, - {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 + 15358}, - {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 + 15364}, - {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 + 15364}, - {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 + 15377}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15387}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, - {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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15407}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15429}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(2), 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 + 15443}, + {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 + 14955}, + {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 + 14975}, + {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 + 14988}, + {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 + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15015}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15038}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15064}, + {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 + 15089}, + {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 + 15098}, + {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 + 15109}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15130}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15130}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15136}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15136}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15142}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15142}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15147}, + {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 + 15147}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15151}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15151}, + {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 + 15151}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15155}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15170}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15183}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(1), 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 + 15205}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, + {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 + 15220}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15226}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15236}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15243}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15283}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15300}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15311}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15335}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15343}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15357}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {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 + 15391}, + {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 + 15395}, + {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 + 15401}, + {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 + 15405}, + {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 + 15405}, + {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 + 15411}, + {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 + 15411}, + {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 + 15424}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {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 + 15442}, {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(2), 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 + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15457}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15457}, {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 + 15476}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15481}, - {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}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15503}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15509}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, - {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 + 15533}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6505}, - {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 + 15538}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(2), 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 + 15490}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15495}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15511}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15515}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15523}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15528}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15533}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15544}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15550}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15556}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15561}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15569}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15580}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6519}, + {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 + 15585}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75091,7 +75584,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+15542, + ts+15589, 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) @@ -75751,8 +76244,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6371, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6367, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6385, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6381, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75831,7 +76324,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 40)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName (*Token)(unsafe.Pointer(bp + 40)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+40)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5115) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5129) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -75933,7 +76426,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 44 + 4)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76041,6 +76534,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).Faffinity + } + } + for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76081,13 +76595,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76099,21 +76612,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).Faffinity - } - } - for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -76184,7 +76687,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -76242,7 +76745,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7889, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76545,6 +77048,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76708,7 +77213,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15587, + ts+15634, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -76733,7 +77238,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15628, + Xsqlite3ErrorMsg(tls, pParse, ts+15675, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76882,7 +77387,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15660, + ts+15707, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -76892,7 +77397,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15712, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15759, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -76944,7 +77449,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15737, + Xsqlite3ErrorMsg(tls, pParse, ts+15784, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -76952,7 +77457,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15830, 0) goto insert_cleanup __57: ; @@ -77134,7 +77639,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*20)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*20)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77149,137 +77667,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*20)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { - goto __107 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -77291,64 +77809,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 144)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+144, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 144)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15804) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15851) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -77356,7 +77878,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77658,7 +78184,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11992, 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) @@ -78748,13 +79274,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1527 + zSql = ts + 1547 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -79193,6 +79719,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79231,7 +79758,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12017, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12031, 0) __3: ; return SQLITE_ERROR @@ -79240,7 +79767,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15818 + zEntry = ts + 15865 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79255,7 +79782,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11978, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79291,7 +79818,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15841, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15888, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79305,7 +79832,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15850, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15897, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79329,7 +79856,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15854, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15901, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79347,7 +79874,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15860, libc.VaList(bp+16, zEntry, zFile)) + ts+15907, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -79374,7 +79901,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15903, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15950, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -79412,7 +79939,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15935, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15982, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -79422,7 +79949,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15972, + ts + 16019, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79577,7 +80104,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15975, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16022, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79585,63 +80112,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5036, - ts + 16014, - ts + 8793, - ts + 16018, - ts + 16023, - ts + 16026, - ts + 16036, - ts + 16046, - ts + 16052, - ts + 16056, + ts + 5050, ts + 16061, - ts + 16066, - ts + 16074, - ts + 16085, - ts + 16088, - ts + 16095, - ts + 16056, - ts + 16061, - ts + 16102, - ts + 16107, - ts + 16110, - ts + 16117, - ts + 16052, - ts + 16056, - ts + 16123, - ts + 16128, - ts + 16133, - ts + 16056, - ts + 16137, - ts + 16061, - ts + 16145, + ts + 8807, + ts + 16065, + ts + 16070, + ts + 16073, + ts + 16083, + ts + 16093, + ts + 16099, + ts + 16103, + ts + 16108, + ts + 16113, + ts + 16121, + ts + 16132, + ts + 16135, + ts + 16142, + ts + 16103, + ts + 16108, ts + 16149, ts + 16154, - ts + 11409, - ts + 11405, - ts + 16160, - ts + 16165, + ts + 16157, + ts + 16164, + ts + 16099, + ts + 16103, ts + 16170, - ts + 16014, - ts + 16056, ts + 16175, - ts + 16182, - ts + 16189, - ts + 8793, - ts + 16197, - ts + 5039, - ts + 16203, - ts + 16014, - ts + 16056, - ts + 16208, - ts + 16213, - ts + 15410, - ts + 16218, - ts + 16231, - ts + 16240, - ts + 16247, - ts + 16258, + ts + 16180, + ts + 16103, + ts + 16184, + ts + 16108, + ts + 16192, + ts + 16196, + ts + 16201, + ts + 11423, + ts + 11419, + ts + 16207, + ts + 16212, + ts + 16217, + ts + 16061, + ts + 16103, + ts + 16222, + ts + 16229, + ts + 16236, + ts + 8807, + ts + 16244, + ts + 5053, + ts + 16250, + ts + 16061, + ts + 16103, + ts + 16255, + ts + 16260, + ts + 15457, + ts + 16265, + ts + 16278, + ts + 16287, + ts + 16294, + ts + 16305, } // Definitions of all built-in pragmas @@ -79658,238 +80185,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16266, + {FzName: ts + 16313, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16281, + {FzName: ts + 16328, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16296, + {FzName: ts + 16343, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16308, + {FzName: ts + 16355, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16324, + {FzName: ts + 16371, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16247, + {FzName: ts + 16294, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16337, + {FzName: ts + 16384, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16349, + {FzName: ts + 16396, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16369, + {FzName: ts + 16416, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16385, + {FzName: ts + 16432, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16406, + {FzName: ts + 16453, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16421, + {FzName: ts + 16468, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16437, + {FzName: ts + 16484, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16451, + {FzName: ts + 16498, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16464, + {FzName: ts + 16511, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16478, + {FzName: ts + 16525, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16497, + {FzName: ts + 16544, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16516, + {FzName: ts + 16563, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16539, + {FzName: ts + 16586, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16548, + {FzName: ts + 16595, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16566, + {FzName: ts + 16613, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16583, + {FzName: ts + 16630, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16596, + {FzName: ts + 16643, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16611, + {FzName: ts + 16658, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16629, + {FzName: ts + 16676, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16639, + {FzName: ts + 16686, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16653, + {FzName: ts + 16700, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16669, + {FzName: ts + 16716, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16694, + {FzName: ts + 16741, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16713, + {FzName: ts + 16760, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16724, + {FzName: ts + 16771, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16735, + {FzName: ts + 16782, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16747, + {FzName: ts + 16794, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16763, + {FzName: ts + 16810, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16776, + {FzName: ts + 16823, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16795, + {FzName: ts + 16842, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16814, + {FzName: ts + 16861, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16827, + {FzName: ts + 16874, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16842, + {FzName: ts + 16889, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16852, + {FzName: ts + 16899, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16873, + {FzName: ts + 16920, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16884, + {FzName: ts + 16931, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16894, + {FzName: ts + 16941, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16906, + {FzName: ts + 16953, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16917, + {FzName: ts + 16964, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16929, + {FzName: ts + 16976, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16946, + {FzName: ts + 16993, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16965, + {FzName: ts + 17012, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16991, + {FzName: ts + 17038, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17006, + {FzName: ts + 17053, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17020, + {FzName: ts + 17067, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17039, + {FzName: ts + 17086, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17053, + {FzName: ts + 17100, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17069, + {FzName: ts + 17116, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17081, + {FzName: ts + 17128, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17092, + {FzName: ts + 17139, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17103, + {FzName: ts + 17150, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17115, + {FzName: ts + 17162, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17126, + {FzName: ts + 17173, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17147, + {FzName: ts + 17194, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17155, + {FzName: ts + 17202, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17170, + {FzName: ts + 17217, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17183, + {FzName: ts + 17230, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17202, + {FzName: ts + 17249, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17217, + {FzName: ts + 17264, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -79911,7 +80438,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17233)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17280)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -79923,10 +80450,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17258) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17305) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17268) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17315) { return PAGER_LOCKINGMODE_NORMAL } } @@ -79935,13 +80462,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7937) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7951) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17280) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17327) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -79956,9 +80483,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16208) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16255) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17292) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17339) == 0 { return 2 } else { return 0 @@ -79972,7 +80499,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17299, 0) + ts+17346, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -80063,19 +80590,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17361 + zName = ts + 17408 break case OE_SetDflt: - zName = ts + 17370 + zName = ts + 17417 break case OE_Cascade: - zName = ts + 17382 + zName = ts + 17429 break case OE_Restrict: - zName = ts + 17390 + zName = ts + 17437 break default: - zName = ts + 17399 + zName = ts + 17446 break } return zName @@ -80092,7 +80619,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17409, ts + 17416, ts + 17424, ts + 17428, ts + 17292, ts + 17437, + ts + 17456, ts + 17463, ts + 17471, ts + 17475, ts + 17339, ts + 17484, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80139,13 +80666,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17441 + zType = ts + 17488 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17443 + zType = ts + 17490 } else { - zType = ts + 7447 + zType = ts + 7461 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17445, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17492, 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), @@ -80153,7 +80680,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17452, ts + 17457, ts + 17465} +var azEnc = [4]uintptr{uintptr(0), ts + 17499, ts + 17504, ts + 17512} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80178,8 +80705,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(568) - defer tls.Free(568) + bp := tls.Alloc(612) + defer tls.Free(612) var zLeft uintptr var zRight uintptr @@ -80286,13 +80813,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -80312,6 +80848,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -80362,7 +80900,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -80377,7 +80915,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -80387,7 +80925,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17473, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17520, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -80404,30 +80942,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 444)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 444 + 1*4)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 444 + 2*4)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 444 + 3*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484 + 1*4)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 484 + 2*4)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 484 + 3*4)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+444) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+484) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 444)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 444))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 484)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 484))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 444)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 484)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 444)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 484)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80648,7 +81186,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17477) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17524) == 0) { goto __64 } b = 2 @@ -80682,7 +81220,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -80691,36 +81229,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+460) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+500) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 460)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 500)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 460)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 500)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 460)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 500)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17268 + zRet = ts + 17315 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80758,7 +81296,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17258 + zRet = ts + 17305 __83: ; returnSingleText(tls, v, zRet) @@ -80839,21 +81377,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 468)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 508)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+468) - if !(*(*I64)(unsafe.Pointer(bp + 468)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+508) + if !(*(*I64)(unsafe.Pointer(bp + 508)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 468)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 508)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 468)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 468))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 468))) + *(*I64)(unsafe.Pointer(bp + 508)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 508))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 508))) goto __15 __23: @@ -80895,15 +81433,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 476)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+476) != 0) || *(*int32)(unsafe.Pointer(bp + 476)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 516)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+516) != 0) || *(*int32)(unsafe.Pointer(bp + 516)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 476)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 516)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 476)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 516)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -80940,14 +81478,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 480)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+480) != 0) { + *(*int32)(unsafe.Pointer(bp + 520)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+520) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 480))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 520))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 480)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 520)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 28)) |= uint64(SQLITE_CacheSpill) @@ -80966,17 +81504,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+484) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+524) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -80987,7 +81525,7 @@ __114: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).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)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 484))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 524))) __117: ; goto __115 @@ -80999,12 +81537,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+484) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+524) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 484))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 524))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81041,11 +81579,11 @@ __123: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+492) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 492)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+532) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 532)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17482, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17529, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81064,7 +81602,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81086,7 +81624,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17507, 0) + ts+17554, 0) goto __133 __132: if !(iDb != 1) { @@ -81140,7 +81678,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17560) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17607) == 0) { goto __142 } @@ -81237,13 +81775,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17566 + return ts + 17613 } - return ts + 17574 + return ts + 17621 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1527), + Xsqlite3ColumnType(tls, pCol, ts+1547), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 { return 1 @@ -81308,20 +81846,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17581, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17628, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 496)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+496, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 496))) + *(*uintptr)(unsafe.Pointer(bp + 536)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+536, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 536))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -81354,29 +81892,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10408 + zType = ts + 10422 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12690 + zType = ts + 12704 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17597 + zType = ts + 17644 goto __183 __182: - zType = ts + 8793 + zType = ts + 8807 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17651, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -81442,7 +81980,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -81452,7 +81990,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17616, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17663, 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)))) @@ -81489,12 +82027,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 500)) = [3]uintptr{ts + 17621, ts + 17623, ts + 16085} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17625, + *(*[3]uintptr)(unsafe.Pointer(bp + 540)) = [3]uintptr{ts + 17668, ts + 17670, ts + 16132} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17672, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 500 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), + *(*uintptr)(unsafe.Pointer(bp + 540 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -81523,7 +82061,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17631, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17678, 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))) @@ -81539,13 +82077,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 436)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 440)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17635, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17682, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81584,7 +82122,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 420)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 424)).Ffirst __212: if !(j != 0) { goto __214 @@ -81603,13 +82141,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 392)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 396)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81625,7 +82163,7 @@ __218: if !(i6 < int32(uint32(unsafe.Sizeof(aPragmaName))/uint32(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -81660,7 +82198,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81668,7 +82206,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17647)) + ts+17694)) goto __227 __227: j2++ @@ -81741,20 +82279,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 552)) = 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+512, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 512)) == uintptr(0)) { + 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 + 512)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 512))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) __242: ; goto __240 @@ -81792,12 +82330,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 516)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 556)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+512, bp+516) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+556) __248: ; @@ -81814,8 +82352,8 @@ __250: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __252 } - if *(*uintptr)(unsafe.Pointer(bp + 516)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 516)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 556)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 556)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 36 + uintptr(j3)*8)).FiFrom } @@ -81828,11 +82366,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 512)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 512))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -81857,10 +82395,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17652, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17699, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 556))) goto __246 __246: i8++ @@ -81898,17 +82436,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 520)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+520) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+560) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 520)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 560)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 520)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -81924,7 +82462,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 520))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 560))-1, 1) i9 = 0 __264: @@ -82074,7 +82612,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+17656, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17703, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82101,178 +82639,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+524, bp+528) + 1, uintptr(0), bp+564, bp+568) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 524)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 564)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 564)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 524)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17727, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 564)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*16 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 524)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 572)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+572) + if !(*(*uintptr)(unsafe.Pointer(bp + 572)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 572))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 572))) +__318: + ; +__317: ; + p11 = *(*int32)(unsafe.Pointer(bp + 564)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17763, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17783, + libc.VaList(bp+392, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17805, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17828, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17830, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 524)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 564)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*20)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17722, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17850, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 524)), 0, 0, bp+532, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 564)), 0, 0, bp+576, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 528))+j4, ckUniq, r1, + 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+17752) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17880) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17757) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17885) 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) @@ -82280,87 +82947,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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)*16 + 4))&0xf>>0)) != 0) { - goto __323 + goto __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 528))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 528))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17778) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17906) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 532))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 576))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 524)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 564)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17805) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17933) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 528))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 568))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -82378,14 +83051,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(endCode))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 520)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 560)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17834 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17962 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -82393,27 +83066,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -82422,25 +83095,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 8 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17837, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17965, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -82448,50 +83121,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(setCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp2 = iCookie (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp5 = U16(1) - goto __340 -__339: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(readCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) -__340: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -82506,31 +83186,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17275) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17322) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17862) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17990) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17428) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17475) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -82540,10 +83220,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -82563,19 +83243,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82584,86 +83264,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__359: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 56))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17870, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17998, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82671,60 +83351,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+536) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+580) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 536))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 580))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+544) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+588) == SQLITE_OK) { + goto __395 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)))) { - goto __373 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 588)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 588)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 588))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+552) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+596) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 596)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 552))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 596))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+560) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 560)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+604) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 604)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 560)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 604)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82732,10 +83412,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82768,6 +83448,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82779,14 +83467,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17888, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17893, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17899, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17908, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17917, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17925, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17933}, - {FzName: ts + 17940}, + {FzName: ts + 18016, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18021, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18045, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18053, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18061}, + {FzName: ts + 18068}, {}, } var setCookie = [2]VdbeOpList{ @@ -82838,7 +83526,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+17946) + Xsqlite3_str_appendall(tls, bp+32, ts+18074) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82846,7 +83534,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17961, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18089, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -82859,19 +83547,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, 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+17974) + Xsqlite3_str_appendall(tls, bp+32, ts+18102) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17986) + Xsqlite3_str_appendall(tls, bp+32, ts+18114) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4936, 1) + Xsqlite3_str_append(tls, bp+32, ts+4950, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+56) @@ -82887,7 +83575,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83035,7 +83723,7 @@ __1: var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) == uintptr(0) { return SQLITE_NOMEM } @@ -83051,13 +83739,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+18001) + Xsqlite3_str_appendall(tls, bp+32, ts+18129) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18009, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18137, 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+18013, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18141, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83066,7 +83754,7 @@ __3: rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+4, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83134,33 +83822,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18017, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+18145, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*4)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*4)) } else { - zObj = ts + 4987 + zObj = ts + 5001 } - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18173, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18076, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18204, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18084, - ts + 18091, - ts + 18103, + ts + 18212, + ts + 18219, + ts + 18231, } // Check to see if any sibling index (another index on the same table) @@ -83220,7 +83908,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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } libc.SetBitFieldPtr8Uint32(db+168+8, uint32(0), 0, 0x1) @@ -83252,13 +83940,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+18114) + corruptSchema(tls, pData, argv, ts+18242) } 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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } } @@ -83291,16 +83979,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8793 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8807 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7857 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18127 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7871 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18255 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40)).FiDb = iDb @@ -83385,7 +84073,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11692) + ts+11706) rc = SQLITE_ERROR goto initone_error_out __13: @@ -83420,7 +84108,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+18199) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18327) rc = SQLITE_ERROR goto initone_error_out __17: @@ -83434,7 +84122,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18223, + ts+18351, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83617,16 +84305,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83694,20 +84386,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var rc int32 var i int32 @@ -83719,8 +84411,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83729,7 +84421,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1463, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1483, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -83740,7 +84432,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83760,7 +84452,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18257, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18385, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83776,100 +84468,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 116 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18287, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18415, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr((int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) - goto __13 -__12: - (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3642, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3656, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83882,7 +84578,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -83981,7 +84677,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84124,7 +84820,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -84299,8 +84995,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10837 - var zSp2 uintptr = ts + 10837 + var zSp1 uintptr = ts + 10851 + var zSp2 uintptr = ts + 10851 if pB == uintptr(0) { zSp1++ } @@ -84308,13 +85004,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18306, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18434, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18336)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18464)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -84489,7 +85185,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 48)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18370, libc.VaList(bp, 0)) + ts+18498, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -84534,7 +85230,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18420, libc.VaList(bp+8, zName)) + ts+18548, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -84545,7 +85241,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*68 + 36 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*68 + 48)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18484, + Xsqlite3ErrorMsg(tls, pParse, ts+18612, libc.VaList(bp+16, zName)) break } @@ -84589,7 +85285,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6505, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6519, Fn: uint32(8)} // 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. @@ -84936,6 +85632,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85111,7 +85810,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -85173,16 +85872,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18521 + z = ts + 18649 break case TK_INTERSECT: - z = ts + 18531 + z = ts + 18659 break case TK_EXCEPT: - z = ts + 18541 + z = ts + 18669 break default: - z = ts + 18548 + z = ts + 18676 break } return z @@ -85192,7 +85891,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18554, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18682, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -85398,8 +86097,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1092 - *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16197 + zType = ts + 1112 + *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16244 } else { *(*uintptr)(unsafe.Pointer(bp + 40)) = (*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)) @@ -85538,13 +86237,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16197 + zCol = ts + 16244 } 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+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11992, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85552,7 +86251,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+18577, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85642,7 +86341,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16197 + zName = ts + 16244 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85652,7 +86351,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18577, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 48)) = U32(0) @@ -85668,7 +86367,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18586, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18714, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -85955,7 +86654,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18594, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18722, 0) return __1: ; @@ -86046,7 +86745,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18643, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18771, 0) goto end_of_recursive_query __15: ; @@ -86066,7 +86765,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18685, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86103,7 +86802,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18691, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18819, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86137,11 +86836,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+18706, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18834, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1527 + return ts + 1547 } - return ts + 18729 + return ts + 18857 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86242,8 +86941,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18731, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18746, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18859, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18874, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -86290,7 +86989,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18521, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18649, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -86357,7 +87056,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -86419,7 +87118,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -86572,10 +87271,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18786, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18914, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18832, + ts+18960, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86829,8 +87528,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7153) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7153) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7167) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86857,13 +87556,13 @@ 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+18914, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19042, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18925, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19053, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86875,7 +87574,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+18930, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19058, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -86976,7 +87675,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87001,6 +87700,7 @@ type SubstContext1 = struct { FiNewTable int32 FisOuterJoin int32 FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87017,7 +87717,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87054,7 +87754,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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)*20)).FpExpr + var iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*20)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87065,6 +87766,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87089,15 +87791,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1072 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*20)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1092 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -87274,9 +87981,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(52) + defer tls.Free(52) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -87345,7 +88059,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -87361,17 +88074,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*68)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 48)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -87392,7 +88096,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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)*20 + 16))) == 0 { return 0 @@ -87404,6 +88107,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*20)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*20)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87559,6 +88273,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87582,8 +88297,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+20, pParse) - Xsqlite3WalkSelect(tls, bp+20, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+24, pParse) + Xsqlite3WalkSelect(tls, bp+24, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87759,8 +88474,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(24) + defer tls.Free(24) var pNew uintptr var nChng int32 = 0 @@ -87777,6 +88492,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87806,6 +88526,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87839,12 +88560,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15100) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15147) == 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+15104) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15151) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -87910,7 +88631,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+18936, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19064, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -87993,7 +88714,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18954, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19082, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88122,7 +88843,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+18977, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 60)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19105, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 60)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 8, 0x100) @@ -88148,7 +88869,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18997, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19125, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88164,7 +88885,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19040 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19168 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -88190,7 +88911,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+19063, + Xsqlite3ErrorMsg(tls, pParse, ts+19191, 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 @@ -88201,9 +88922,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 + 19101 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19229 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19135 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19263 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88230,9 +88951,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -88250,7 +88971,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+19173, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19301, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -88362,7 +89083,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19177, + Xsqlite3ErrorMsg(tls, pParse, ts+19305, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -88381,7 +89102,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+19216, + Xsqlite3ErrorMsg(tls, pParse, ts+19344, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -88389,7 +89110,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x80>>7)) != 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+19247, + Xsqlite3ErrorMsg(tls, pParse, ts+14716, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -88490,7 +89211,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName } else { - zSchemaName = ts + 6365 + zSchemaName = ts + 6379 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -88505,7 +89226,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*20 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19280, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19375, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 7, 0x80) } @@ -88570,7 +89291,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19285, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19380, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88582,7 +89303,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88601,9 +89322,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19294, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19389, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19407, 0) } } } @@ -88613,7 +89334,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+19332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19427, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88763,13 +89484,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19363, 0) + ts+19458, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19414, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19509, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -88950,19 +89671,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19447, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19542, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19459 + return ts + 19554 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1527 + return ts + 1547 }())) } } @@ -88975,7 +89696,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7857) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89133,7 +89854,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -89232,7 +89952,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19482, + ts+19577, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -89293,7 +90013,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19536, + Xsqlite3ErrorMsg(tls, pParse, ts+19631, 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 __15: @@ -89397,7 +90117,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1527, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1547, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -89407,7 +90127,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 216)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 36 + 4))&0x100>>8) == 0 || @@ -89439,7 +90159,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19576, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19671, 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), 5, 0x20) @@ -89497,8 +90217,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19591, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19686, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+88) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+88)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -89532,7 +90255,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 216)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89625,16 +90348,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 32)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89643,13 +90371,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89661,52 +90389,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89724,111 +90452,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+116, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 20 - goto __76 goto __78 __78: + k-- + pItem2 += 20 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 20 - goto __79 goto __81 __81: + k-- + pItem2 += 20 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*20)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*20)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+128, 0, uint32(unsafe.Sizeof(NameContext{}))) @@ -89847,33 +90575,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+128, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+128, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+128, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+160) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*20)).FpFExpr @@ -89881,28 +90609,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+128, *(*uintptr)(unsafe.Pointer(pExpr + 20))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+128, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 128 + 24)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -89913,7 +90641,7 @@ __98: (*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 + 20)) != uintptr(0)) { - goto __101 + goto __102 } pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) + 8)).FpExpr pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) @@ -89924,7 +90652,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -89950,7 +90678,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -89963,27 +90691,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19607 + return ts + 19702 } - return ts + 19616 + return ts + 19711 }()) groupBySort = 1 @@ -89991,49 +90719,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*20)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*20 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90047,45 +90775,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*20)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90104,16 +90832,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90144,16 +90872,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90166,98 +90894,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) @@ -90266,79 +90994,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 160)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19607) -__147: + explainTempTable(tls, pParse, ts+19702) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19625 + return ts + 19720 } - return ts + 19648 + return ts + 19743 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -90412,7 +91140,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) + z = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) if !(z == uintptr(0)) { goto __10 } @@ -90434,7 +91162,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19657, 0) + ts+19752, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -90530,7 +91258,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3642, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90622,7 +91350,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -90667,7 +91395,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+19722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19817, 0) goto trigger_cleanup __3: ; @@ -90711,7 +91439,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19768, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19863, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -90729,7 +91457,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19776, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19871, 0) goto trigger_orphan_error __11: ; @@ -90741,7 +91469,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19768, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19863, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90756,7 +91484,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19817, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90768,22 +91496,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19938, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19881, + Xsqlite3ErrorMsg(tls, pParse, ts+19976, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19918 + return ts + 20013 } - return ts + 19925 + return ts + 20020 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90792,7 +91520,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19931, libc.VaList(bp+24, pTableName+8)) + ts+20026, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90821,9 +91549,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -90941,7 +91669,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19768, bp+56) + Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19863, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -90974,7 +91702,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19977, + ts+20072, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -90999,13 +91727,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20025, + ts+20120, libc.VaList(bp+16, (*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+20100, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20195, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -91261,7 +91989,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20129, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20224, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -91300,9 +92028,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -91314,7 +92042,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20149, + ts+20244, 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) @@ -91428,12 +92156,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20211, + ts+20306, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20259 + return ts + 20354 } - return ts + 20266 + return ts + 20361 }())) __15: ; @@ -91547,7 +92275,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20273, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20368, 0) return 1 } @@ -91598,7 +92326,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 132)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 136)) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+76, 0, uint32(unsafe.Sizeof(SrcList{}))) @@ -91667,7 +92395,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91730,8 +92458,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(312) - defer tls.Free(312) + bp := tls.Alloc(316) + defer tls.Free(316) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91764,26 +92492,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 16 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+280, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 280)).FpParse = bp + 8 + libc.Xmemset(tls, bp+284, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 284)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20315, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20410, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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+280, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+284, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91800,7 +92528,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt transferParseError(tls, pParse, bp+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+96) + (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+100) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -91993,10 +92721,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(4) defer tls.Free(4) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) var enc U8 = (*Sqlite3)(unsafe.Pointer(Xsqlite3VdbeDb(tls, v))).Fenc - var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), Xsqlite3ColumnExpr(tls, pTab, pCol), enc, @@ -92005,7 +92735,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -92367,7 +93097,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20329, + ts+20424, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -92399,7 +93129,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20365, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20460, 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: @@ -92409,7 +93139,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7632 + return ts + 7646 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16)).FzCnName }(), @@ -93279,7 +94009,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20384) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20479) __169: ; update_cleanup: @@ -93585,10 +94315,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+20397, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20492, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20401, libc.VaList(bp+8, bp+152)) + ts+20496, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -93679,7 +94409,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+12119, -1) + ts+12133, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93711,7 +94441,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20474, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20478, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20569, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20573, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93848,23 +94578,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20482) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20577) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20522) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) return SQLITE_ERROR __2: ; @@ -93875,7 +94607,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20565) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20660) return SQLITE_ERROR __5: ; @@ -93884,7 +94616,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 56)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1527 + zOut = ts + 1547 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -93903,7 +94635,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20583, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20678, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -93923,20 +94655,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20606) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20701) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __7: ; nRes = Xsqlite3BtreeGetRequestedReserve(tls, pMain) Xsqlite3BtreeSetCacheSize(tls, pTemp, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema)).Fcache_size) Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) - Xsqlite3BtreeSetPagerFlags(tls, pTemp, uint32(PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14472) + rc = execSql(tls, db, pzErrMsg, ts+14486) if !(rc != SQLITE_OK) { goto __9 } @@ -93981,7 +94715,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20633, + ts+20728, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -93990,7 +94724,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20741, + ts+20836, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94001,7 +94735,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20795, + ts+20890, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94012,7 +94746,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20946, + ts+21041, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94134,7 +94868,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+392, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+396, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -94176,7 +94910,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 396)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -94333,7 +95067,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 44 + 4)) != 0 { @@ -94357,7 +95091,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -94441,11 +95175,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21076, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21171, libc.VaList(bp, pParse+192)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21100, + ts+21195, 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, @@ -94455,7 +95189,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21199, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21294, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -94489,7 +95223,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 252 + var pArg uintptr = pParse + 256 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 @@ -94516,7 +95250,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+21218, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21313, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94554,9 +95288,9 @@ 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+21260, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3642, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94566,7 +95300,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 + 21290 + var zFormat uintptr = ts + 21385 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94578,12 +95312,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) = pVTable for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { - var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1527) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1547) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16088, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16135, 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 @@ -94636,17 +95370,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+392, zMod) + pMod = Xsqlite3HashFind(tls, db+396, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21336, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21431, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94695,10 +95429,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+392, zMod) + pMod = Xsqlite3HashFind(tls, db+396, zMod) 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+21336, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21431, 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) @@ -94718,8 +95452,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(280) - defer tls.Free(280) + bp := tls.Alloc(284) + defer tls.Free(284) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94732,7 +95466,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94774,7 +95508,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95142,7 +95876,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -95185,7 +95919,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -95212,7 +95946,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -95435,31 +96169,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21355 + return ts + 21450 } if i == -1 { - return ts + 16197 + return ts + 16244 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -95468,35 +96184,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } - Xsqlite3_str_append(tls, pStr, ts+4987, 1) + Xsqlite3_str_append(tls, pStr, ts+5001, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } } @@ -95513,29 +96229,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21370, 2) + Xsqlite3_str_append(tls, pStr, ts+21465, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21373 + return ts + 21468 } - return ts + 21378 + return ts + 21473 }(), 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))), j, i, ts+21386) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21481) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21388) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21483) } - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95576,11 +96292,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21390, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21485, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21396 + return ts + 21491 } - return ts + 21403 + return ts + 21498 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95590,43 +96306,43 @@ 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 + 10893 + zFmt = ts + 10907 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21408 + zFmt = ts + 21503 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21441 + zFmt = ts + 21536 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21466 + zFmt = ts + 21561 } else { - zFmt = ts + 21484 + zFmt = ts + 21579 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21493, 7) + Xsqlite3_str_append(tls, bp+64, ts+21588, 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 + 16197 - Xsqlite3_str_appendf(tls, bp+64, ts+21501, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16244 + Xsqlite3_str_appendf(tls, bp+64, ts+21596, 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+21532, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21627, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21542, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21637, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21547, + Xsqlite3_str_appendf(tls, bp+64, ts+21642, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21574, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21669, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95658,25 +96374,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21680, 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+21373, 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+21468, 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+21701, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21362, 5) + Xsqlite3_str_append(tls, bp+24, ts+21457, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21373, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21468, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4936, 1) + Xsqlite3_str_append(tls, bp+24, ts+4950, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96037,7 +96753,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96090,104 +96806,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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+8, pExpr, uint32(unsafe.Sizeof(Expr{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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 + 44)) = uintptr(0) - return WRC_Prune - } else { - return WRC_Continue - } - return int32(0) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - preserveExpr(tls, pX, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), 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 + 44)) = uintptr(0) - } - } - return WRC_Continue -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(56) - defer tls.Free(56) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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 + 28)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer(aColExpr + 8 + uintptr(iIdxCol)*20)).FpExpr - if Xsqlite3ExprIsConstant(tls, (*IdxExprTrans)(unsafe.Pointer(bp+28)).FpIdxExpr) != 0 { - continue - } - (*Walker)(unsafe.Pointer(bp)).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)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16)).FcolFlags)&COLFLAG_HASCOLL == 0 || - Xsqlite3StrICmp(tls, Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16), - uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) == 0) { - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -96226,7 +96844,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(4) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 760 + uintptr(iLevel)*84 + var pLevel uintptr = pWInfo + 752 + uintptr(iLevel)*84 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -96246,6 +96864,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -96396,12 +97016,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 84 + pWC = pWInfo + 76 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)*68 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+496, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+488, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -96420,13 +97040,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*84)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(j)*84)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*84)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(j)*84)).FpRJ != 0) { goto __6 } goto __4 @@ -96439,7 +97059,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(j)*84)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(j)*84)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x20>>5)) != 0) { goto __7 @@ -96501,7 +97121,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96648,6 +97268,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -96990,13 +97612,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97004,104 +97633,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97110,92 +97748,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -97205,24 +97837,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -97242,152 +97874,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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, uint32(unsafe.Sizeof(SrcItem{}))) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*68, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*84)).FiFrom)*68, uint32(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*48)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21709, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+760, uint16(0)) + pParse, pOrTab, pSubWInfo+752, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -97396,121 +98029,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 52))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 48))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 760)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 752)).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)) + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 64)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -97519,36 +98152,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97566,219 +98199,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+488, *(*int32)(unsafe.Pointer(pE + 36))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 48 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr pAlt = Xsqlite3WhereFindTerm(tls, pWC, iCur, *(*int32)(unsafe.Pointer(pTerm + 24)), notReady, uint32(WO_EQ|WO_IN|WO_IS), uintptr(0)) if !(pAlt == uintptr(0)) { - goto __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 + 20)))).FpEList)).FnExpr > 1) { - goto __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 20)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 20)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+20, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 10)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 48 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97788,24 +98421,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97816,41 +98449,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 48 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -97884,7 +98517,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 84 + var pWC uintptr = pWInfo + 76 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 @@ -97892,13 +98525,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21638, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21733, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*84)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*84)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(k)*84)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(k)*84)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(k)*84)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(k)*84)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -98177,7 +98810,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*20)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { for i = 0; i < int32(uint32(unsafe.Sizeof(aOp))/uint32(unsafe.Sizeof(Op2{}))); i++ { if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), aOp[i].FzOp) == 0 { *(*uint8)(unsafe.Pointer(peOp2)) = aOp[i].FeOp2 @@ -98190,7 +98823,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -98214,11 +98847,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { res++ } - if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -98250,10 +98883,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16046, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15377, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14903, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21652, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16093, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15424, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14950, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21747, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -98395,7 +99028,7 @@ __1: { 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+496, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+488, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -98412,10 +99045,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+488, (*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)*48 - b = b | Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+488, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -98472,7 +99105,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+496, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+488, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98658,6 +99291,7 @@ __3: 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)*20)).FpExpr, iCur) == 0 { *(*int32)(unsafe.Pointer(aiCurCol)) = iCur *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 @@ -98713,7 +99347,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*48 - pMaskSet = pWInfo + 496 + pMaskSet = pWInfo + 488 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98750,12 +99384,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98834,7 +99468,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -98928,7 +99562,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21700 + return ts + 21795 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99122,7 +99756,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -99301,7 +99935,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21707, + Xsqlite3ErrorMsg(tls, pParse, ts+21802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -99370,6 +100004,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -99396,10 +100033,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 760 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*84 + pInner = pWInfo + 752 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*84 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -99419,14 +100056,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&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 + 760 + uintptr(i)*84 + pInner = pWInfo + 752 + uintptr(i)*84 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 @@ -99463,14 +100100,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+20, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -99913,6 +100550,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -99922,11 +100571,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100021,7 +100668,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21743, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21838, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -100092,7 +100739,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21769 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21864 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -100326,7 +100973,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 760 + uintptr(iLevel)*84 + pLevel = pWInfo + 752 + uintptr(iLevel)*84 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -100388,11 +101035,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_OK) @@ -100460,7 +101105,7 @@ __3: uint32(unsafe.Sizeof(sqlite3_index_orderby{}))*uint32(nOrderBy)+uint32(unsafe.Sizeof(HiddenIndexInfo1{}))+ uint32(unsafe.Sizeof(uintptr(0)))*uint32(nTerm))) if pIdxInfo == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) return uintptr(0) } pHidden = pIdxInfo + 1*64 @@ -100582,9 +101227,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3642, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100652,7 +101297,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanLt + uintptr(iCol)*4)) } @@ -101001,9 +101646,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 64 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint32(unsafe.Sizeof([3]uintptr{})) / uint32(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101027,7 +101675,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) return SQLITE_NOMEM } @@ -101043,32 +101692,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+84) + Xsqlite3WhereClauseClear(tls, pWInfo+76) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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+8, uint32(unsafe.Sizeof(Expr{}))) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -101214,7 +101853,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+64, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+60, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -101457,13 +102096,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 + 24)) |= uint8(SQLITE_BLDF1_UNIQUE) } else { @@ -101474,7 +102110,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTerm @@ -101529,31 +102166,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } else if int32(eOp)&WO_ISNULL != 0 { *(*U32)(unsafe.Pointer(pNew + 44)) |= 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 + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = 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 { - pTop = pTerm + 1*48 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)*4)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*48 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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)*4)) + } else { + pBtm = uintptr(0) + } } } @@ -101756,6 +102395,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(36) + defer tls.Free(36) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(98) defer tls.Free(98) @@ -101887,6 +102584,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -101901,6 +102601,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -101931,7 +102634,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 84 + var pWC2 uintptr = pWInfo + 76 for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC2)).FnTerm; ii++ { var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC2)).Fa + uintptr(ii)*48 if !(Xsqlite3ExprCoveredByIndex(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iCur, pProbe) != 0) { @@ -102086,7 +102789,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+21780, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102144,7 +102847,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21780, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102502,7 +103205,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -102514,7 +103217,7 @@ __1: var mUnusable Bitmask = uint64(0) (*WhereLoop)(unsafe.Pointer(pNew)).FiTab = U8(iTab) *(*uint32)(unsafe.Pointer(pBuilder + 28)) += uint32(SQLITE_QUERY_PLANNER_LIMIT_INCR) - (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+488, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -102529,7 +103232,7 @@ __1: var p uintptr for p = pItem + 1*68; p < pEnd; p += 68 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+488, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102542,7 +103245,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21806, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21901, 0) rc = SQLITE_OK } else { goto __3 @@ -102643,7 +103346,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+84, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+76, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102817,7 +103520,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+496, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+488, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102869,7 +103572,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -102897,7 +103600,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -102918,7 +103620,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -102940,7 +103641,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { nSpace = int32((uint32(unsafe.Sizeof(WherePath{})) + uint32(unsafe.Sizeof(uintptr(0)))*uint32(nLoop)) * uint32(mxChoice) * uint32(2)) nSpace = int32(uint32(nSpace) + uint32(unsafe.Sizeof(LogEst(0)))*uint32(nOrderBy)) - pSpace = Xsqlite3DbMallocRawNN(tls, db, uint64(nSpace)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103002,9 +103703,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103020,7 +103720,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103040,6 +103742,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103136,8 +103843,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21841, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21936, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103149,7 +103856,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 760 + uintptr(iLoop)*84 + var pLevel uintptr = pWInfo + 752 + uintptr(iLoop)*84 (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop = libc.AssignUintptr(&pWLoop, *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(iLoop)*4))) (*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)*68)).FiCursor @@ -103164,7 +103871,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -103184,7 +103891,7 @@ __3: uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+16)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -103192,7 +103899,7 @@ __3: } 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+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -103202,7 +103909,7 @@ __3: pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+24)) if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 3, 0x8) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -103210,7 +103917,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -103242,7 +103949,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 84 + pWC = pWInfo + 76 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -103299,10 +104006,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 752)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 752)).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) @@ -103346,16 +104053,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+488, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+488, (*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 + 760 + uintptr(i)*84)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(i)*84)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*68 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -103388,7 +104095,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } if i != int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 { var nByte int32 = int32(uint32(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1-i) * uint32(unsafe.Sizeof(WhereLevel{}))) - libc.Xmemmove(tls, pWInfo+760+uintptr(i)*84, pWInfo+760+uintptr(i+1)*84, uint32(nByte)) + libc.Xmemmove(tls, pWInfo+752+uintptr(i)*84, pWInfo+752+uintptr(i+1)*84, uint32(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -103400,9 +104107,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 752)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(i)*84)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(i)*84)).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) { @@ -103420,6 +104127,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*20)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -103506,7 +104265,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(40) defer tls.Free(40) @@ -103563,7 +104322,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21859, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21954, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -103586,31 +104345,30 @@ __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 + 24)) = libc.AssignPtrInt32(pWInfo+24+1*4, -1) + *(*int32)(unsafe.Pointer(pWInfo + 20)) = libc.AssignPtrInt32(pWInfo+20+1*4, -1) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel = U8(nTabList) - (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+32, Xsqlite3VdbeMakeLabel(tls, pParse)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+28, 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+49, 0, - uint32(uintptr(0)+84)-uint32(uintptr(0)+49)) - libc.Xmemset(tls, pWInfo+760, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+45, 0, + uint32(uintptr(0)+76)-uint32(uintptr(0)+45)) + libc.Xmemset(tls, pWInfo+752, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 496 + pMaskSet = pWInfo + 488 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 84 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 76 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+84, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+84, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+76, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+76, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103628,13 +104386,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21887, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21982, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*68)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*68, pWInfo+84) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*68, pWInfo+76) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103645,169 +104403,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+84) - Xsqlite3WhereAddLimit(tls, pWInfo+84, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+76) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+76, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } pT = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).Fa + uintptr(ii)*48 if !(int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags)&TERM_VIRTUAL != 0) { - goto __15 + goto __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 10)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } wctrlFlags = libc.Uint16FromInt32(int32(wctrlFlags) & libc.CplInt32(WHERE_WANT_DISTINCT)) - *(*U16)(unsafe.Pointer(pWInfo + 44)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) - goto __19 -__18: - if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+84, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 40)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+76, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 44)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 40)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 752)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103816,26 +104579,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 752)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 760 -__40: + pLevel = pWInfo + 752 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 @@ -103843,37 +104606,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 20)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -103881,92 +104644,98 @@ __51: int32((*Table)(unsafe.Pointer(pTab)).FnCol) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(n), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __57 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 20 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -103976,24 +104745,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104003,96 +104772,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 20)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 44)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 84 - goto __40 goto __42 __42: + ii++ + pLevel += 84 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 760 + uintptr(ii)*84 + pLevel = pWInfo + 752 + uintptr(ii)*84 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+84, + constructAutomaticIndex(tls, pParse, pWInfo+76, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104100,30 +104869,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104143,7 +104910,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 760 + uintptr(i)*84 + pLevel = pWInfo + 752 + uintptr(i)*84 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -104279,11 +105046,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 760 + pLevel = pWInfo + 752 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -104322,6 +105086,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*20 @@ -104494,7 +105268,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21905, -1) + pCtx, ts+22000, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104627,7 +105401,7 @@ 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+21961, -1) + pCtx, ts+22056, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104716,17 +105490,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22006)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22017)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22028)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22033)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22046)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22056)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22062)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22073)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22083)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22095)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22100)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22101)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22112)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22123)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22128)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22141)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22151)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22157)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22168)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22178)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22190)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22195)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104772,7 +105546,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22104, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22199, libc.VaList(bp, zName)) } return p } @@ -104816,12 +105590,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+22123, 0) + ts+22218, 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+22194, 0) + ts+22289, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104844,7 +105618,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).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+7857) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) } break } @@ -105011,7 +105785,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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)*20)).FpExpr, 0) - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pDup) break @@ -105048,7 +105821,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22257, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22352, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105164,7 +105937,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463)) } pSub = Xsqlite3SelectNew(tls, @@ -105278,7 +106051,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22283, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22378, 0) goto windowAllocErr __2: ; @@ -105343,15 +106116,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22315 + zErr = ts + 22410 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22332 + zErr = ts + 22427 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22348 + zErr = ts + 22443 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22368, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22463, 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 { @@ -105372,7 +106145,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+22401, 0) + ts+22496, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -105510,7 +106283,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -105528,11 +106301,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22448, - ts + 22501, - ts + 21905, - ts + 22552, - ts + 22604, + ts + 22543, + ts + 22596, + ts + 22000, + ts + 22647, + ts + 22699, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106012,13 +106785,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -106924,19 +107701,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22654, + Xsqlite3ErrorMsg(tls, pParse, ts+22749, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19648 + return ts + 19743 } - return ts + 22696 + return ts + 22791 }(), 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+22702, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22797, 0) } } @@ -107007,7 +107784,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22736, + Xsqlite3ErrorMsg(tls, pParse, ts+22831, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108102,7 +108879,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22869, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109077,21 +109854,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16197, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16244, 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+22796, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16110, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16157, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22796, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, 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)) @@ -109834,7 +110611,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22823) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22918) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -109998,7 +110775,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 92)) = *(*Token)(unsafe.Pointer(yymsp + 4)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp+32, bp+92)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp+32, bp+92)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -110215,9 +110992,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) != 0 { - return ts + 6683 + return ts + 6697 } - return ts + 6688 + return ts + 6702 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) @@ -110496,19 +111273,19 @@ 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+22856, 0) + ts+22951, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22951, 0) + ts+23046, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23035, 0) + ts+23130, 0) } break case uint32(273): @@ -110887,9 +111664,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23120, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23215, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111657,7 +112434,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 1248)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23137, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, bp+1248)) break } } @@ -111678,9 +112455,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3642, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23162, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23257, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111693,7 +112470,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111853,7 +112630,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23173, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23268, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111866,11 +112643,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19768, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19863, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23280, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -111883,9 +112660,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23195, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23290, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23199, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23294, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -111995,36 +112772,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112141,7 +112896,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -112412,16 +113167,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -112485,6 +113241,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -112535,6 +113292,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112683,7 +113441,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 396)).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) @@ -112713,7 +113471,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112728,7 +113486,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23207, 0) + ts+23302, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112824,7 +113582,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 420)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 424)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112835,8 +113593,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+420) - for i = (*Hash)(unsafe.Pointer(db + 436)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+424) + for i = (*Hash)(unsafe.Pointer(db + 440)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112846,13 +113604,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+436) - for i = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+440) + for i = (*Hash)(unsafe.Pointer(db + 396)).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+392) + Xsqlite3HashClear(tls, db+396) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -112919,23 +113677,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23275 + var zErr uintptr = ts + 23370 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23289 + zErr = ts + 23384 break } case SQLITE_ROW: { - zErr = ts + 23311 + zErr = ts + 23406 break } case SQLITE_DONE: { - zErr = ts + 23333 + zErr = ts + 23428 break } @@ -112953,35 +113711,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23356, - ts + 23369, + ts + 23451, + ts + 23464, uintptr(0), - ts + 23385, - ts + 23410, - ts + 23424, - ts + 23443, - ts + 1463, - ts + 23468, + ts + 23480, ts + 23505, - ts + 23517, - ts + 23532, - ts + 23565, - ts + 23583, - ts + 23608, - ts + 23637, + ts + 23519, + ts + 23538, + ts + 1483, + ts + 23563, + ts + 23600, + ts + 23612, + ts + 23627, + ts + 23660, + ts + 23678, + ts + 23703, + ts + 23732, uintptr(0), - ts + 5827, - ts + 5313, - ts + 23654, - ts + 23672, - ts + 23690, + ts + 5841, + ts + 5327, + ts + 23749, + ts + 23767, + ts + 23785, uintptr(0), - ts + 23724, + ts + 23819, uintptr(0), - ts + 23745, - ts + 23771, - ts + 23794, - ts + 23815, + ts + 23840, + ts + 23866, + ts + 23889, + ts + 23910, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113096,7 +113854,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113141,7 +113899,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+23831, 0) + ts+23926, 0) return SQLITE_BUSY } else { @@ -113258,7 +114016,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23894, libc.VaList(bp, zName)) + ts+23989, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113274,6 +114032,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -113283,7 +114044,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -113491,7 +114252,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+23945, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24040, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113584,7 +114345,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113654,7 +114415,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113664,7 +114425,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113696,20 +114457,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23966, 0) + ts+24061, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+436, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+440, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*20 @@ -113833,7 +114594,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+24034, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24129, uint32(5)) == 0) { goto __1 } iOut = 0 @@ -113878,10 +114639,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24040, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24135, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24050, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24145, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -113986,7 +114747,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24078, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24173, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -113997,17 +114758,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24082, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24177, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24082 + zModeType = ts + 24177 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24088, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24183, zOpt, uint32(4)) == 0) { goto __32 } @@ -114015,7 +114776,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3251 + zModeType = ts + 3265 __32: ; if !(aMode != 0) { @@ -114045,7 +114806,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24093, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24188, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114053,7 +114814,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24113, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24208, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114093,7 +114854,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24137, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24232, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114116,15 +114877,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24153, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24248, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24168, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24171, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24174, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17292, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24263, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24266, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24269, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17339, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114239,7 +115000,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 464 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 468 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -114258,8 +115019,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+436) - Xsqlite3HashInit(tls, db+392) + Xsqlite3HashInit(tls, db+440) + Xsqlite3HashInit(tls, db+396) 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 @@ -114270,10 +115031,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+21700, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21795, 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+24178, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24273, 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) { @@ -114287,7 +115048,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -114304,7 +115065,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16)))) @@ -114338,9 +115099,9 @@ __22: Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FpSchema = Xsqlite3SchemaGet(tls, db, uintptr(0)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6360 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6374 (*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 + 23180 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23275 (*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) @@ -114445,7 +115206,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24184 + zFilename = ts + 24279 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114548,21 +115309,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24187, + Xsqlite3_log(tls, iErr, ts+24282, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24212) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24307) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24232) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24327) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24334) } // This is a convenience routine that makes sure that all thread-specific @@ -114673,7 +115434,7 @@ __4: 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 + 1092 + zDataType = ts + 1112 primarykey = 1 __13: ; @@ -114720,14 +115481,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24256, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24351, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114797,6 +115558,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -115373,7 +116137,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24284, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24379, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -115406,7 +116170,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 552 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 556 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -115417,7 +116181,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 556 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -115491,7 +116255,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 + 24292 + return ts + 24387 } return uintptr(0) }(), 0) @@ -115586,7 +116350,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 552 + pp = p + 556 } } @@ -115668,7 +116432,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6160, ts + 6683, ts + 6688, ts + 6170, ts + 6165, ts + 7924, ts + 24315, ts + 24321, + ts + 6174, ts + 6697, ts + 6702, ts + 6184, ts + 6179, ts + 7938, ts + 24410, ts + 24416, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115821,7 +116585,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 + 24328 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24423 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -115847,7 +116611,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6160, uint32(4)) + jsonAppendRaw(tls, p, ts+6174, uint32(4)) break } @@ -115876,7 +116640,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24345, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24440, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -115934,19 +116698,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6160, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6174, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6683, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6697, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6688, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6702, uint32(5)) break } @@ -116491,17 +117255,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6160, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6174, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6683, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6697, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6688, uint32(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6702, uint32(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116602,7 +117366,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+24374, -1) + Xsqlite3_result_error(tls, pCtx, ts+24469, -1) } } jsonParseReset(tls, pParse) @@ -116908,7 +117672,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+24389, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24484, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -116923,7 +117687,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24393, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24488, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -116977,7 +117741,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24419, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24514, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117082,11 +117846,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24462, uint32(2)) + jsonAppendRaw(tls, bp, ts+24557, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4977, uint32(2)) + jsonAppendRaw(tls, bp, ts+4991, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24465, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24560, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -117127,7 +117891,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6160, uint32(4)) + jsonAppendRaw(tls, bp, ts+6174, uint32(4)) } } if i == argc { @@ -117243,14 +118007,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24468, -1) + ts+24563, -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+24519, -1) + Xsqlite3_result_error(tls, ctx, ts+24614, -1) jsonReset(tls, bp) return } @@ -117345,7 +118109,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117420,9 +118184,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24553 + return ts + 24648 } - return ts + 24557 + return ts + 24652 }()) return __2: @@ -117555,7 +118319,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24564, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24659, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117652,7 +118416,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24567, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24662, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117696,7 +118460,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24570) + ts+24665) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117827,7 +118591,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24653, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24748, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117846,7 +118610,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*12 pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24659, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24754, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 @@ -117942,7 +118706,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24659, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24754, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -117966,7 +118730,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 + 24664 + zRoot = ts + 24759 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118082,7 +118846,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+24374, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24469, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118177,25 +118941,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24666}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24671}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON), FxSFunc: 0, FzName: ts + 24713}, - {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 + 24716}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24720}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24732}, - {FnArg: int8(2), 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 + 24755}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24766}, - {FnArg: int8(-1), 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), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24810}, - {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 + 24821}, - {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 + 24838}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24777}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24795}, + {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 + 24808}, + {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 + 24811}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24815}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24827}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24839}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24850}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24861}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24873}, + {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 + 24886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24905}, + {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 + 24916}, + {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 + 24933}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118214,8 +118978,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24856, FpModule: 0}, - {FzName: ts + 24866, FpModule: 0}, + {FzName: ts + 24951, FpModule: 0}, + {FzName: ts + 24961, FpModule: 0}, } type Rtree1 = struct { @@ -118468,11 +119232,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+24876, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24971, 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+24884, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24979, iNode, 0, pRtree+72) Xsqlite3_free(tls, zTab) } @@ -118683,7 +119447,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24889, + ts+24984, 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)) @@ -119386,7 +120150,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24971) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25066) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119598,7 +120362,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120727,7 +121491,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24985, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25080, 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 { @@ -120739,12 +121503,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25005, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25100, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25037, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25132, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120785,7 +121549,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -120970,7 +121734,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25074, 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+25169, 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)) @@ -120993,14 +121757,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25219 + var zFmt uintptr = ts + 25314 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11265, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11279, 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 { @@ -121041,7 +121805,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25275, ts + 5039, ts + 16197, + ts + 25370, ts + 5053, ts + 16244, } var rtreeModule = Sqlite3_module{ @@ -121084,19 +121848,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+25280, + ts+25375, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25342, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25437, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25347, + ts+25442, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25411, + ts+25506, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25481, + ts+25576, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121125,7 +121889,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25530 + zFormat = ts + 25625 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121137,7 +121901,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+25638, + ts+25733, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121145,18 +121909,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+25683, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25778, 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+12736, 1) + Xsqlite3_str_append(tls, p, ts+12750, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25710, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25805, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25732, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25827, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25740, 0) + Xsqlite3_str_appendf(tls, p, ts+25835, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121171,14 +121935,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25756, - ts + 25809, - ts + 25854, - ts + 25906, - ts + 25960, - ts + 26005, - ts + 26063, - ts + 26118, + ts + 25851, + ts + 25904, + ts + 25949, + ts + 26001, + ts + 26055, + ts + 26100, + ts + 26158, + ts + 26213, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121207,7 +121971,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26165, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26260, 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 @@ -121215,19 +121979,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26185, + ts+26280, 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 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, 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+26242, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26337, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121269,16 +122033,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26277, - ts + 26320, - ts + 26355, - ts + 26391, + ts + 26372, + ts + 26415, + ts + 26450, + ts + 26486, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) return SQLITE_ERROR __1: ; @@ -121303,7 +122067,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26428, + Xsqlite3_str_appendf(tls, pSql, ts+26523, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -121315,7 +122079,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26452, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26547, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -121338,7 +122102,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -121349,14 +122113,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) 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+3642, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -121399,7 +122163,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) goto rtreeInit_fail __22: ; @@ -121416,7 +122180,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -121434,7 +122198,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26461, ts + 26472} +var azFormat = [2]uintptr{ts + 26556, ts + 26567} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(592) @@ -121472,13 +122236,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+44, bp+16, ii, bp+544) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10837, 1) + Xsqlite3_str_append(tls, pOut, ts+10851, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26577, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+44)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26488, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26583, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26492, 1) + Xsqlite3_str_append(tls, pOut, ts+26587, 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}))) @@ -121489,7 +122253,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26494, -1) + Xsqlite3_result_error(tls, ctx, ts+26589, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121565,12 +122329,12 @@ 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+26527, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26622, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4041 + return ts + 4055 } - return ts + 1527 + return ts + 1547 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -121589,7 +122353,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+26534, + ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121608,7 +122372,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+26579, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26674, libc.VaList(bp+16, iNode)) } } @@ -121622,8 +122386,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26611, - ts + 26665, + ts + 26706, + ts + 26760, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -121638,23 +122402,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+26713, + rtreeCheckAppendMsg(tls, pCheck, ts+26808, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26775, + ts+26870, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }(), iKey, iVal)) } } @@ -121678,7 +122442,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+26833, libc.VaList(bp, i, iCell, iNode)) + ts+26928, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121698,7 +122462,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+26881, libc.VaList(bp+24, i, iCell, iNode)) + ts+26976, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121715,14 +122479,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+26948, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27043, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26982, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27077, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121730,7 +122494,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+27012, + ts+27107, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121759,14 +122523,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27067, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27162, 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+27098, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27193, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121788,12 +122552,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14472, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14486, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27165, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27260, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121802,12 +122566,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24985, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25080, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27193, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27288, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121821,8 +122585,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+27224, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27319, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121830,7 +122594,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 24 + 1*4))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27239, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27334, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121845,7 +122609,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27243, -1) + ts+27338, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121853,7 +122617,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6360 + zDb = ts + 6374 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4))) } @@ -121863,7 +122627,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17834 + return ts + 17962 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122231,11 +122995,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+27294, 1) + Xsqlite3_str_append(tls, x, ts+27389, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27296, 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+27391, 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+27307, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27402, 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) } @@ -122255,19 +123019,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+27318, 0) + Xsqlite3_str_appendf(tls, x, ts+27413, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27336, 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+27431, 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+27344, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27439, 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+27352, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27447, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27356, 0) + Xsqlite3_str_appendf(tls, x, ts+27451, 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) } @@ -123171,7 +123935,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27369, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27464, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123180,7 +123944,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27391, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27486, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -123188,7 +123952,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123199,7 +123963,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -123224,7 +123988,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -123413,7 +124177,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16197 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16244 (*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 @@ -123423,7 +124187,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27490 (*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 @@ -123431,7 +124195,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27401 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27496 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123543,7 +124307,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27410, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27505, 0) __4: ; goto geopoly_update_end @@ -123673,14 +124437,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27450) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27545) == 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+27466) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27561) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123745,7 +124509,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27481, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27576, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123757,25 +124521,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27489}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27502}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27515}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27528}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27466}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27540}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27450}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27563}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27577}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27590}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27604}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27620}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27597}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27610}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27623}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27561}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27635}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27545}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27658}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27672}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27685}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27699}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27715}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27632}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27727}, } // Register the r-tree module with database handle db. This creates the @@ -123785,26 +124549,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27651, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27746, 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+27661, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27756, 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+27672, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27767, -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+27395, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27490, 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+27683, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -123858,7 +124622,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24971, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25066, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -123922,6 +124686,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124171,7 +124937,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) return } @@ -124182,7 +124948,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+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124195,7 +124961,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -124207,7 +124973,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -124283,7 +125049,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27714, uintptr(0), uintptr(0), p+36) + ts+27809, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -124347,7 +125113,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+24884, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24979, 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++ { } @@ -124368,16 +125134,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27885, libc.VaList(bp, func() uintptr { + ts+27980, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28035 + return ts + 28130 } - return ts + 1527 + return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28076) + ts+28171) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -124475,7 +125241,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -124493,7 +125259,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+28201, libc.VaList(bp, zTab))) + ts+28296, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124511,7 +125277,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+28320, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28415, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124529,7 +125295,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28341, libc.VaList(bp+16, zIdx))) + ts+28436, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124552,7 +125318,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28487, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124598,7 +125364,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124613,7 +125379,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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)), 1) if iCid >= 0 { @@ -124653,7 +125419,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+19294, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19389, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124663,18 +125429,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28470, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28565, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28489, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28584, 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+28494, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28589, zName) { bRbuRowid = 1 } } @@ -124686,18 +125452,18 @@ 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+28504, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28599, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28533 + return ts + 28628 } - return ts + 28546 + return ts + 28641 }())) } 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+28555, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28650, 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)), 1) @@ -124711,7 +125477,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+28577, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28672, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 5) @@ -124754,12 +125520,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+28604, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14583 + zList = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14597 } return zList } @@ -124770,13 +125536,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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)*4)) - zRet = rbuMPrintf(tls, p, ts+28613, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28708, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124798,25 +125564,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+28626, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28721, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28658, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28753, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+28681) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28687, ts+28694, ts+4936) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+28776) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28782, ts+28789, ts+4950) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) 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+28702, + ts+28797, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28744, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28839, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -124853,12 +125619,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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 @@ -124893,7 +125659,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28764 + zCol = ts + 28859 __7: ; goto __5 @@ -124901,13 +125667,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28772, + zLhs = rbuMPrintf(tls, p, ts+28867, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28793, + zOrder = rbuMPrintf(tls, p, ts+28888, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28829, + zSelect = rbuMPrintf(tls, p, ts+28924, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14583 + zSep = ts + 14597 iCol++ goto __1 __2: @@ -124925,12 +125691,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28856, + Xsqlite3_mprintf(tls, ts+28951, 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 } - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -124952,8 +125718,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28904, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14583 + zVector = rbuMPrintf(tls, p, ts+28999, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14597 goto __15 __15: iCol++ @@ -124964,7 +125730,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -124991,13 +125757,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1527 - var zAnd uintptr = ts + 1527 + var zCom uintptr = ts + 1547 + var zAnd uintptr = ts + 1547 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125009,9 +125775,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28923, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29018, 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 + zType = ts + 1547 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125021,37 +125787,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 + 28764 + zCol = ts + 28859 } else { - zCol = ts + 28494 + zCol = ts + 28589 } - zType = ts + 1092 + zType = ts + 1112 } 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+28945, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29040, 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 + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28965, + zImpPK = Xsqlite3_mprintf(tls, ts+29060, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28986, + zImpCols = Xsqlite3_mprintf(tls, ts+29081, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29019, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29114, 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 + 14583 - zAnd = ts + 21362 + zCom = ts + 14597 + zAnd = ts + 21457 nBind++ } @@ -125085,16 +125851,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1527 + var zS uintptr = ts + 1547 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)*4)) - zList = Xsqlite3_mprintf(tls, ts+29043, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29138, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29055, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29150, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14583 + zS = ts + 14597 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125102,7 +125868,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29064, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29159, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125114,27 +125880,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29079, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29174, 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 zSep uintptr = ts + 1547 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+29093, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21457 } } zList = rbuMPrintf(tls, p, - ts+29105, libc.VaList(bp+40, zList)) + ts+29200, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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)*4)) - zList = rbuMPrintf(tls, p, ts+29155, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21457 } } } @@ -125143,7 +125909,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29168, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29263, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125157,21 +125923,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29155, + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14583 + zSep = ts + 14597 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29194, + zList = rbuMPrintf(tls, p, ts+29289, 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 + 14583 + zSep = ts + 14597 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29224, + zList = rbuMPrintf(tls, p, ts+29319, 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 + 14583 + zSep = ts + 14597 } } } @@ -125206,19 +125972,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29261 + var zSep uintptr = ts + 29356 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16085) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16132) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp+8, zIdx))) } break } @@ -125230,15 +125996,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28681 + zDesc = ts + 28776 } else { - zDesc = ts + 1527 + zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29274, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14583 + z = rbuMPrintf(tls, p, ts+29369, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14597 } } - z = rbuMPrintf(tls, p, ts+29285, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29380, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60))) } return z @@ -125253,12 +126019,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 172)) = uintptr(0) - var zComma uintptr = ts + 1527 + var zComma uintptr = ts + 1547 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29289) + ts+29384) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -125267,7 +126033,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125277,25 +126043,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 4) - zCols = rbuMPrintf(tls, p, ts+29339, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29434, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29361, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } } - zCols = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29466, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29386, + ts+29481, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125305,50 +126071,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1527 + var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1527 + var zPk uintptr = ts + 1547 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*4)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, (*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 { - zPk = ts + 29448 + zPk = ts + 29543 } - zSql = rbuMPrintf(tls, p, ts+29461, + zSql = rbuMPrintf(tls, p, ts+29556, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29488 + return ts + 29583 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } 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+29498, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29593, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29505, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29600, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125361,7 +126127,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29552, + ts+29647, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -125398,7 +126164,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29609) + ts+29704) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -125503,7 +126269,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+29675, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29770, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125523,24 +126289,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+604, bp+608, bp+612) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 612))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29695, + ts+29790, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 604)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 612)) 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+29760, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29855, libc.VaList(bp+128, zTbl, zBind))) } 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+29796, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) + Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125556,7 +126322,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29830, + ts+29925, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125564,31 +126330,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }() } - return ts + 1527 + return ts + 1547 }(), 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+29901, + ts+29996, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29962, + ts+30057, 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 + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }(), zCollist, zLimit)) } @@ -125613,8 +126379,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6371) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6367) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6385) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6381) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125623,52 +126389,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1527 + return ts + 1547 } - return ts + 30121 + return ts + 30216 }() 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+30130, + ts+30225, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30166 + return ts + 30261 } - return ts + 1527 + return ts + 1547 }(), zBindings))) } 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+30176, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30271, 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 + var zRbuRowid uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30204 + zRbuRowid = ts + 30299 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30216, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30311, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30292 + return ts + 30387 } - return ts + 1527 + return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30309, + ts+30404, 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+30608, + ts+30703, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125676,14 +126442,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1527 + var zRbuRowid uintptr = ts + 1547 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30707 + zRbuRowid = ts + 30802 } else { - zRbuRowid = ts + 30717 + zRbuRowid = ts + 30812 } } @@ -125696,35 +126462,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28764, 0) + zOrder = rbuMPrintf(tls, p, ts+28859, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) } } 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+30728, + ts+30823, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30776 + return ts + 30871 } - return ts + 1527 + return ts + 1547 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zOrder != 0 { - return ts + 19648 + return ts + 19743 } - return ts + 1527 + return ts + 1547 }(), zOrder, zLimit))) } @@ -125787,12 +126553,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1527 + var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30121 + zPrefix = ts + 30216 } - zUpdate = Xsqlite3_mprintf(tls, ts+30782, + zUpdate = Xsqlite3_mprintf(tls, ts+30877, 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) @@ -125819,7 +126585,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -125851,7 +126617,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 12)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30812, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30907, 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)), 0) { case RBU_STATE_STAGE: @@ -125921,28 +126687,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6360, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, 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+6360) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30842, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30937, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30869, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+24, ts+3265, uint32(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30965, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+24, ts+3279, uint32(4)) } else { - libc.Xmemcpy(tls, p+24, ts+6360, uint32(4)) + libc.Xmemcpy(tls, p+24, ts+6374, uint32(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30887, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30983, 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 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+6360, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -125975,11 +126741,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+30953, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31049, 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+24034, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24129, (*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)))) == '?' { @@ -125991,16 +126757,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30985, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360), + zTarget = Xsqlite3_mprintf(tls, ts+31081, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } - return ts + 31017 + return ts + 31113 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } return zExtra }())) @@ -126016,37 +126782,37 @@ 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+31019, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31115, -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+31034, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31130, 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+31051, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31147, -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+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31067, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 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+31095, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31191, 0) } } @@ -126075,14 +126841,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31067, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, uintptr(0), uintptr(0), uintptr(0)) } } 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+31113, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126191,7 +126957,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126208,23 +126974,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31148, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31244, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) } - zOal = Xsqlite3_mprintf(tls, ts+31173, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126245,12 +127011,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -126344,7 +127107,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23672, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23767, 0) return } @@ -126437,7 +127200,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31187) + ts+31283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -126445,7 +127208,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31305, libc.VaList(bp, iCookie+1)) } } } @@ -126466,7 +127229,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31236, + ts+31332, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -126496,9 +127259,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31394, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31490, 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+31409, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31505, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126512,10 +127275,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31429, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31525, 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+31454) + ts+31550) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126529,12 +127292,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31562) + ts+31658) } 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+31627) + ts+31723) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126546,7 +127309,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31671, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31767, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126566,15 +127329,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17170) - rbuCopyPragma(tls, p, ts+16281) + rbuCopyPragma(tls, p, ts+17217) + rbuCopyPragma(tls, p, ts+16328) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31696, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31792, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126598,10 +127361,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126696,7 +127459,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31724, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31820, 0) } if rc == SQLITE_OK { @@ -126712,7 +127475,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31173, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31269, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126728,7 +127491,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31749, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31845, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126762,7 +127525,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31760, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31856, 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)), -1) } else { @@ -126792,13 +127555,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31832, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31928, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31846) + ts+31942) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126809,7 +127572,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31903) + ts+31999) 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)), 0) @@ -126839,10 +127602,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*244 + var pCsr uintptr = p + 1*252 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -126853,7 +127617,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+Size_t(1)) pCsr += uintptr(nRbu + Size_t(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3642, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3656, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -126882,7 +127646,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+31977, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32073, 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 @@ -126900,12 +127664,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32009, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32105, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32041 + return ts + 32137 } - return ts + 32048 + return ts + 32144 }())) } } @@ -126913,7 +127677,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+14472, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14486, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+48) @@ -126924,19 +127688,19 @@ 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+16884) - rbuCopyPragma(tls, p, ts+16296) + rbuCopyPragma(tls, p, ts+16931) + rbuCopyPragma(tls, p, ts+16343) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32055, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32151, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32071, uintptr(0), uintptr(0), p+36) + db, ts+32167, uintptr(0), uintptr(0), p+36) } } @@ -126990,7 +127754,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32095, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32191, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -127017,7 +127781,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30121, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30216, 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++ @@ -127034,7 +127798,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127047,13 +127811,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+36) } rbuObjIterFinalize(tls, p+48) 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+32103, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32199, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127148,7 +127912,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127165,19 +127929,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14472 + zBegin = ts + 14486 } else { - zBegin = ts + 32055 + zBegin = ts + 32151 } 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+32055, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32151, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127185,6 +127949,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -127203,7 +127989,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 228)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -127498,7 +128284,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32130, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32226, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127523,7 +128309,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+32153, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32249, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127568,7 +128354,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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 + 188)) |= U32((int32(1)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -130374,7 +131160,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -130416,7 +131202,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -130477,7 +131263,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -130551,13 +131337,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -130619,7 +131405,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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)*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, 215972)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -130631,6 +131417,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*4)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -130983,7 +131778,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -131149,45 +131944,45 @@ 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+11265) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11279) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) (*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+32740, bp+12) + sessionAppendStr(tls, bp, ts+32836, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32753, bp+12) + sessionAppendStr(tls, bp, ts+32849, bp+12) 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+32759, bp+12) + sessionAppendStr(tls, bp, ts+32855, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14583 + zSep = ts + 14597 } } - zSep = ts + 1527 - sessionAppendStr(tls, bp, ts+32688, bp+12) + zSep = ts + 1547 + sessionAppendStr(tls, bp, ts+32784, 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) if bStat1 != 0 && ii == 1 { sessionAppendStr(tls, bp, - ts+32764, bp+12) + ts+32860, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32696, bp+12) + sessionAppendStr(tls, bp, ts+32792, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21362 + zSep = ts + 21457 } } @@ -131234,42 +132029,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(16) var i int32 - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32839, bp+12) + sessionAppendStr(tls, bp, ts+32935, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32688, bp+12) + sessionAppendStr(tls, bp, ts+32784, 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+32759, bp+12) + sessionAppendStr(tls, bp, ts+32855, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21362 + zSep = ts + 21457 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32857, bp+12) + sessionAppendStr(tls, bp, ts+32953, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32400, bp+12) + sessionAppendStr(tls, bp, ts+32496, bp+12) - zSep = ts + 1527 + zSep = ts + 1547 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+32696, bp+12) + sessionAppendStr(tls, bp, ts+32792, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32865 + zSep = ts + 32961 } } - sessionAppendStr(tls, bp, ts+4936, bp+12) + sessionAppendStr(tls, bp, ts+4950, bp+12) } if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { @@ -131282,7 +132077,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6360, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) + db, ts+6374, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -131293,21 +132088,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32870, bp+12) + sessionAppendStr(tls, bp, ts+32966, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21368, bp+12) + sessionAppendStr(tls, bp, ts+21463, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14583, bp+12) + sessionAppendStr(tls, bp, ts+14597, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32888, bp+12) + sessionAppendStr(tls, bp, ts+32984, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32899, bp+12) + sessionAppendStr(tls, bp, ts+32995, bp+12) } - sessionAppendStr(tls, bp, ts+4936, bp+12) + sessionAppendStr(tls, bp, ts+4950, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+8, uintptr(0)) @@ -131321,14 +132116,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11265, p) + var rc int32 = sessionSelectRow(tls, db, ts+11279, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32903) + ts+32999) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33016) + ts+33112) } return rc } @@ -131356,7 +132151,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131609,7 +132404,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33160, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33256, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131625,7 +132420,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+33181, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33277, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131698,10 +132493,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33200, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33296, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33226, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33322, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+124, bp+128, bp+132, uintptr(0)) @@ -131734,7 +132529,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 124)))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) + *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) if *(*uintptr)(unsafe.Pointer(bp + 140)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131747,7 +132542,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+136, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6360, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) + db, ts+6374, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) if rc != SQLITE_OK { break } @@ -131760,19 +132555,19 @@ 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+33256, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33352, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33300, + ts+33396, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 128)))) } 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+33371, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33467, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 128)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11265) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11279) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131823,14 +132618,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33431, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33527, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33485, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33581, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132344,7 +133139,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint32(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint32(n2)) pOut += uintptr(n2) @@ -133062,7 +133857,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33513, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33609, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133350,7 +134145,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33637, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133535,7 +134330,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+33572, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33668, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133603,7 +134398,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33579 + var zErr uintptr = ts + 33675 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133761,7 +134556,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1527 + return ts + 1547 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -133784,7 +134579,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33629 + var zErr uintptr = ts + 33725 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134107,13 +134902,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33677, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33773, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33685, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33781, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33695, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33791, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134524,7 +135319,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6160, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6174, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134663,7 +135458,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33700, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33796, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134690,14 +135485,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+33707, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33738, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33834, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134708,7 +135503,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33771, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33867, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134721,7 +135516,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33808, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33904, 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) @@ -134730,7 +135525,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+33817, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33913, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134749,7 +135544,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33850, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33946, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134764,14 +135559,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33884, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33980, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33892, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33988, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33924, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34020, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134779,9 +135574,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33930, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34026, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33944, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34040, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134789,9 +135584,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33982, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34078, 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+33993, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -134799,21 +135594,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5054, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5068, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44)) = [4]Fts5Enum{ - {FzName: ts + 7937, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17275}, - {FzName: ts + 34028, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7951, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17322}, + {FzName: ts + 34124, 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+34036, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34132, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34067, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34163, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -134860,15 +135655,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22028) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16197) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34095, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22123) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16244) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34191, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34125) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34221) { *(*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+34135, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34231, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -134885,13 +135680,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34166, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34262, 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+34171, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34267, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34178, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34274, libc.VaList(bp+16, i)) } } } @@ -134929,8 +135724,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+22028) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34186, 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+22123) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34282, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -134962,7 +135757,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+34215, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34311, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -134971,13 +135766,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 44)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 44)) } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 52)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 52)) } - return ts + 1527 + return ts + 1547 }(), pzErr) } else { @@ -134999,19 +135794,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 + 33884 + zTail = ts + 33980 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34235 + zTail = ts + 34331 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34243, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34339, 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+16197, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16244, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135055,18 +135850,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34254, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34350, 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 + 1547 } - return ts + 14583 + return ts + 14597 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34270, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34366, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22028)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22123)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135176,7 +135971,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34399) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135186,7 +135981,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+34308) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34404) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135196,7 +135991,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+34317) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34413) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135209,7 +136004,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+34327) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34423) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135219,7 +136014,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+34337) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34433) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135235,7 +136030,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+22028) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22123) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4) @@ -135258,7 +136053,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34349 + var zSelect uintptr = ts + 34445 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -135280,7 +136075,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34381) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34477) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40)) = 0 @@ -135294,7 +136089,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34389, + ts+34485, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -135392,7 +136187,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34454, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34550, 0) return FTS5_EOF } } @@ -135405,20 +136200,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+34474, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34570, 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+34505, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34601, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34508, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34604, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29891, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29986, uint32(3)) == 0 { tok = FTS5_AND } break @@ -137184,9 +137979,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34512, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34608, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33637, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137202,7 +137997,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+34517, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34613, 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') @@ -137289,7 +138084,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20365, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20460, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -137370,7 +138165,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34546, 0) + ts+34642, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137540,12 +138335,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+34599, + ts+34695, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34649 + return ts + 34745 } - return ts + 34512 + return ts + 34608 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138485,7 +139280,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34656, iRowid, 0, p+36) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34752, iRowid, 0, p+36) } if rc == SQLITE_ERROR { @@ -138564,7 +139359,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+34662, + ts+34758, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138589,7 +139384,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34713, + ts+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+44, zSql) != 0 { return @@ -138612,7 +139407,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34762, + ts+34858, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -138851,7 +139646,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -138924,13 +139719,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 var pLvl uintptr = pStruct + 20 + uintptr(iLvl)*12 - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ { - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140050,7 +140845,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34825, + ts+34921, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141242,7 +142037,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1527 + return ts + 1547 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -141408,10 +142203,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+32, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+32, pPage+32, nTerm, pTerm) @@ -141439,7 +142234,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist != 0 || (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 { sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, iRowid) } else { - sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, iRowid-(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid) + sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141515,7 +142310,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+34909, + ts+35005, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141558,7 +142353,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { sqlite3Fts5BufferSize(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn+(*Fts5Buffer)(unsafe.Pointer(bp)).Fn)) } sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32(unsafe.Sizeof([4]U8{})), bp+12) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -141570,7 +142365,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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+32, bp, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(4)) sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) } @@ -141690,7 +142485,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp+4+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp+4+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142089,12 +142884,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -142105,7 +142900,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu return sqlite3Fts5BufferSize(tls, p+32, pBuf, uint32(nByte+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) }() { { - *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iDelta)) + *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), iDelta) } { @@ -142285,7 +143080,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf for *(*uintptr)(unsafe.Pointer(bp + 704)) != 0 { { { - *(*int32)(unsafe.Pointer(bp + 708 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+708)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+708)).Fn), uint64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FiRowid-iLastRowid)) + *(*int32)(unsafe.Pointer(bp + 708 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+708)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+708)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FiRowid } @@ -142409,7 +143204,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -142418,7 +143213,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -142450,8 +143245,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 12)), pSeg) if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).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 + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } } @@ -142504,8 +143299,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) - })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } @@ -142575,7 +143370,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1527, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1547, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -142591,13 +143386,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+34966, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35062, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24884, ts+34974, 0, pzErr) + pConfig, ts+24979, ts+35070, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11405, - ts+35009, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11419, + ts+35105, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -142850,7 +143645,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+34656, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34752, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) @@ -142964,7 +143759,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35053, + ts+35149, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -143123,6 +143918,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+4) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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 + 4))) @@ -143130,7 +143929,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8)).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+35139) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35235) 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)) @@ -143398,7 +144197,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR } @@ -143429,7 +144228,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -143444,7 +144243,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, 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) @@ -143758,7 +144557,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143790,7 +144589,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -143822,25 +144621,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35183, + ts+35279, 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 + 14583 + return ts + 14597 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bDesc != 0 { - return ts + 35238 + return ts + 35334 } - return ts + 35243 + return ts + 35339 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -143886,12 +144685,12 @@ 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+35247, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35343, 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+5036, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5050, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35253, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35349, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -143922,7 +144721,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35281, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35377, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -143953,7 +144752,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35291, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35387, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -143985,14 +144784,14 @@ 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+35312, libc.VaList(bp, z)) + ts+35408, 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 + 33695 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33791 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144048,7 +144847,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR __1: ; @@ -144091,7 +144890,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144265,7 +145064,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35345, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35441, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -144386,7 +145185,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -144410,28 +145209,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35381, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35477, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35392, 0) + ts+35488, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35472, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35568, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35480, 0) + ts+35576, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16864, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16911, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35632, 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+35542, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35638, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144489,7 +145288,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) != SQLITE_NULL { 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+17409, z) { + 0 == Xsqlite3_stricmp(tls, ts+17456, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -144502,12 +145301,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35558, + ts+35654, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20266 + return ts + 20361 } - return ts + 35595 + return ts + 35691 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145137,7 +145936,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+35607, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35703, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -145381,7 +146180,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+35628, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35724, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -145400,7 +146199,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+35650, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35746, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -145447,7 +146246,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35681) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35777) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -145456,7 +146255,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35694, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35790, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145470,7 +146269,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35785, ts + 33884, ts + 24884, ts + 34235, ts + 11405, + ts + 35881, ts + 33980, ts + 24979, ts + 34331, ts + 11419, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145494,7 +146293,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35792, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35888, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145512,13 +146311,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35792, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35888, 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+35797, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35893, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145573,17 +146372,17 @@ 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)) = [11]uintptr{ - ts + 35812, - ts + 35880, - ts + 35949, - ts + 35982, - ts + 36021, - ts + 36061, - ts + 36100, - ts + 36141, - ts + 36180, - ts + 36222, - ts + 36262, + ts + 35908, + ts + 35976, + ts + 36045, + ts + 36078, + ts + 36117, + ts + 36157, + ts + 36196, + ts + 36237, + ts + 36276, + ts + 36318, + ts + 36358, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145650,7 +146449,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3642, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145685,18 +146484,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36285, + ts+36381, 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+36389, + ts+36485, 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+36427, + ts+36523, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145708,7 +146507,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36465, + ts+36561, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145720,14 +146519,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24884, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11405, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35785, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24979, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11419, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35881, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34235, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34331, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33884, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33980, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145739,17 +146538,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36507, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36603, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36537, + ts+36633, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145786,27 +146585,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36581, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36677, 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+36604, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36700, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33884, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33980, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34235, ts+36610, 0, pzErr) + pConfig, ts+34331, ts+36706, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35785, ts+36642, 1, pzErr) + pConfig, ts+35881, ts+36738, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146012,12 +146811,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36659, + ts+36755, 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+36709, + ts+36805, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146025,7 +146824,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146201,7 +147000,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36738, + zSql = Xsqlite3_mprintf(tls, ts+36834, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -146383,14 +147182,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 36)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33884, bp+36) + rc = fts5StorageCount(tls, p, ts+33980, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34235, bp+44) + rc = fts5StorageCount(tls, p, ts+34331, bp+44) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 44)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146585,9 +147384,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+36770) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36866) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36877) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146801,7 +147600,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 + 36792 + var zCat uintptr = ts + 36888 var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -146813,7 +147612,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36801) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36897) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -146824,18 +147623,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+36812) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36908) { 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+36770) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36866) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36877) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36801) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36897) { } else { rc = SQLITE_ERROR } @@ -147111,7 +147910,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)) = uintptr(0) - var zBase uintptr = ts + 36830 + var zBase uintptr = ts + 36926 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147251,7 +148050,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36840, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147259,11 +148058,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, 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+36848, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147271,7 +148070,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147279,7 +148078,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36856, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147287,11 +148086,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, 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+36864, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147299,19 +148098,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36869, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36965, 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+36873, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36879, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36975, 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+36884, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147319,11 +148118,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36888, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36984, 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+36892, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147331,7 +148130,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147339,11 +148138,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36899, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36995, 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+36903, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147351,7 +148150,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36907, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147359,7 +148158,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147367,7 +148166,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147383,24 +148182,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36919, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36899, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36925, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37021, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36915, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37011, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -147415,137 +148214,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36932, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36899, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36947, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37043, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37048, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36848, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36944, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36957, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37053, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36843, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36939, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36915, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37011, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15410, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15457, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36925, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37021, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36976, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37077, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36884, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36980, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36991, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37087, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } 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+37089, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36907, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37003, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37095, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36915, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37011, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36899, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37013, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36899, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37114, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37024, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37120, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37007, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37040, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37136, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37140, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36907, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37003, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37148, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37154, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37007, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37064, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37160, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36925, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37021, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147560,16 +148359,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37071, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36856, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36952, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37076, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37172, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147577,21 +148376,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37177, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37183, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37040, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37136, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147599,7 +148398,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37189, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147607,9 +148406,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37195, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147624,12 +148423,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37105, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37201, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37109, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37205, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37112, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147638,7 +148437,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37115, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37211, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147794,7 +148593,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+37119) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37215) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -147974,22 +148773,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36830, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36926, 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 + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37230, 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 + 37140, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37236, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 @@ -149128,14 +149927,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+37155) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37251) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37159) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37255) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37163) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37259) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37172, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37268, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149161,19 +149960,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4)) = [3]uintptr{ - ts + 37206, - ts + 37246, - ts + 37281, + ts + 37302, + ts + 37342, + ts + 37377, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23180, *(*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+23275, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37324, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37420, 0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else { var nByte int32 @@ -149306,11 +150105,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+37357, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37453, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37388, + ts+37484, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -149334,7 +150133,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 68)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37439, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37535, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149618,7 +150417,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1527 + zCopy = ts + 1547 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -149729,7 +150528,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37465, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37561, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149751,7 +150550,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37475 + return ts + 37571 } func init() { @@ -150292,7 +151091,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch @@ -150602,16 +151401,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension @@ -150668,12 +151467,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 @@ -150688,6 +151487,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1052)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1060)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit @@ -150709,5 +151509,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 4dfe5a22f1..e7c31d8cf3 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -300,7 +300,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -833,7 +832,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -846,49 +845,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -897,21 +896,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -923,8 +922,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -936,22 +935,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -959,13 +958,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -980,13 +979,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0x0003 @@ -1510,7 +1509,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1606,6 +1605,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1741,6 +1741,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1771,6 +1772,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1871,6 +1873,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1944,7 +1948,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2052,8 +2056,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2471,6 +2475,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3373,7 +3378,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3704,6 +3718,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3714,6 +3729,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5253,6 +5286,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5292,6 +5336,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5342,7 +5387,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5357,6 +5402,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5725,8 +5771,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5743,7 +5788,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6005,8 +6049,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6351,17 +6395,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6391,7 +6424,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -6400,49 +6440,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 849, - ts + 875, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, ts + 895, - ts + 921, - ts + 944, - ts + 970, - ts + 992, - ts + 1013, - ts + 1024, - ts + 1032, - ts + 1046, - ts + 1059, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -6544,7 +6585,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -6592,10 +6632,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1092)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -6607,10 +6647,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -6620,21 +6656,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1079, - ts + 1083, - ts + 1088, - ts + 1092, - ts + 1100, - ts + 1105, + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, } // SQL is translated into a sequence of instructions to be @@ -6933,7 +6961,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7069,6 +7097,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7092,6 +7122,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7106,9 +7137,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7331,7 +7365,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1110, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -7357,13 +7391,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1118, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1126, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -7439,7 +7473,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -7461,7 +7495,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -7518,7 +7552,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1142) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 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))) @@ -7651,7 +7685,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1146, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -7675,12 +7709,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1169)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1189)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -7692,7 +7726,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1231) == 0 { if idx > 1 { return 1 } @@ -7714,7 +7748,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1216) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1236) == 0 { if idx > 1 { return 1 } @@ -7728,7 +7762,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1226) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -7736,7 +7770,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1236) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1256) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -7748,7 +7782,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -7782,9 +7816,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -7803,7 +7837,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1259, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1279, 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) { @@ -7817,14 +7851,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1269) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1289) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1275) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1295) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1300) == 0 { rc = 0 } break @@ -8150,7 +8184,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8160,13 +8194,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1289, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8184,41 +8218,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1321, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1307, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1327, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8231,7 +8265,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1332, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -8281,15 +8315,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1216}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1236}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1317}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1322}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1256}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1342}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1356}, + {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 + 1378}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1396}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -8440,7 +8474,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -8704,7 +8738,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1389, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1409, libc.VaList(bp, nByte)) } return p } @@ -8737,7 +8771,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1427, + ts+1447, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9148,7 +9182,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9184,7 +9218,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9204,7 +9238,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9253,24 +9287,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -9586,7 +9647,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -9659,8 +9720,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1497)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1530)) 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)}, @@ -9872,7 +9933,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1517, 1) + Xsqlite3_str_append(tls, pAccum, ts+1537, 1) goto __5 __11: ; @@ -10433,7 +10494,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1519 + bufpt = ts + 1539 length = 3 goto __58 __127: @@ -10493,7 +10554,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1523, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1543, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -10834,7 +10895,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1527 + bufpt = ts + 1547 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -10958,9 +11019,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1528 + return ts + 1548 } - return ts + 1533 + return ts + 1553 }() __220: ; @@ -11108,7 +11169,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1540, 1) + Xsqlite3_str_append(tls, pAccum, ts+1560, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11125,10 +11186,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1542, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1552, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11183,7 +11244,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1566)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1586)) // 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 @@ -11348,7 +11409,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1527, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1547, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -11580,20 +11641,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11606,46 +11773,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -12950,7 +13117,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1575 + var pow63 uintptr = ts + 1595 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -13496,7 +13663,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1594, + ts+1614, libc.VaList(bp, zType)) } @@ -13515,13 +13682,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1528) + logBadConnection(tls, ts+1548) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1639) + logBadConnection(tls, ts+1659) } return 0 } else { @@ -13534,7 +13701,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1648) + logBadConnection(tls, ts+1668) return 0 } else { return 1 @@ -14059,193 +14226,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1656, - ts + 1666, - ts + 1677, - ts + 1689, - ts + 1700, - ts + 1712, - ts + 1719, - ts + 1727, - ts + 1735, - ts + 1740, - ts + 1746, + ts + 1676, + ts + 1686, + ts + 1697, + ts + 1709, + ts + 1720, + ts + 1732, + ts + 1739, + ts + 1747, + ts + 1755, ts + 1760, - ts + 1766, - ts + 1776, - ts + 1781, - ts + 1786, - ts + 1789, - ts + 1795, - ts + 1808, - ts + 1818, - ts + 1822, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1860, + ts + 1765, + ts + 1771, + ts + 1785, + ts + 1791, + ts + 1801, + ts + 1806, + ts + 1811, + ts + 1814, + ts + 1820, + ts + 1827, + ts + 1831, + ts + 1841, + ts + 1848, + ts + 1855, + ts + 1862, ts + 1869, - ts + 1880, - ts + 1889, - ts + 1895, - ts + 1905, - ts + 1915, - ts + 1920, - ts + 1930, - ts + 1941, - ts + 1946, - ts + 1953, - ts + 1964, - ts + 1969, - ts + 1974, - ts + 1980, - ts + 1986, - ts + 1992, - ts + 1998, - ts + 2001, + ts + 1879, + ts + 1888, + ts + 1899, + ts + 1908, + ts + 1914, + ts + 1924, + ts + 1934, + ts + 1939, + ts + 1949, + ts + 1960, + ts + 1965, + ts + 1972, + ts + 1983, + ts + 1988, + ts + 1993, + ts + 1999, ts + 2005, - ts + 2016, - ts + 2027, + ts + 2011, + ts + 2014, + ts + 2018, + ts + 2024, ts + 2035, - ts + 2044, - ts + 2050, - ts + 2057, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, - ts + 2083, + ts + 2046, + ts + 2054, + ts + 2063, + ts + 2070, + ts + 2078, + ts + 2081, + ts + 2084, + ts + 2087, ts + 2090, - ts + 2100, - ts + 2113, - ts + 2124, - ts + 2130, - ts + 2137, - ts + 2142, - ts + 2151, - ts + 2160, - ts + 2167, - ts + 2180, - ts + 2191, - ts + 2196, - ts + 2204, + ts + 2093, + ts + 2096, + ts + 2103, + ts + 2109, + ts + 2119, + ts + 2132, + ts + 2143, + ts + 2149, + ts + 2156, + ts + 2165, + ts + 2174, + ts + 2181, + ts + 2194, + ts + 2205, ts + 2210, - ts + 2217, - ts + 2229, - ts + 2234, + ts + 2218, + ts + 2224, + ts + 2231, ts + 2243, ts + 2248, ts + 2257, ts + 2262, - ts + 2267, - ts + 2273, + ts + 2271, + ts + 2276, ts + 2281, - ts + 2289, - ts + 2299, - ts + 2307, - ts + 2314, - ts + 2327, - ts + 2332, - ts + 2344, - ts + 2352, - ts + 2359, - ts + 2370, - ts + 2377, + ts + 2287, + ts + 2295, + ts + 2303, + ts + 2313, + ts + 2321, + ts + 2328, + ts + 2341, + ts + 2346, + ts + 2358, + ts + 2366, + ts + 2373, ts + 2384, - ts + 2394, - ts + 2403, - ts + 2414, - ts + 2420, - ts + 2431, - ts + 2441, - ts + 2451, - ts + 2458, - ts + 2464, - ts + 2474, - ts + 2485, - ts + 2489, - ts + 2498, - ts + 2507, - ts + 2514, - ts + 2524, - ts + 2531, - ts + 2540, - ts + 2550, - ts + 2557, - ts + 2565, + ts + 2391, + ts + 2398, + ts + 2408, + ts + 2417, + ts + 2428, + ts + 2434, + ts + 2445, + ts + 2455, + ts + 2465, + ts + 2472, + ts + 2478, + ts + 2488, + ts + 2499, + ts + 2503, + ts + 2512, + ts + 2521, + ts + 2528, + ts + 2538, + ts + 2545, + ts + 2554, + ts + 2564, + ts + 2571, ts + 2579, - ts + 2587, + ts + 2593, ts + 2601, - ts + 2612, - ts + 2625, - ts + 2636, - ts + 2642, - ts + 2654, - ts + 2663, - ts + 2671, - ts + 2680, - ts + 2689, - ts + 2696, - ts + 2704, - ts + 2711, - ts + 2722, + ts + 2615, + ts + 2626, + ts + 2639, + ts + 2650, + ts + 2656, + ts + 2668, + ts + 2677, + ts + 2685, + ts + 2694, + ts + 2703, + ts + 2710, + ts + 2718, + ts + 2725, ts + 2736, - ts + 2747, - ts + 2755, + ts + 2750, ts + 2761, ts + 2769, - ts + 2777, - ts + 2787, - ts + 2800, - ts + 2810, - ts + 2823, - ts + 2832, - ts + 2843, - ts + 2851, + ts + 2775, + ts + 2783, + ts + 2791, + ts + 2801, + ts + 2814, + ts + 2824, + ts + 2837, + ts + 2846, ts + 2857, - ts + 2869, - ts + 2881, - ts + 2889, - ts + 2901, - ts + 2914, - ts + 2924, - ts + 2934, - ts + 2939, - ts + 2951, - ts + 2963, - ts + 2973, - ts + 2979, - ts + 2989, - ts + 2996, - ts + 3008, - ts + 3019, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3054, - ts + 3061, - ts + 3072, - ts + 3085, - ts + 3095, - ts + 3102, - ts + 3110, - ts + 3119, - ts + 3125, + ts + 2865, + ts + 2871, + ts + 2883, + ts + 2895, + ts + 2903, + ts + 2915, + ts + 2928, + ts + 2938, + ts + 2948, + ts + 2953, + ts + 2965, + ts + 2977, + ts + 2987, + ts + 2993, + ts + 3003, + ts + 3010, + ts + 3022, + ts + 3033, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3068, + ts + 3075, + ts + 3086, + ts + 3099, + ts + 3109, + ts + 3116, + ts + 3124, ts + 3133, - ts + 3141, - ts + 3149, - ts + 3159, - ts + 3168, - ts + 3179, - ts + 3189, - ts + 3195, - ts + 3206, - ts + 3217, - ts + 3222, - ts + 3230, + ts + 3139, + ts + 3147, + ts + 3155, + ts + 3163, + ts + 3173, + ts + 3182, + ts + 3193, + ts + 3203, + ts + 3209, + ts + 3220, + ts + 3231, + ts + 3236, + ts + 3244, } type pthread_once = struct { @@ -14672,35 +14839,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3240, FpCurrent: 0}, - {FzName: ts + 3245, FpCurrent: 0}, - {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, + {FzName: ts + 3254, FpCurrent: 0}, + {FzName: ts + 3259, FpCurrent: 0}, {FzName: ts + 3265, FpCurrent: 0}, - {FzName: ts + 3270, FpCurrent: 0}, - {FzName: ts + 3276, FpCurrent: 0}, - {FzName: ts + 3286, FpCurrent: 0}, - {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3297}, - {FzName: ts + 3303}, - {FzName: ts + 3311, FpCurrent: 0}, + {FzName: ts + 3272, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3284, FpCurrent: 0}, + {FzName: ts + 3290, FpCurrent: 0}, + {FzName: ts + 3300, FpCurrent: 0}, + {FzName: ts + 3306, FpCurrent: 0}, + {FzName: ts + 3311}, {FzName: ts + 3317}, - {FzName: ts + 3324}, - {FzName: ts + 3333, FpCurrent: 0}, - {FzName: ts + 3340}, - {FzName: ts + 3350, FpCurrent: 0}, - {FzName: ts + 3357, FpCurrent: 0}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3331}, + {FzName: ts + 3338}, + {FzName: ts + 3347, FpCurrent: 0}, + {FzName: ts + 3354}, + {FzName: ts + 3364, FpCurrent: 0}, {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3377, FpCurrent: 0}, - {FzName: ts + 3383, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3403, FpCurrent: 0}, - {FzName: ts + 3410}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, + {FzName: ts + 3397, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3412, FpCurrent: 0}, {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3438, FpCurrent: 0}, - {FzName: ts + 3444}, + {FzName: ts + 3424}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3452, FpCurrent: 0}, + {FzName: ts + 3458}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -14793,11 +14960,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3450, libc.VaList(bp, z, fd)) + ts+3464, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3493, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3507, O_RDONLY, int32(m)) < 0 { break } } @@ -14876,13 +15046,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__error(tls))) - zErr = ts + 1527 + zErr = ts + 1547 if zPath == uintptr(0) { - zPath = ts + 1527 + zPath = ts + 1547 } Xsqlite3_log(tls, errcode, - ts+3503, + ts+3517, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14890,7 +15060,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3245, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3259, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14911,7 +15081,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15013,19 +15183,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3534, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3548, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3558, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3572, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3587, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3601, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3614, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3628, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15388,7 +15558,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15661,7 +15831,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3642, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3656, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15679,7 +15849,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3357, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15696,14 +15866,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3645, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3659, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -15723,7 +15893,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -15778,7 +15948,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1527, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1547, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -15791,7 +15961,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -15859,7 +16029,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16018,7 +16188,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16046,7 +16216,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3276, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16109,7 +16279,7 @@ __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+3656, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3670, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16130,7 +16300,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3663, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3677, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -16145,7 +16315,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3240, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) goto shm_open_err __10: ; @@ -16271,11 +16441,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 224)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1527, 1, bp+224) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1547, 1, bp+224) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3311, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) goto shmpage_out __14: ; @@ -16321,7 +16491,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3398, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -16522,7 +16692,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3398 + var zErr uintptr = ts + 3412 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -16560,7 +16730,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -16675,10 +16845,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3676, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3690, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3681) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3695) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -16694,7 +16864,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -16707,7 +16877,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3691, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3705, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16715,7 +16885,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16728,15 +16898,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3699, - ts + 3708, - ts + 3717, - ts + 1540, + ts + 3713, + ts + 3722, + ts + 3731, + ts + 1560, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3722) - azTempDirs[1] = libc.Xgetenv(tls, ts+3736) + azTempDirs[0] = libc.Xgetenv(tls, ts+3736) + azTempDirs[1] = libc.Xgetenv(tls, ts+3750) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16781,7 +16951,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3743, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3757, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16866,7 +17036,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3760) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3774) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16914,10 +17084,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17031,7 +17201,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3240, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17122,7 +17292,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+3350, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) } return rc } @@ -17130,9 +17300,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+3767, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3781, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17199,18 +17369,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3438, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000 { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+224, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3429, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 224 + uintptr(got))) = int8(0) @@ -17250,14 +17420,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3258, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17311,7 +17481,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3642, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3656, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17339,11 +17509,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3773, O_RDONLY, uint16(0)) + fd = robust_open(tls, ts+3787, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -17354,7 +17524,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -17431,10 +17601,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3786, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3791, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3801, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3681, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3800, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3805, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3815, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3695, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -17489,7 +17659,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3814, + FzName: ts + 3828, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17656,40 +17826,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -17700,7 +17915,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3820, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3834, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17756,7 +17971,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -17832,7 +18047,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3642, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3656, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17953,7 +18168,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3835, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3849, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18026,7 +18241,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3858, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3872, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18089,6 +18304,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -18772,6 +18992,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18804,6 +19025,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21234,7 +21456,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3873, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3887, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -22371,7 +22593,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -22432,7 +22654,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3900, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3914, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -22445,7 +22667,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3909, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3923, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -22497,9 +22719,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3914, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22763,7 +22985,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22887,7 +23109,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22926,7 +23148,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23003,7 +23225,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23130,6 +23352,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24003,7 +24226,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24188,7 +24411,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3931, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3945, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24760,7 +24983,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24859,7 +25082,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25027,7 +25250,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3949, + ts+3963, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -25445,7 +25668,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -25590,7 +25813,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3986, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4000, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25720,7 +25943,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26193,7 +26416,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -26698,7 +26921,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27089,7 +27312,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4012)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4026)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27354,7 +27577,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -27491,7 +27714,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -27508,7 +27731,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -27516,7 +27739,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -27559,7 +27782,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -27569,7 +27792,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -27819,7 +28042,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27851,8 +28074,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27867,7 +28089,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -27877,7 +28099,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27890,7 +28112,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -27899,14 +28121,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -27916,7 +28138,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -27963,63 +28185,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28051,10 +28267,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28065,15 +28280,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28098,7 +28313,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28109,7 +28324,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28157,26 +28372,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28186,7 +28401,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28194,7 +28409,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28202,10 +28417,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28274,7 +28489,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -28304,11 +28519,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -28319,15 +28534,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28355,14 +28570,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -28376,7 +28591,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -28388,7 +28603,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -28491,7 +28706,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -28519,7 +28734,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -28558,7 +28773,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -28582,7 +28797,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -28631,7 +28846,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4028) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4042) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -29403,7 +29618,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4037, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4051, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -29441,7 +29656,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -29856,7 +30071,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29882,7 +30097,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -29890,6 +30105,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29899,7 +30117,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29915,7 +30133,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29976,7 +30194,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30011,7 +30229,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30071,7 +30289,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30110,7 +30328,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30141,7 +30359,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -30482,7 +30700,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30726,14 +30944,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30778,7 +30996,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30827,7 +31045,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -30906,10 +31124,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30917,7 +31133,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30979,7 +31196,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30999,7 +31216,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31019,7 +31236,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31231,7 +31448,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -31435,7 +31652,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -31500,7 +31717,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -31548,7 +31765,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -31667,7 +31884,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31827,7 +32044,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -31892,7 +32109,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -31928,7 +32145,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -31972,7 +32189,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32084,7 +32301,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32242,7 +32459,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -32299,7 +32516,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -32315,7 +32532,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -32389,7 +32606,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -32401,7 +32618,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -32412,7 +32629,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -32577,7 +32794,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32849,12 +33066,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -32862,7 +33079,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -32922,7 +33139,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33011,7 +33228,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33127,7 +33344,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -33445,7 +33662,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -33456,7 +33673,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -33614,7 +33831,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -33688,7 +33905,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -33750,7 +33967,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -33778,7 +33995,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34039,7 +34256,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34231,7 +34448,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34268,6 +34485,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -34358,7 +34577,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -34381,7 +34600,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -34461,7 +34680,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -34574,7 +34793,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -34635,7 +34854,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34673,13 +34892,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -34786,7 +35005,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34809,7 +35028,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34910,7 +35129,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -34918,11 +35137,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34997,7 +35216,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35066,7 +35285,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35095,7 +35314,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35171,7 +35390,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35185,7 +35404,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -35319,7 +35538,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35507,7 +35726,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4041, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4055, 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)) @@ -35532,11 +35751,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4043, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4057, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4066, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4080, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { @@ -35557,13 +35776,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4091, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4105, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4120, + ts+4134, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -35582,7 +35801,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4174, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4188, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -35593,7 +35812,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4196, libc.VaList(bp+8, iPage)) + ts+4210, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35616,12 +35835,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4235, + ts+4249, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4261 + return ts + 4275 } - return ts + 4266 + return ts + 4280 }(), expected-N, expected)) } @@ -35728,13 +35947,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4287 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4301 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4297, libc.VaList(bp, rc)) + ts+4311, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35745,7 +35964,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4335, libc.VaList(bp+8, rc)) + ts+4349, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35753,14 +35972,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4373, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4387, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4395 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4409 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35777,7 +35996,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4421 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4435 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35802,7 +36021,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4449, + checkAppendMsg(tls, pCheck, ts+4463, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35815,7 +36034,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4479, 0) + checkAppendMsg(tls, pCheck, ts+4493, 0) doCoverageCheck = 0 goto __10 __13: @@ -35831,7 +36050,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4503, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4517, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -35869,7 +36088,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4527, 0) + checkAppendMsg(tls, pCheck, ts+4541, 0) depth = d2 __21: ; @@ -35942,7 +36161,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4552, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4566, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -35959,7 +36178,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4589, + ts+4603, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36079,7 +36298,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4641 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4655 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)).FzPfx = uintptr(0) @@ -36115,7 +36334,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4657, + ts+4671, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36125,7 +36344,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4702, 0) + ts+4716, 0) __16: ; __10: @@ -36172,13 +36391,13 @@ __23: 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+4757, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4771, 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+4779, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4793, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -36413,6 +36632,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -36426,8 +36654,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -36435,7 +36663,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3642, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3656, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -36446,7 +36674,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4813, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4827, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -36461,7 +36689,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4833, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4847, 0) return SQLITE_ERROR } return SQLITE_OK @@ -36481,7 +36709,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4864, 0) + pDestDb, SQLITE_ERROR, ts+4878, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36929,7 +37157,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+4904, + Xsqlite3_str_appendf(tls, bp+8, ts+4918, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37346,6 +37574,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37361,7 +37602,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -37421,6 +37662,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -37503,7 +37747,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1527 + return ts + 1547 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -37735,7 +37979,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37967,7 +38211,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38029,7 +38273,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1527 + zNeg = ts + 1547 rc = SQLITE_OK __1: @@ -38070,7 +38314,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4911 + zNeg = ts + 4925 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38089,7 +38333,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4913, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4927, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -38393,7 +38637,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -38408,14 +38652,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -38474,6 +38718,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -38498,10 +38745,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -38539,21 +38786,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38902,85 +39157,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39080,6 +39367,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39107,7 +39404,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39115,12 +39412,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39139,7 +39436,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39190,7 +39489,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -39319,8 +39618,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -39331,10 +39630,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39345,6 +39640,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39360,34 +39660,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4918, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4932, 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 + 1527 + zColl = ts + 1547 } - if libc.Xstrcmp(tls, zColl, ts+1072) == 0 { - zColl = ts + 4923 + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 4937 } - Xsqlite3_str_appendf(tls, bp+144, ts+4925, + Xsqlite3_str_appendf(tls, bp+144, ts+4939, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4911 + return ts + 4925 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4933 + return ts + 4947 } - return ts + 1527 + return ts + 1547 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4936, 1) + Xsqlite3_str_append(tls, bp+144, ts+4950, 1) break } @@ -39395,7 +39695,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -39403,32 +39703,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1307, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1301, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -39438,13 +39738,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1307, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, 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+1301, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1528 + zP4 = ts + 1548 } else { - zP4 = ts + 4957 + zP4 = ts + 4971 } break @@ -39452,7 +39752,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4964, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4978, libc.VaList(bp+120, pVtab)) break } @@ -39463,20 +39763,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4972, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4986, 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+4977, 1) + Xsqlite3_str_append(tls, bp+144, ts+4991, 1) break } case -4: { - zP4 = ts + 4979 + zP4 = ts + 4993 break } @@ -39501,7 +39801,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4987, ts + 4989, ts + 4991, ts + 4996} +var encnames = [4]uintptr{ts + 5001, ts + 5003, ts + 5005, ts + 5010} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -39603,7 +39903,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39952,8 +40252,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5001, ts + 5006, ts + 5013, ts + 5016, ts + 5019, ts + 5022, ts + 5025, ts + 5028, - ts + 5036, ts + 5039, ts + 5046, ts + 5054, + ts + 5015, ts + 5020, ts + 5027, ts + 5030, ts + 5033, ts + 5036, ts + 5039, ts + 5042, + ts + 5050, ts + 5053, ts + 5060, ts + 5068, } // Close a VDBE cursor and release all the resources that cursor @@ -40162,7 +40462,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5061, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5075, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40170,16 +40470,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5073, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5101, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5102, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5116, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -40325,7 +40625,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5115, 0) + Xsqlite3VdbeError(tls, p, ts+5129, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -40605,7 +40905,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40615,14 +40915,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40633,16 +40935,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40659,7 +40957,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41210,16 +41508,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41237,7 +41539,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -41267,7 +41573,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41301,7 +41607,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41324,7 +41630,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -41346,7 +41652,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -41490,7 +41803,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -41661,7 +41974,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41687,7 +42000,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41730,7 +42043,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -41798,13 +42111,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5145 + zContext = ts + 5159 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5164 + zContext = ts + 5178 } else { - zContext = ts + 5183 + zContext = ts + 5197 } - zMsg = Xsqlite3_mprintf(tls, ts+5192, + zMsg = Xsqlite3_mprintf(tls, ts+5206, 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) @@ -41835,7 +42148,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41890,7 +42203,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41909,7 +42222,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5228, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5242, 0) return 1 } else { return 0 @@ -41919,7 +42232,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5273, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5287, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41961,14 +42274,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42180,6 +42494,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -42376,7 +42694,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5313, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5327, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -42567,7 +42885,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42642,7 +42960,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5336) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5350) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43071,35 +43389,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5346, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5360, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43114,7 +43431,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43146,7 +43463,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43161,7 +43478,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43172,7 +43489,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43182,7 +43499,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43258,7 +43575,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43402,7 +43719,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -43420,8 +43737,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -43485,7 +43805,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -43629,7 +43949,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -43801,7 +44121,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5386, 3) + Xsqlite3_str_append(tls, bp+48, ts+5400, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -43837,11 +44157,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1528, 4) + Xsqlite3_str_append(tls, bp+48, ts+1548, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1307, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1327, 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+4904, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4918, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43856,21 +44176,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5390, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5404, 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+5397, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5410, 2) + Xsqlite3_str_append(tls, bp+48, ts+5424, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5413, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5427, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5418, 1) + Xsqlite3_str_append(tls, bp+48, ts+5432, 1) } } } @@ -43926,7 +44246,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44030,12 +44351,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44087,11 +44407,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1088, - ts + 1100, - ts + 1105, - ts + 1083, - ts + 1528, + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1548, } // Execute as much of a VDBE program as we can. @@ -44129,7 +44449,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44158,11 +44477,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44232,42 +44554,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44275,52 +44598,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44362,19 +44685,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -44383,7 +44706,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -44391,11 +44714,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44631,7 +44954,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45127,20 +45450,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5420, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5434, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5441, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5455, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5448, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5462, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -45530,14 +45853,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45615,72 +45938,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45697,10 +46028,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -45712,33 +46043,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45747,43 +46078,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45799,26 +46130,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45826,12 +46157,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45846,17 +46177,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45871,163 +46202,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46036,20 +46367,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46059,15 +46390,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46075,9 +46406,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46089,52 +46420,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46143,24 +46474,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46174,13 +46505,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46189,38 +46520,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46229,10 +46560,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46240,10 +46571,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46251,35 +46582,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -46287,372 +46656,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46660,15 +47030,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46677,124 +47047,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5472, + Xsqlite3VdbeError(tls, p, ts+5486, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46804,40 +47174,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46855,339 +47225,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47196,20 +47566,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47220,244 +47590,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5513, 0) + Xsqlite3VdbeError(tls, p, ts+5527, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5564, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5578, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5586, 0) + ts+5600, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -47466,172 +47836,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5640, 0) + ts+5654, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5695 + return ts + 5709 } return func() uintptr { if iRollback != 0 { - return ts + 5743 + return ts + 5757 } - return ts + 5786 + return ts + 5800 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5827) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5841) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47651,36 +48021,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47688,22 +48058,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47714,24 +48084,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -47739,30 +48109,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47778,10 +48148,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47790,10 +48160,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47813,83 +48183,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1547 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47898,31 +48268,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47930,10 +48300,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47954,105 +48324,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48064,231 +48434,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48298,85 +48670,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -48384,59 +48756,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -48451,121 +48823,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -48573,93 +48945,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48672,7 +49044,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -48687,81 +49059,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48771,38 +49143,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48810,205 +49182,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49018,90 +49390,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49110,36 +49482,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49150,88 +49522,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -49243,35 +49615,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -49280,63 +49652,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49345,13 +49717,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -49359,20 +49731,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -49382,45 +49754,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -49433,10 +49805,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -49447,10 +49819,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -49458,30 +49830,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5872 + goto __797 +__796: + zSchema = ts + 5886 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5886, + ts+5900, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -49491,36 +49863,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -49528,10 +49900,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -49563,22 +49935,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -49588,15 +49960,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -49606,17 +49978,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -49626,34 +49998,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49662,48 +50034,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5929, 0) + Xsqlite3VdbeError(tls, p, ts+5943, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -49711,10 +50083,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49736,24 +50108,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49785,78 +50157,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49864,11 +50236,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49884,14 +50256,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -49899,16 +50271,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49916,16 +50288,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49936,10 +50308,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -49962,73 +50334,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50038,22 +50410,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50066,32 +50438,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50103,70 +50475,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5966, + ts+5980, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6018 + return ts + 6032 } - return ts + 6023 + return ts + 6037 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50174,17 +50546,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50194,10 +50566,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50211,10 +50583,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50224,69 +50596,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6030, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6044, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -50294,16 +50666,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -50316,17 +50688,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -50336,24 +50708,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50361,52 +50733,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5336, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5350, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -50415,54 +50787,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -50470,69 +50842,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -50544,27 +50916,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -50572,42 +50944,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50616,41 +50988,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50664,16 +51036,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50685,25 +51057,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50712,24 +51084,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50754,16 +51126,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -50778,66 +51150,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -50858,73 +51230,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6065, + Xsqlite3_log(tls, rc, ts+6079, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50932,13 +51304,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5313, 0) + Xsqlite3VdbeError(tls, p, ts+5327, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1463, 0) + Xsqlite3VdbeError(tls, p, ts+1483, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -50949,10 +51321,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6097, ts + 6106, ts + 6113, - ts + 6119} +var azType = [4]uintptr{ts + 6111, ts + 6120, ts + 6127, + ts + 6133} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51001,16 +51377,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6131, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6145, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6160 + return ts + 6174 } return func() uintptr { if type1 == U32(7) { - return ts + 6165 + return ts + 6179 } - return ts + 6170 + return ts + 6184 }() }())) rc = SQLITE_ERROR @@ -51030,10 +51406,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6178, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6192, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51043,8 +51419,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51064,7 +51440,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51084,8 +51460,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51093,21 +51469,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6198, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6212, 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+6228, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6242, 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+6264, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6278, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51116,8 +51492,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51150,8 +51526,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6285, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6299, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51178,7 +51554,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6306 + zFault = ts + 6320 __22: ; goto __20 @@ -51211,7 +51587,7 @@ __26: 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 + 6318 + zFault = ts + 6332 __29: ; goto __27 @@ -51231,8 +51607,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6326, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6340, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51301,7 +51677,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51329,12 +51705,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3642 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3656 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51378,7 +51754,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51461,7 +51837,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51474,7 +51850,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53914,11 +54290,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54078,7 +54450,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6360, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6374, zDb) == 0) { goto __8 } @@ -54199,7 +54571,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6365) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6379) != 0) { goto __33 } goto __14 @@ -54355,14 +54727,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6367, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6381, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6371, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6385, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -54379,7 +54751,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6375, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6389, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -54473,7 +54845,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54482,7 +54854,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54537,7 +54909,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6384, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6398, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -54545,14 +54917,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6415, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6429, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return WRC_Abort __87: ; @@ -54604,7 +54976,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6470, libc.VaList(bp+16, zCol)) + ts+6484, 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 @@ -54641,7 +55013,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6505 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6519 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54654,23 +55026,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6514 + zErr = ts + 6528 } else { - zErr = ts + 6529 + zErr = ts + 6543 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6551, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54773,15 +55145,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6581 + var zIn uintptr = ts + 6595 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6609 + zIn = ts + 6623 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6627 + zIn = ts + 6641 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6645 + zIn = ts + 6659 } - Xsqlite3ErrorMsg(tls, pParse, ts+6663, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6677, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54860,10 +55232,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6683 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6697 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54910,7 +55282,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6694, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6708, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54974,7 +55346,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6711, libc.VaList(bp, pExpr)) + ts+6725, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54990,7 +55362,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6775, + Xsqlite3ErrorMsg(tls, pParse, ts+6789, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55004,7 +55376,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6811, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6825, uintptr(0), pExpr) } } else { @@ -55027,30 +55399,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6839, libc.VaList(bp+16, pExpr)) + ts+6853, 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 + 6882 + zType = ts + 6896 } else { - zType = ts + 6889 + zType = ts + 6903 } - Xsqlite3ErrorMsg(tls, pParse, ts+6899, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6913, 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+6927, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6941, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6949, + Xsqlite3ErrorMsg(tls, pParse, ts+6963, 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+6993, + ts+7007, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55122,7 +55494,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7041, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7055, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55138,7 +55510,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7052, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7066, pExpr, pExpr) } break @@ -55194,7 +55566,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55269,7 +55641,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7063, libc.VaList(bp, i, zType, mx)) + ts+7077, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55289,7 +55661,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7133, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55324,7 +55696,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7153, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7167, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55381,7 +55753,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7159, libc.VaList(bp, i+1)) + ts+7173, libc.VaList(bp, i+1)) return 1 } } @@ -55409,7 +55781,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7220, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7234, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55623,7 +55995,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7251, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7265, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55663,7 +56035,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7153) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55674,7 +56046,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7290) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7304) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55686,7 +56058,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7296, 0) + ts+7310, 0) return WRC_Abort } @@ -55786,12 +56158,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -55827,12 +56199,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -55951,9 +56323,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -56041,14 +56411,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -56376,7 +56745,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return } @@ -56451,7 +56820,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7355, libc.VaList(bp, mxHeight)) + ts+7369, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -56619,12 +56988,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56695,12 +57069,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7403, + Xsqlite3ErrorMsg(tls, pParse, ts+7417, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7447 + return ts + 7461 } - return ts + 1527 + return ts + 1547 }(), nElem)) break } @@ -56739,7 +57113,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56765,7 +57139,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7451, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7465, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56793,7 +57167,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7485, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7499, libc.VaList(bp, pExpr)) } } } @@ -56840,7 +57214,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7505, + Xsqlite3ErrorMsg(tls, pParse, ts+7519, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56865,7 +57239,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7548, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7562, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56886,11 +57260,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56919,7 +57290,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57015,7 +57390,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -57439,7 +57814,7 @@ __2: 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+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57562,7 +57937,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7601, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7615, libc.VaList(bp, zObject)) } } @@ -57572,10 +57947,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -57616,10 +57993,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6683) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6697) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6688) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6702) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58050,13 +58427,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7624) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7652) == 0 { return 1 } return 0 @@ -58260,7 +58637,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7642, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7656, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58338,7 +58715,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7889, + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59732,7 +60148,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59746,10 +60162,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59762,8 +60178,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59771,12 +60187,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59802,10 +60218,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59816,14 +60230,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59853,27 +60269,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59882,9 +60298,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59892,15 +60308,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7942, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7956, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59931,8 +60347,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7969, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7983, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60054,8 +60470,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60076,9 +60492,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60091,13 +60507,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60108,11 +60524,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60134,12 +60550,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60154,14 +60570,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60169,9 +60609,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60181,15 +60621,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60199,22 +60639,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60223,51 +60663,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7993, 0) + ts+8007, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60276,18 +60716,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8043)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8057)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -60499,7 +60939,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60738,6 +61178,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60964,6 +61405,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61109,7 +61551,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61635,7 +62081,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61653,8 +62101,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61722,6 +62169,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61745,7 +62194,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61768,7 +62219,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61781,7 +62232,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61801,7 +62254,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61941,7 +62396,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61949,7 +62404,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62000,11 +62455,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 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+8059, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62016,13 +62471,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8087, + ts+8101, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8262, + ts+8276, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62032,10 +62487,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8436, libc.VaList(bp, zDb, zDb)) + ts+8450, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8583, 0) + ts+8597, 0) } } @@ -62099,7 +62554,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8734, libc.VaList(bp, zName)) + ts+8748, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62109,7 +62564,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8793, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8807, zName)) { goto __6 } goto exit_rename_table @@ -62118,7 +62573,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8813, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62159,19 +62614,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8826, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8840, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9010, + ts+9024, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9315, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9329, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9331, + ts+9345, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62179,7 +62634,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9389, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9403, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62191,7 +62646,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9654, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9668, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62203,7 +62658,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9667, + ts+9681, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62249,12 +62704,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9705, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9719, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9737, 0) + ts+9751, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62264,11 +62719,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9764) + ts+9778) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9823) + ts+9837) } if pDflt != 0 { @@ -62281,12 +62736,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9876) + ts+9890) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9922) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9936) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62297,7 +62752,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9949, + ts+9963, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62319,7 +62774,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10095, + ts+10109, libc.VaList(bp+40, zTab, zDb)) } } @@ -62367,14 +62822,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10325, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10339, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10359, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10373, 0) goto exit_begin_add_column __4: ; @@ -62402,7 +62857,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10389, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10403, 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 } @@ -62442,18 +62897,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10408 + zType = ts + 10422 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10413 + zType = ts + 10427 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10427, + Xsqlite3ErrorMsg(tls, pParse, ts+10441, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10445 + return ts + 10459 } - return ts + 10462 + return ts + 10476 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62537,11 +62992,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -62554,17 +63009,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10501, + ts+10515, 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+10683, + ts+10697, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9654, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9668, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62759,7 +63214,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -62822,12 +63277,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10814, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10828, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -62867,8 +63322,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10839, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10853, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62885,7 +63340,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62907,7 +63362,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10847, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10861, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62947,12 +63402,12 @@ 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+10853, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10867, 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 + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63126,8 +63581,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63210,15 +63665,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63246,7 +63701,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63279,13 +63734,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63298,7 +63753,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63313,7 +63768,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -63369,8 +63824,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -63418,7 +63873,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -63438,7 +63893,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -63486,8 +63941,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63529,11 +63984,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -63603,7 +64058,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -63626,8 +64081,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63645,16 +64100,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63669,31 +64124,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63711,8 +64166,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63738,9 +64193,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63768,8 +64223,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -63806,7 +64261,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -63830,7 +64285,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10858, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10872, 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) @@ -63911,19 +64366,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pName)) goto exit_drop_column __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+10865, + Xsqlite3ErrorMsg(tls, pParse, ts+10879, 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 + 10893 + return ts + 10907 } - return ts + 6106 + return ts + 6120 }(), zCol)) goto exit_drop_column @@ -63932,7 +64387,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10905, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10919, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63946,13 +64401,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10953, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10967, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11074, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11088, 1) 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 @@ -64070,11 +64525,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11092}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11133}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11152}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11171}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11106}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11127}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11147}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11166}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11185}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64108,7 +64563,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11194, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11208, 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) } @@ -64117,10 +64572,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+11217, + ts+11231, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11247, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11261, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64138,9 +64593,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11265, FzCols: ts + 11278}, - {FzName: ts + 11291, FzCols: ts + 11304}, - {FzName: ts + 11332}, + {FzName: ts + 11279, FzCols: ts + 11292}, + {FzName: ts + 11305, FzCols: ts + 11318}, + {FzName: ts + 11346}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64331,7 +64786,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11345} + FzName: ts + 11359} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -64582,7 +65037,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11355} + FzName: ts + 11369} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -64596,7 +65051,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11365, + Xsqlite3_str_appendf(tls, bp+24, ts+11379, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -64609,7 +65064,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11370, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11384, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64651,7 +65106,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11376, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11390, 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)).FnChar-- @@ -64665,7 +65120,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11382} + FzName: ts + 11396} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64709,7 +65164,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11391, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11405, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64726,7 +65181,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+11265, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11279, 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, -6) @@ -64882,7 +65337,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64939,7 +65394,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+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64986,9 +65441,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+11405) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11419) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11409) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11423) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65071,7 +65526,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1527 + z = ts + 1547 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65093,15 +65548,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+11413, z) == 0 { + if Xsqlite3_strglob(tls, ts+11427, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11424, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11438, 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+11434, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11448, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -65377,11 +65832,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11291, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11305, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11446, - ts+11500, + ts+11460, + ts+11514, zDb) } return rc @@ -65428,10 +65883,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11265, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11279, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11552, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11566, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65489,7 +65944,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6360, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6374, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -65519,20 +65974,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1527 + zFile = ts + 1547 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1527 + zName = ts + 1547 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3814) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3828) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -65548,13 +66003,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11593, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11607, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11596, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11610, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -65568,7 +66023,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11633, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11647, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -65579,7 +66034,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -65632,7 +66087,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11663, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11677, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65649,7 +66104,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11692, 0) + ts+11706, 0) rc = SQLITE_ERROR __23: ; @@ -65715,13 +66170,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1463, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11760, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11774, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65768,7 +66223,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1527 + zName = ts + 1547 __1: ; i = 0 @@ -65799,14 +66254,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11788, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11802, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11809, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11823, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65814,7 +66269,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11835, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11849, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65925,7 +66380,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11857} + FzName: ts + 11871} // Called by the parser to compile an ATTACH statement. // @@ -65938,7 +66393,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11871} + FzName: ts + 11885} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65952,7 +66407,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11885, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11899, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65984,7 +66439,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+11909, + ts+11923, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66159,7 +66614,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11955, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11969, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66185,11 +66640,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+11978, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11984, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11998, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11990, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12004, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66236,7 +66691,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7632 + zCol = ts + 7646 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66260,7 +66715,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+12017, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12031, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66354,6 +66809,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66381,9 +66838,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -66402,62 +66858,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -66504,13 +66952,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66535,25 +66983,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6360) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6374) == 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+8051, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12065) + ts+12079) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5872) + ts+5886) } } } @@ -66574,12 +67022,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5872) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5886) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12065) + ts+12079) } } } @@ -66608,9 +67056,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12084, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12098, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -66621,21 +67069,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12092 + zMsg = ts + 12106 } else { - zMsg = ts + 12105 + zMsg = ts + 12119 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66665,12 +67113,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { - return ts + 12051 + if Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { + return ts + 12065 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { - return ts + 12032 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12079+7) == 0 { + return ts + 12046 } } return zName @@ -66775,10 +67223,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -66934,11 +67382,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66955,7 +67403,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -66984,7 +67432,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67028,7 +67476,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5872) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5886) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67054,7 +67502,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6360, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6374, zName) { goto __3 } @@ -67107,13 +67555,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+12119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12133, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12136, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12150, libc.VaList(bp, pName1)) return -1 } } else { @@ -67151,13 +67599,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8051, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8065, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12156, + Xsqlite3ErrorMsg(tls, pParse, ts+12170, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67317,9 +67765,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67335,7 +67783,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12212, 0) return __4: ; @@ -67363,9 +67811,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), zName) != 0) { goto __8 } @@ -67381,9 +67829,9 @@ __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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67414,12 +67862,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12239, + Xsqlite3ErrorMsg(tls, pParse, ts+12253, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67434,7 +67882,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12274, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67469,8 +67917,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -67491,7 +67939,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -67521,7 +67969,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12295, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12309, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67545,7 +67993,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12326, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67554,7 +68002,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -67565,7 +68013,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12295 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12309 (*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) @@ -67577,7 +68025,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12295, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12309, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -67611,7 +68059,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -67619,13 +68067,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12369, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12383, 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)).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+12376, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12390, 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)).Fn-- @@ -67662,7 +68110,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+12386, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67826,10 +68274,10 @@ 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+12412, + Xsqlite3ErrorMsg(tls, pParse, ts+12426, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12471, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -67860,7 +68308,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12498, 0) + ts+12512, 0) } } @@ -67905,7 +68353,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12550, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12564, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67994,7 +68442,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12591, 0) + ts+12605, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68020,7 +68468,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -68089,7 +68537,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12647, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12661, 0) goto generated_done __2: ; @@ -68102,13 +68550,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12690, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12704, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12698, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12712, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68141,7 +68589,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12705, + Xsqlite3ErrorMsg(tls, pParse, ts+12719, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68262,13 +68710,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1527 - zSep2 = ts + 12736 - zEnd = ts + 4936 + zSep = ts + 1547 + zSep2 = ts + 12750 + zEnd = ts + 4950 } else { - zSep = ts + 12738 - zSep2 = ts + 12742 - zEnd = ts + 12747 + zSep = ts + 12752 + zSep2 = ts + 12756 + zEnd = ts + 12761 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68276,7 +68724,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12750, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12764, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -68310,16 +68758,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3642, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3656, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1527, - ts + 12764, - ts + 12770, - ts + 12775, - ts + 12780, + ts + 1547, + ts + 12778, + ts + 12784, + ts + 12789, + ts + 12794, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -68458,8 +68906,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -68586,7 +69034,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -68610,7 +69058,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -68709,7 +69157,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -68726,10 +69174,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+12786, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) + ts+12800, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12819, + Xsqlite3ErrorMsg(tls, pParse, ts+12833, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68748,11 +69196,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+12846, 0) + ts+12860, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12896, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12910, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68786,7 +69234,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12928, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12942, 0) return } } @@ -68811,11 +69259,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8793 - zType2 = ts + 12972 + zType = ts + 8807 + zType2 = ts + 12986 } else { - zType = ts + 10408 - zType2 = ts + 12978 + zType = ts + 10422 + zType2 = ts + 12992 } if pSelect != 0 { @@ -68877,7 +69325,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -68886,11 +69334,11 @@ 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+12983, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12997, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12998, + ts+13012, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68906,13 +69354,13 @@ 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+13096, + ts+13110, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13138, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13152, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68927,7 +69375,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9315) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9329) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68957,7 +69405,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+13172, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13186, 0) goto create_view_fail __1: ; @@ -68973,7 +69421,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10408, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10422, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69036,10 +69484,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69057,12 +69502,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13208, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69122,6 +69563,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69181,13 +69629,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13238, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13252, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13253, + ts+13267, 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) } @@ -69228,10 +69676,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13320, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13334, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11217, + ts+11231, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69263,12 +69711,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13334, + ts+13348, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13379, + ts+13393, 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) @@ -69296,11 +69744,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3265, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7052, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7066, 10) == 0 { return 0 } return 1 @@ -69378,9 +69826,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -69439,21 +69887,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13446, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13460, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13474, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13488, 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+13508, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13522, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69465,7 +69913,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11409, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11423, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69529,7 +69977,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13540, + ts+13554, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -69541,7 +69989,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13603, 0) + ts+13617, 0) goto fk_end goto __7 __6: @@ -69626,7 +70074,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13697, + ts+13711, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -69853,12 +70301,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13743, + Xsqlite3ErrorMsg(tls, pParse, ts+13757, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13771 + return ts + 13785 } - return ts + 13777 + return ts + 13791 }())) return 1 } @@ -69979,7 +70427,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13782, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13796, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -69998,7 +70446,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13788, + ts+13802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70024,26 +70472,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13838, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13852, 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+13866, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13880, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13891, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13905, 0) goto exit_create_index __17: ; @@ -70057,7 +70505,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13782, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13796, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70069,10 +70517,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13925, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13939, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70084,7 +70532,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13959, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13973, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70113,7 +70561,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13983, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13997, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70134,9 +70582,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70175,7 +70623,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13782) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13796) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70276,7 +70724,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14006, 0) + ts+14020, 0) goto exit_create_index __56: ; @@ -70290,6 +70738,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -70310,6 +70759,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -70491,7 +70941,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14067, libc.VaList(bp+48, 0)) + ts+14081, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70543,8 +70993,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14109, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14123, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -70590,12 +71040,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14126, + zStmt = Xsqlite3MPrintf(tls, db, ts+14140, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1527 + return ts + 1547 } - return ts + 14146 + return ts + 14160 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70603,7 +71053,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14154, + ts+14168, 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, @@ -70617,7 +71067,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14213, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14227, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70778,7 +71228,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14240, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14254, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70793,7 +71243,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14258, libc.VaList(bp+8, 0)) + ts+14272, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70804,9 +71254,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70832,9 +71282,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14331, + ts+14345, 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+11405, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11419, (*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) @@ -70915,6 +71365,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70922,7 +71373,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70968,7 +71419,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+14391, + Xsqlite3ErrorMsg(tls, pParse, ts+14405, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71103,6 +71554,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71114,11 +71566,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -71145,7 +71599,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71173,12 +71627,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14427, + Xsqlite3ErrorMsg(tls, pParse, ts+14441, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14463 + return ts + 14477 } - return ts + 14466 + return ts + 14480 }())) goto append_from_error __1: @@ -71347,7 +71801,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14472, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14486, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71383,9 +71837,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14478 + return ts + 14492 } - return ts + 14487 + return ts + 14501 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71410,7 +71864,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14472, ts + 14494, ts + 14478} +var az = [3]uintptr{ts + 14486, ts + 14508, ts + 14492} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71425,7 +71879,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14502, 0) + ts+14516, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71443,7 +71897,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11992, 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+14586, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14600, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71729,7 +72183,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14595, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71825,7 +72279,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+14641, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, zName)) } } } @@ -71925,7 +72379,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71939,7 +72393,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72018,7 +72472,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14671, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14685, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72145,7 +72599,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72179,7 +72633,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72202,26 +72656,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -72287,10 +72742,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14716, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -72303,19 +72774,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14702, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14749, 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+14731, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14778, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -72542,17 +73015,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -72565,10 +73040,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -72577,15 +73052,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -72594,98 +73069,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72693,138 +73168,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14816) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72927,7 +73407,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+11265) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11279) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73157,7 +73637,7 @@ 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 + 6170, ts + 6165, ts + 7924, ts + 7919, ts + 6160} +var azType2 = [5]uintptr{ts + 6184, ts + 6179, ts + 7938, ts + 7933, ts + 6174} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73216,7 +73696,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) return } iVal = -iVal @@ -73520,7 +74000,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14799, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14846, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73710,7 +74190,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73823,13 +74303,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73852,7 +74346,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14804, -1) + Xsqlite3_result_error(tls, context, ts+14851, -1) return } if argc == 3 { @@ -73862,7 +74356,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14837, -1) + ts+14884, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73915,7 +74409,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73955,13 +74449,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4904, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4918, 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+14882, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14929, libc.VaList(bp+8, r1)) } } break @@ -73969,7 +74463,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1307, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1327, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -73998,13 +74492,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14889, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1528, 4) + Xsqlite3_str_append(tls, pStr, ts+1548, 4) break } @@ -74314,7 +74808,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10837} +var azOne = [1]uintptr{ts + 10851} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74326,7 +74820,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1527 + zIn = ts + 1547 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -74350,7 +74844,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14892, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14939, 4, uintptr(0)) } } @@ -74375,7 +74869,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12017, -1) + Xsqlite3_result_error(tls, context, ts+12031, -1) return } @@ -74453,7 +74947,7 @@ func sumFinalize(tls *libc.TLS, context 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+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74715,7 +75209,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14897, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14944, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74735,14 +75229,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14903, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14903, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74982,107 +75476,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14908}, - {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 + 14928}, - {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 + 14941}, - {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 + 14959}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14968}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14991}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15017}, - {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 + 15042}, - {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 + 15051}, - {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 + 15062}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15069}, - {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 + 15083}, - {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 + 15083}, - {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 + 15089}, - {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 + 15089}, - {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 + 15095}, - {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 + 15095}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15100}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15100}, - {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 + 15100}, - {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 + 15104}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15104}, - {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 + 15104}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15108}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15136}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15179}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15185}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15189}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15236}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15253}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15296}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15310}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {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 + 15344}, - {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 + 15348}, - {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 + 15354}, - {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 + 15358}, - {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 + 15358}, - {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 + 15364}, - {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 + 15364}, - {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 + 15377}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15387}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, - {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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15407}, - {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 + 15410}, - {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 + 15414}, - {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 + 15420}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15429}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(2), 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 + 15443}, + {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 + 14955}, + {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 + 14975}, + {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 + 14988}, + {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 + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15015}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15038}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15064}, + {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 + 15089}, + {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 + 15098}, + {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 + 15109}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15116}, + {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 + 15130}, + {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 + 15130}, + {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 + 15136}, + {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 + 15136}, + {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 + 15142}, + {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 + 15142}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15147}, + {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 + 15147}, + {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 + 15151}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15151}, + {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 + 15151}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15155}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15170}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15183}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(1), 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 + 15205}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, + {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 + 15220}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15226}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15236}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15243}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15283}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15300}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15311}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15335}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15343}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15357}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {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 + 15391}, + {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 + 15395}, + {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 + 15401}, + {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 + 15405}, + {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 + 15405}, + {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 + 15411}, + {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 + 15411}, + {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 + 15424}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {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 + 15442}, {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(2), 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 + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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(1)), FxSFunc: 0, FzName: ts + 15457}, + {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 + 15461}, + {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 + 15467}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15457}, {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 + 15476}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15481}, - {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}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15503}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15509}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, - {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 + 15533}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6505}, - {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 + 15538}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(2), 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 + 15490}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15495}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15511}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15515}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15523}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15528}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15533}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15544}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15550}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15556}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15561}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15569}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15580}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6519}, + {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 + 15585}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75203,7 +75697,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+15542, + ts+15589, 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) @@ -75863,8 +76357,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6371, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6367, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6385, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6381, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75943,7 +76437,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5115) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5129) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -76045,7 +76539,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76153,6 +76647,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76193,13 +76708,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76211,21 +76725,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -76296,7 +76800,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -76354,7 +76858,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7889, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76657,6 +77161,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76820,7 +77326,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15587, + ts+15634, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -76845,7 +77351,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15628, + Xsqlite3ErrorMsg(tls, pParse, ts+15675, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76994,7 +77500,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15660, + ts+15707, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77004,7 +77510,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15712, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15759, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77056,7 +77562,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15737, + Xsqlite3ErrorMsg(tls, pParse, ts+15784, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77064,7 +77570,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15830, 0) goto insert_cleanup __57: ; @@ -77246,7 +77752,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77261,137 +77780,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -77403,64 +77922,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15804) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15851) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -77468,7 +77991,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77771,7 +78298,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11992, 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) @@ -78861,13 +79388,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1527 + zSql = ts + 1547 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -79306,6 +79833,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79344,7 +79872,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12017, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12031, 0) __3: ; return SQLITE_ERROR @@ -79353,7 +79881,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15818 + zEntry = ts + 15865 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79368,7 +79896,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11978, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79404,7 +79932,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15841, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15888, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79418,7 +79946,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15850, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15897, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79442,7 +79970,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15854, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15901, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79460,7 +79988,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15860, libc.VaList(bp+16, zEntry, zFile)) + ts+15907, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -79487,7 +80015,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15903, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15950, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -79525,7 +80053,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15935, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15982, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -79535,7 +80063,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15972, + ts + 16019, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79691,7 +80219,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15975, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16022, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79699,63 +80227,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5036, - ts + 16014, - ts + 8793, - ts + 16018, - ts + 16023, - ts + 16026, - ts + 16036, - ts + 16046, - ts + 16052, - ts + 16056, - ts + 16061, - ts + 16066, - ts + 16074, - ts + 16085, - ts + 16088, - ts + 16095, - ts + 16056, + ts + 5050, ts + 16061, - ts + 16102, - ts + 16107, - ts + 16110, - ts + 16117, - ts + 16052, - ts + 16056, - ts + 16123, - ts + 16128, - ts + 16133, - ts + 16056, - ts + 16137, - ts + 16061, - ts + 16145, + ts + 8807, + ts + 16065, + ts + 16070, + ts + 16073, + ts + 16083, + ts + 16093, + ts + 16099, + ts + 16103, + ts + 16108, + ts + 16113, + ts + 16121, + ts + 16132, + ts + 16135, + ts + 16142, + ts + 16103, + ts + 16108, ts + 16149, ts + 16154, - ts + 11409, - ts + 11405, - ts + 16160, - ts + 16165, + ts + 16157, + ts + 16164, + ts + 16099, + ts + 16103, ts + 16170, - ts + 16014, - ts + 16056, ts + 16175, - ts + 16182, - ts + 16189, - ts + 8793, - ts + 16197, - ts + 5039, - ts + 16203, - ts + 16014, - ts + 16056, - ts + 16208, - ts + 16213, - ts + 15410, - ts + 16218, - ts + 16231, - ts + 16240, - ts + 16247, - ts + 16258, + ts + 16180, + ts + 16103, + ts + 16184, + ts + 16108, + ts + 16192, + ts + 16196, + ts + 16201, + ts + 11423, + ts + 11419, + ts + 16207, + ts + 16212, + ts + 16217, + ts + 16061, + ts + 16103, + ts + 16222, + ts + 16229, + ts + 16236, + ts + 8807, + ts + 16244, + ts + 5053, + ts + 16250, + ts + 16061, + ts + 16103, + ts + 16255, + ts + 16260, + ts + 15457, + ts + 16265, + ts + 16278, + ts + 16287, + ts + 16294, + ts + 16305, } // Definitions of all built-in pragmas @@ -79773,238 +80301,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16266, + {FzName: ts + 16313, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16281, + {FzName: ts + 16328, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16296, + {FzName: ts + 16343, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16308, + {FzName: ts + 16355, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16324, + {FzName: ts + 16371, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16247, + {FzName: ts + 16294, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16337, + {FzName: ts + 16384, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16349, + {FzName: ts + 16396, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16369, + {FzName: ts + 16416, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16385, + {FzName: ts + 16432, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16406, + {FzName: ts + 16453, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16421, + {FzName: ts + 16468, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16437, + {FzName: ts + 16484, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16451, + {FzName: ts + 16498, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16464, + {FzName: ts + 16511, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16478, + {FzName: ts + 16525, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16497, + {FzName: ts + 16544, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16516, + {FzName: ts + 16563, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16539, + {FzName: ts + 16586, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16548, + {FzName: ts + 16595, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16566, + {FzName: ts + 16613, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16583, + {FzName: ts + 16630, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16596, + {FzName: ts + 16643, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16611, + {FzName: ts + 16658, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16629, + {FzName: ts + 16676, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16639, + {FzName: ts + 16686, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16653, + {FzName: ts + 16700, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16669, + {FzName: ts + 16716, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16694, + {FzName: ts + 16741, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16713, + {FzName: ts + 16760, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16724, + {FzName: ts + 16771, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16735, + {FzName: ts + 16782, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16747, + {FzName: ts + 16794, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16763, + {FzName: ts + 16810, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16776, + {FzName: ts + 16823, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16795, + {FzName: ts + 16842, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16814, + {FzName: ts + 16861, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16827, + {FzName: ts + 16874, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16842, + {FzName: ts + 16889, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16852, + {FzName: ts + 16899, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16873, + {FzName: ts + 16920, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16884, + {FzName: ts + 16931, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16894, + {FzName: ts + 16941, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16906, + {FzName: ts + 16953, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16917, + {FzName: ts + 16964, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16929, + {FzName: ts + 16976, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16946, + {FzName: ts + 16993, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16965, + {FzName: ts + 17012, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16991, + {FzName: ts + 17038, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17006, + {FzName: ts + 17053, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17020, + {FzName: ts + 17067, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17039, + {FzName: ts + 17086, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17053, + {FzName: ts + 17100, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17069, + {FzName: ts + 17116, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17081, + {FzName: ts + 17128, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17092, + {FzName: ts + 17139, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17103, + {FzName: ts + 17150, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17115, + {FzName: ts + 17162, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17126, + {FzName: ts + 17173, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17147, + {FzName: ts + 17194, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17155, + {FzName: ts + 17202, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17170, + {FzName: ts + 17217, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17183, + {FzName: ts + 17230, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17202, + {FzName: ts + 17249, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17217, + {FzName: ts + 17264, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80026,7 +80554,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17233)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17280)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80038,10 +80566,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17258) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17305) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17268) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17315) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80050,13 +80578,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7937) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7951) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17280) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17327) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80071,9 +80599,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16208) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16255) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17292) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17339) == 0 { return 2 } else { return 0 @@ -80087,7 +80615,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17299, 0) + ts+17346, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80178,19 +80706,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17361 + zName = ts + 17408 break case OE_SetDflt: - zName = ts + 17370 + zName = ts + 17417 break case OE_Cascade: - zName = ts + 17382 + zName = ts + 17429 break case OE_Restrict: - zName = ts + 17390 + zName = ts + 17437 break default: - zName = ts + 17399 + zName = ts + 17446 break } return zName @@ -80207,7 +80735,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17409, ts + 17416, ts + 17424, ts + 17428, ts + 17292, ts + 17437, + ts + 17456, ts + 17463, ts + 17471, ts + 17475, ts + 17339, ts + 17484, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80254,13 +80782,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17441 + zType = ts + 17488 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17443 + zType = ts + 17490 } else { - zType = ts + 7447 + zType = ts + 7461 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17445, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17492, 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), @@ -80268,7 +80796,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17452, ts + 17457, ts + 17465} +var azEnc = [4]uintptr{uintptr(0), ts + 17499, ts + 17504, ts + 17512} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80293,8 +80821,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -80401,13 +80929,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -80427,6 +80964,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -80477,7 +81016,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -80492,7 +81031,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -80502,7 +81041,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17473, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17520, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -80519,30 +81058,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80763,7 +81302,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17477) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17524) == 0) { goto __64 } b = 2 @@ -80797,7 +81336,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -80806,36 +81345,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17268 + zRet = ts + 17315 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80873,7 +81412,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17258 + zRet = ts + 17305 __83: ; returnSingleText(tls, v, zRet) @@ -80954,21 +81493,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81010,15 +81549,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81055,14 +81594,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81081,17 +81620,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81102,7 +81641,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81114,12 +81653,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81156,11 +81695,11 @@ __123: if !(*(*int8)(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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17482, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17529, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81179,7 +81718,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81201,7 +81740,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17507, 0) + ts+17554, 0) goto __133 __132: if !(iDb != 1) { @@ -81255,7 +81794,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17560) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17607) == 0) { goto __142 } @@ -81352,13 +81891,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17566 + return ts + 17613 } - return ts + 17574 + return ts + 17621 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1527), + Xsqlite3ColumnType(tls, pCol, ts+1547), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -81423,20 +81962,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17581, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17628, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -81469,29 +82008,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10408 + zType = ts + 10422 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12690 + zType = ts + 12704 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17597 + zType = ts + 17644 goto __183 __182: - zType = ts + 8793 + zType = ts + 8807 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17651, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -81557,7 +82096,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -81567,7 +82106,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17616, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17663, 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)))) @@ -81604,12 +82143,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17621, ts + 17623, ts + 16085} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17625, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17668, ts + 17670, ts + 16132} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17672, 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)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -81638,7 +82177,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17631, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17678, 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))) @@ -81654,13 +82193,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17635, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17682, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81699,7 +82238,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -81718,13 +82257,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81740,7 +82279,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -81775,7 +82314,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81783,7 +82322,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17647)) + ts+17694)) goto __227 __227: j2++ @@ -81856,20 +82395,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -81907,12 +82446,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -81929,8 +82468,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -81943,11 +82482,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -81972,10 +82511,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17652, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17699, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82013,17 +82552,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82039,7 +82578,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82189,7 +82728,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+17656, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17703, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82216,178 +82755,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17727, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17763, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17783, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17805, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17828, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17830, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17722, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17850, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17752) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17880) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17757) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17885) 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) @@ -82395,87 +83063,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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 __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17778) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17906) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17805) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17933) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -82493,14 +83167,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17834 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17962 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -82508,27 +83182,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -82537,25 +83211,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17837, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17965, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -82563,50 +83237,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -82621,31 +83302,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17275) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17322) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17862) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17990) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17428) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17475) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -82655,10 +83336,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -82678,19 +83359,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82699,86 +83380,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17870, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17998, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82786,60 +83467,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82847,10 +83528,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82883,6 +83564,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82894,14 +83583,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17888, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17893, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17899, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17908, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17917, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17925, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17933}, - {FzName: ts + 17940}, + {FzName: ts + 18016, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18021, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18045, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18053, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18061}, + {FzName: ts + 18068}, {}, } var setCookie = [2]VdbeOpList{ @@ -82953,7 +83642,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+17946) + Xsqlite3_str_appendall(tls, bp+32, ts+18074) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82961,7 +83650,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17961, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18089, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -82974,19 +83663,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, 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+17974) + Xsqlite3_str_appendall(tls, bp+32, ts+18102) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17986) + Xsqlite3_str_appendall(tls, bp+32, ts+18114) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4936, 1) + Xsqlite3_str_append(tls, bp+32, ts+4950, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83002,7 +83691,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83150,7 +83839,7 @@ __1: 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+3642, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83166,13 +83855,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+18001) + Xsqlite3_str_appendall(tls, bp+32, ts+18129) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18009, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18137, 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+18013, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18141, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83181,7 +83870,7 @@ __3: 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+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83249,33 +83938,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18017, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18145, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4987 + zObj = ts + 5001 } - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18173, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18076, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18204, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18084, - ts + 18091, - ts + 18103, + ts + 18212, + ts + 18219, + ts + 18231, } // Check to see if any sibling index (another index on the same table) @@ -83335,7 +84024,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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -83367,13 +84056,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+18114) + corruptSchema(tls, pData, argv, ts+18242) } 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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } } @@ -83406,16 +84095,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8793 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8807 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7857 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18127 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7871 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18255 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -83500,7 +84189,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11692) + ts+11706) rc = SQLITE_ERROR goto initone_error_out __13: @@ -83535,7 +84224,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+18199) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18327) rc = SQLITE_ERROR goto initone_error_out __17: @@ -83549,7 +84238,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18223, + ts+18351, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83732,16 +84421,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83809,20 +84502,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -83834,8 +84527,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83844,7 +84537,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1463, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1483, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -83855,7 +84548,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83875,7 +84568,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18257, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18385, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83891,100 +84584,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18287, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18415, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3642, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3656, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83997,7 +84694,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84096,7 +84793,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84239,7 +84936,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -84414,8 +85111,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10837 - var zSp2 uintptr = ts + 10837 + var zSp1 uintptr = ts + 10851 + var zSp2 uintptr = ts + 10851 if pB == uintptr(0) { zSp1++ } @@ -84423,13 +85120,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18306, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18434, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18336)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18464)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -84604,7 +85301,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18370, libc.VaList(bp, 0)) + ts+18498, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -84649,7 +85346,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18420, libc.VaList(bp+8, zName)) + ts+18548, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -84660,7 +85357,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18484, + Xsqlite3ErrorMsg(tls, pParse, ts+18612, libc.VaList(bp+16, zName)) break } @@ -84704,7 +85401,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6505, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6519, Fn: uint32(8)} // 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. @@ -85051,6 +85748,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85226,7 +85926,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -85288,16 +85988,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18521 + z = ts + 18649 break case TK_INTERSECT: - z = ts + 18531 + z = ts + 18659 break case TK_EXCEPT: - z = ts + 18541 + z = ts + 18669 break default: - z = ts + 18548 + z = ts + 18676 break } return z @@ -85307,7 +86007,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18554, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18682, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -85513,8 +86213,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1092 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16197 + zType = ts + 1112 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16244 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -85653,13 +86353,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16197 + zCol = ts + 16244 } 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+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11992, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85667,7 +86367,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+18577, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85757,7 +86457,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16197 + zName = ts + 16244 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85767,7 +86467,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18577, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -85783,7 +86483,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18586, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18714, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86070,7 +86770,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18594, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18722, 0) return __1: ; @@ -86161,7 +86861,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18643, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18771, 0) goto end_of_recursive_query __15: ; @@ -86181,7 +86881,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18685, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86218,7 +86918,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18691, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18819, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86252,11 +86952,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+18706, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18834, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1527 + return ts + 1547 } - return ts + 18729 + return ts + 18857 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86357,8 +87057,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18731, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18746, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18859, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18874, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -86405,7 +87105,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18521, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18649, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -86472,7 +87172,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -86534,7 +87234,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -86687,10 +87387,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18786, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18914, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18832, + ts+18960, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86944,8 +87644,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7153) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7153) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7167) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86972,13 +87672,13 @@ 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+18914, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19042, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18925, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19053, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86990,7 +87690,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+18930, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19058, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87091,7 +87791,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87117,6 +87817,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87133,7 +87834,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87170,7 +87871,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87181,6 +87883,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87205,15 +87908,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1072 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1092 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -87390,9 +88098,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -87461,7 +88176,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -87477,17 +88191,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -87508,7 +88213,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -87520,6 +88224,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87675,6 +88390,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87698,8 +88414,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87875,8 +88591,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -87893,6 +88609,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87922,6 +88643,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87955,12 +88677,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15100) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15147) == 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+15104) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15151) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88026,7 +88748,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+18936, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19064, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88109,7 +88831,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18954, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19082, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88238,7 +88960,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+18977, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19105, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -88264,7 +88986,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18997, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19125, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88280,7 +89002,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19040 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19168 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -88306,7 +89028,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+19063, + Xsqlite3ErrorMsg(tls, pParse, ts+19191, 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 @@ -88317,9 +89039,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 + 19101 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19229 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19135 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19263 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88346,9 +89068,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -88366,7 +89088,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+19173, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19301, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -88478,7 +89200,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19177, + Xsqlite3ErrorMsg(tls, pParse, ts+19305, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -88497,7 +89219,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+19216, + Xsqlite3ErrorMsg(tls, pParse, ts+19344, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -88505,7 +89227,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19247, + Xsqlite3ErrorMsg(tls, pParse, ts+14716, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -88606,7 +89328,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6365 + zSchemaName = ts + 6379 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -88621,7 +89343,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19280, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19375, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -88686,7 +89408,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19285, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19380, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88698,7 +89420,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88717,9 +89439,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19294, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19389, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19407, 0) } } } @@ -88729,7 +89451,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+19332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19427, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88879,13 +89601,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19363, 0) + ts+19458, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19414, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19509, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89066,19 +89788,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19447, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19542, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19459 + return ts + 19554 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1527 + return ts + 1547 }())) } } @@ -89091,7 +89813,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7857) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89249,7 +89971,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -89348,7 +90069,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19482, + ts+19577, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -89409,7 +90130,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19536, + Xsqlite3ErrorMsg(tls, pParse, ts+19631, 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 __15: @@ -89513,7 +90234,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1527, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1547, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -89523,7 +90244,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -89555,7 +90276,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19576, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19671, 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), 5, 0x20) @@ -89613,8 +90334,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19591, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19686, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -89648,7 +90372,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89741,16 +90465,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89759,13 +90488,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89777,52 +90506,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89840,111 +90569,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -89963,33 +90692,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -89997,28 +90726,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90029,7 +90758,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90040,7 +90769,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90066,7 +90795,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90079,27 +90808,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19607 + return ts + 19702 } - return ts + 19616 + return ts + 19711 }()) groupBySort = 1 @@ -90107,49 +90836,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90163,45 +90892,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90220,16 +90949,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90260,16 +90989,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90282,98 +91011,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -90382,79 +91111,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19607) -__147: + explainTempTable(tls, pParse, ts+19702) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19625 + return ts + 19720 } - return ts + 19648 + return ts + 19743 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -90529,7 +91258,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -90551,7 +91280,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19657, 0) + ts+19752, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -90647,7 +91376,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3642, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90739,7 +91468,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -90784,7 +91513,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+19722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19817, 0) goto trigger_cleanup __3: ; @@ -90828,7 +91557,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19768, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19863, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -90846,7 +91575,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19776, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19871, 0) goto trigger_orphan_error __11: ; @@ -90858,7 +91587,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19768, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19863, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90873,7 +91602,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19817, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90885,22 +91614,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19938, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19881, + Xsqlite3ErrorMsg(tls, pParse, ts+19976, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19918 + return ts + 20013 } - return ts + 19925 + return ts + 20020 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90909,7 +91638,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19931, libc.VaList(bp+24, pTableName+8)) + ts+20026, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90938,9 +91667,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91058,7 +91787,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19768, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19863, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91091,7 +91820,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19977, + ts+20072, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91116,13 +91845,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20025, + ts+20120, libc.VaList(bp+16, (*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+20100, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20195, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -91378,7 +92107,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20129, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20224, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -91417,9 +92146,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -91431,7 +92160,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20149, + ts+20244, 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) @@ -91545,12 +92274,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20211, + ts+20306, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20259 + return ts + 20354 } - return ts + 20266 + return ts + 20361 }())) __15: ; @@ -91664,7 +92393,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20273, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20368, 0) return 1 } @@ -91715,7 +92444,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -91784,7 +92513,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91847,8 +92576,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91881,26 +92610,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20315, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20410, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91917,7 +92646,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92110,10 +92839,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92122,7 +92853,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -92484,7 +93215,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20329, + ts+20424, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -92516,7 +93247,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20365, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20460, 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: @@ -92526,7 +93257,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7632 + return ts + 7646 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -93396,7 +94127,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20384) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20479) __169: ; update_cleanup: @@ -93702,10 +94433,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+20397, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20492, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20401, libc.VaList(bp+8, bp+216)) + ts+20496, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -93796,7 +94527,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+12119, -1) + ts+12133, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93828,7 +94559,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20474, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20478, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20569, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20573, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93965,23 +94696,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20482) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20577) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20522) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) return SQLITE_ERROR __2: ; @@ -93992,7 +94725,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20565) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20660) return SQLITE_ERROR __5: ; @@ -94001,7 +94734,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1527 + zOut = ts + 1547 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94020,7 +94753,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20583, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20678, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94040,20 +94773,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20606) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20701) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14472) + rc = execSql(tls, db, pzErrMsg, ts+14486) if !(rc != SQLITE_OK) { goto __9 } @@ -94098,7 +94833,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20633, + ts+20728, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94107,7 +94842,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20741, + ts+20836, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94118,7 +94853,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20795, + ts+20890, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94129,7 +94864,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20946, + ts+21041, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94251,7 +94986,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -94293,7 +95028,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -94450,7 +95185,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -94474,7 +95209,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -94558,11 +95293,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21076, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21171, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21100, + ts+21195, 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, @@ -94572,7 +95307,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21199, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21294, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -94606,7 +95341,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -94633,7 +95368,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+21218, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21313, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94671,9 +95406,9 @@ 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+21260, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3642, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94683,7 +95418,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 + 21290 + var zFormat uintptr = ts + 21385 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94695,12 +95430,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1527) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1547) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16088, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16135, 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 @@ -94753,17 +95488,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21336, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21431, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94812,10 +95547,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21336, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21431, 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) @@ -94835,8 +95570,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94849,7 +95584,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94891,7 +95626,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95259,7 +95994,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -95302,7 +96037,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -95329,7 +96064,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -95557,31 +96292,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21355 + return ts + 21450 } if i == -1 { - return ts + 16197 + return ts + 16244 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -95590,35 +96307,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } - Xsqlite3_str_append(tls, pStr, ts+4987, 1) + Xsqlite3_str_append(tls, pStr, ts+5001, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } } @@ -95635,29 +96352,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21370, 2) + Xsqlite3_str_append(tls, pStr, ts+21465, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21373 + return ts + 21468 } - return ts + 21378 + return ts + 21473 }(), 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))), j, i, ts+21386) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21481) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21388) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21483) } - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95698,11 +96415,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21390, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21485, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21396 + return ts + 21491 } - return ts + 21403 + return ts + 21498 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95712,43 +96429,43 @@ 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 + 10893 + zFmt = ts + 10907 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21408 + zFmt = ts + 21503 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21441 + zFmt = ts + 21536 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21466 + zFmt = ts + 21561 } else { - zFmt = ts + 21484 + zFmt = ts + 21579 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21493, 7) + Xsqlite3_str_append(tls, bp+64, ts+21588, 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 + 16197 - Xsqlite3_str_appendf(tls, bp+64, ts+21501, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16244 + Xsqlite3_str_appendf(tls, bp+64, ts+21596, 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+21532, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21627, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21542, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21637, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21547, + Xsqlite3_str_appendf(tls, bp+64, ts+21642, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21574, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21669, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95780,25 +96497,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21680, 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+21373, 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+21468, 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+21701, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21362, 5) + Xsqlite3_str_append(tls, bp+24, ts+21457, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21373, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21468, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4936, 1) + Xsqlite3_str_append(tls, bp+24, ts+4950, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96159,7 +96876,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96212,104 +96929,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -96348,7 +96967,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -96368,6 +96987,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -96518,12 +97139,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -96542,13 +97163,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -96561,7 +97182,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -96623,7 +97244,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96770,6 +97391,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97112,13 +97735,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97126,104 +97756,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97232,92 +97871,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -97327,24 +97960,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -97364,152 +97997,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21709, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -97518,121 +98152,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -97641,36 +98275,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97688,219 +98322,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97910,24 +98544,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97938,41 +98572,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98006,7 +98640,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98014,13 +98648,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21638, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21733, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -98299,7 +98933,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -98312,7 +98946,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -98336,11 +98970,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -98372,10 +99006,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16046, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15377, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14903, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21652, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16093, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15424, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14950, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21747, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -98517,7 +99151,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -98534,10 +99168,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -98594,7 +99228,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98780,6 +99414,7 @@ __3: 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 @@ -98835,7 +99470,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98872,12 +99507,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98956,7 +99591,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99050,7 +99685,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21700 + return ts + 21795 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99244,7 +99879,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -99423,7 +100058,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21707, + Xsqlite3ErrorMsg(tls, pParse, ts+21802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -99493,6 +100128,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -99519,10 +100157,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -99542,14 +100180,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -99586,14 +100224,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100036,6 +100674,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100045,11 +100695,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100144,7 +100792,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21743, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21838, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100215,7 +100863,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21769 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21864 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -100449,7 +101097,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -100511,11 +101159,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -100583,7 +101229,7 @@ __3: 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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -100705,9 +101351,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3642, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100775,7 +101421,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101124,9 +101770,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101150,7 +101799,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101166,32 +101816,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -101337,7 +101977,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -101580,13 +102220,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -101597,7 +102234,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -101652,31 +102290,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -101879,6 +102519,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102010,6 +102708,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102024,6 +102725,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102054,7 +102758,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -102210,7 +102914,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+21780, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102268,7 +102972,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21780, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102626,7 +103330,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -102638,7 +103342,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -102653,7 +103357,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102666,7 +103370,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21806, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21901, 0) rc = SQLITE_OK } else { goto __3 @@ -102767,7 +103471,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102941,7 +103645,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102993,7 +103697,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103021,7 +103725,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103042,7 +103745,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103064,7 +103766,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103126,9 +103828,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103144,7 +103845,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103164,6 +103867,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103260,8 +103968,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21841, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21936, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103273,7 +103981,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -103288,7 +103996,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -103308,7 +104016,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -103316,7 +104024,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -103326,7 +104034,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -103334,7 +104042,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -103366,7 +104074,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -103423,10 +104131,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -103470,16 +104178,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -103512,7 +104220,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -103524,9 +104232,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -103544,6 +104252,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -103630,7 +104390,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -103687,7 +104447,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21859, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21954, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -103710,31 +104470,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103752,13 +104511,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21887, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21982, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103769,169 +104528,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103940,26 +104704,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -103967,37 +104731,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104005,92 +104769,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104100,24 +104870,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104127,96 +104897,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104224,30 +104994,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104267,7 +105035,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -104403,11 +105171,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -104446,6 +105211,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -104618,7 +105393,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21905, -1) + pCtx, ts+22000, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104751,7 +105526,7 @@ 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+21961, -1) + pCtx, ts+22056, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104841,17 +105616,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22006)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22017)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22028)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22033)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22046)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22056)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22062)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22073)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22083)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22095)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22100)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22101)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22112)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22123)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22128)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22141)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22151)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22157)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22168)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22178)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22190)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22195)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104897,7 +105672,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22104, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22199, libc.VaList(bp, zName)) } return p } @@ -104941,12 +105716,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+22123, 0) + ts+22218, 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+22194, 0) + ts+22289, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104969,7 +105744,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7857) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) } break } @@ -105137,7 +105912,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105174,7 +105948,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22257, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22352, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105290,7 +106064,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463)) } pSub = Xsqlite3SelectNew(tls, @@ -105404,7 +106178,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22283, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22378, 0) goto windowAllocErr __2: ; @@ -105469,15 +106243,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22315 + zErr = ts + 22410 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22332 + zErr = ts + 22427 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22348 + zErr = ts + 22443 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22368, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22463, 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 { @@ -105498,7 +106272,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+22401, 0) + ts+22496, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -105636,7 +106410,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -105654,11 +106428,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22448, - ts + 22501, - ts + 21905, - ts + 22552, - ts + 22604, + ts + 22543, + ts + 22596, + ts + 22000, + ts + 22647, + ts + 22699, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106139,13 +106913,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107053,19 +107831,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22654, + Xsqlite3ErrorMsg(tls, pParse, ts+22749, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19648 + return ts + 19743 } - return ts + 22696 + return ts + 22791 }(), 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+22702, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22797, 0) } } @@ -107133,7 +107911,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22736, + Xsqlite3ErrorMsg(tls, pParse, ts+22831, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108230,7 +109008,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22869, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109205,21 +109983,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16197, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16244, 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+22796, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16110, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16157, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22796, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, 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)) @@ -109962,7 +110740,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22823) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22918) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110126,7 +110904,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -110343,9 +111121,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6683 + return ts + 6697 } - return ts + 6688 + return ts + 6702 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -110624,19 +111402,19 @@ 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+22856, 0) + ts+22951, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22951, 0) + ts+23046, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23035, 0) + ts+23130, 0) } break case uint32(273): @@ -111015,9 +111793,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23120, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23215, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111785,7 +112563,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23137, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, bp+2464)) break } } @@ -111806,9 +112584,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3642, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23162, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23257, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111821,7 +112599,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111981,7 +112759,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23173, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23268, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111994,11 +112772,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19768, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19863, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23280, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112011,9 +112789,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23195, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23290, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23199, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23294, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112123,36 +112901,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112269,7 +113025,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -112540,16 +113296,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -112613,6 +113370,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -112663,6 +113421,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112811,7 +113570,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -112841,7 +113600,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112856,7 +113615,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23207, 0) + ts+23302, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112952,7 +113711,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112963,8 +113722,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112974,13 +113733,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113047,23 +113806,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23275 + var zErr uintptr = ts + 23370 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23289 + zErr = ts + 23384 break } case SQLITE_ROW: { - zErr = ts + 23311 + zErr = ts + 23406 break } case SQLITE_DONE: { - zErr = ts + 23333 + zErr = ts + 23428 break } @@ -113081,35 +113840,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23356, - ts + 23369, + ts + 23451, + ts + 23464, uintptr(0), - ts + 23385, - ts + 23410, - ts + 23424, - ts + 23443, - ts + 1463, - ts + 23468, + ts + 23480, ts + 23505, - ts + 23517, - ts + 23532, - ts + 23565, - ts + 23583, - ts + 23608, - ts + 23637, + ts + 23519, + ts + 23538, + ts + 1483, + ts + 23563, + ts + 23600, + ts + 23612, + ts + 23627, + ts + 23660, + ts + 23678, + ts + 23703, + ts + 23732, uintptr(0), - ts + 5827, - ts + 5313, - ts + 23654, - ts + 23672, - ts + 23690, + ts + 5841, + ts + 5327, + ts + 23749, + ts + 23767, + ts + 23785, uintptr(0), - ts + 23724, + ts + 23819, uintptr(0), - ts + 23745, - ts + 23771, - ts + 23794, - ts + 23815, + ts + 23840, + ts + 23866, + ts + 23889, + ts + 23910, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113224,7 +113983,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113269,7 +114028,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+23831, 0) + ts+23926, 0) return SQLITE_BUSY } else { @@ -113386,7 +114145,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23894, libc.VaList(bp, zName)) + ts+23989, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113402,6 +114161,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -113411,7 +114173,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -113619,7 +114381,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+23945, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24040, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113712,7 +114474,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113782,7 +114544,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113792,7 +114554,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113824,20 +114586,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23966, 0) + ts+24061, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -113961,7 +114723,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+24034, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24129, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114006,10 +114768,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24040, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24135, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24050, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24145, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114114,7 +114876,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24078, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24173, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114125,17 +114887,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24082, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24177, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24082 + zModeType = ts + 24177 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24088, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24183, zOpt, uint64(4)) == 0) { goto __32 } @@ -114143,7 +114905,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3251 + zModeType = ts + 3265 __32: ; if !(aMode != 0) { @@ -114173,7 +114935,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24093, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24188, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114181,7 +114943,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24113, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24208, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114221,7 +114983,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24137, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24232, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114245,15 +115007,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24153, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24248, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24168, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24171, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24174, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17292, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24263, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24266, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24269, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17339, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114368,7 +115130,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -114387,8 +115149,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -114399,10 +115161,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+21700, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21795, 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+24178, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24273, 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) { @@ -114416,7 +115178,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -114433,7 +115195,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114467,9 +115229,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6360 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6374 (*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 + 23180 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23275 (*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) @@ -114574,7 +115336,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24184 + zFilename = ts + 24279 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114677,21 +115439,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24187, + Xsqlite3_log(tls, iErr, ts+24282, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24212) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24307) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24232) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24327) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24334) } // This is a convenience routine that makes sure that all thread-specific @@ -114802,7 +115564,7 @@ __4: 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 + 1092 + zDataType = ts + 1112 primarykey = 1 __13: ; @@ -114849,14 +115611,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24256, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24351, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114926,6 +115688,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -115502,7 +116267,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24284, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24379, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -115535,7 +116300,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -115546,7 +116311,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -115620,7 +116385,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 + 24292 + return ts + 24387 } return uintptr(0) }(), 0) @@ -115715,7 +116480,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -115798,7 +116563,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6160, ts + 6683, ts + 6688, ts + 6170, ts + 6165, ts + 7924, ts + 24315, ts + 24321, + ts + 6174, ts + 6697, ts + 6702, ts + 6184, ts + 6179, ts + 7938, ts + 24410, ts + 24416, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115951,7 +116716,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 + 24328 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24423 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -115977,7 +116742,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6160, uint32(4)) + jsonAppendRaw(tls, p, ts+6174, uint32(4)) break } @@ -116006,7 +116771,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24345, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24440, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116064,19 +116829,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6160, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6174, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6683, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6697, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6688, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6702, uint32(5)) break } @@ -116621,17 +117386,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6160, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6174, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6683, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6697, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6688, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6702, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116732,7 +117497,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+24374, -1) + Xsqlite3_result_error(tls, pCtx, ts+24469, -1) } } jsonParseReset(tls, pParse) @@ -117038,7 +117803,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+24389, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24484, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117053,7 +117818,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24393, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24488, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117107,7 +117872,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24419, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24514, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117212,11 +117977,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24462, uint32(2)) + jsonAppendRaw(tls, bp, ts+24557, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4977, uint32(2)) + jsonAppendRaw(tls, bp, ts+4991, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24465, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24560, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -117257,7 +118022,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6160, uint32(4)) + jsonAppendRaw(tls, bp, ts+6174, uint32(4)) } } if i == argc { @@ -117373,14 +118138,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24468, -1) + ts+24563, -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+24519, -1) + Xsqlite3_result_error(tls, ctx, ts+24614, -1) jsonReset(tls, bp) return } @@ -117475,7 +118240,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117550,9 +118315,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24553 + return ts + 24648 } - return ts + 24557 + return ts + 24652 }()) return __2: @@ -117685,7 +118450,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24564, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24659, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117782,7 +118547,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24567, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24662, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117826,7 +118591,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24570) + ts+24665) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117957,7 +118722,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24653, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24748, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117976,7 +118741,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24659, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24754, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118072,7 +118837,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24659, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24754, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118096,7 +118861,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 + 24664 + zRoot = ts + 24759 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118212,7 +118977,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+24374, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24469, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118307,25 +119072,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24666}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24671}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24713}, - {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 + 24716}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24720}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24732}, - {FnArg: int8(2), 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 + 24755}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24766}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24810}, - {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 + 24821}, - {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 + 24838}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24777}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24795}, + {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 + 24808}, + {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 + 24811}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24815}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24827}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24839}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24850}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24861}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24873}, + {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 + 24886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24905}, + {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 + 24916}, + {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 + 24933}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118344,8 +119109,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24856, FpModule: 0}, - {FzName: ts + 24866, FpModule: 0}, + {FzName: ts + 24951, FpModule: 0}, + {FzName: ts + 24961, FpModule: 0}, } type Rtree1 = struct { @@ -118605,11 +119370,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+24876, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24971, 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+24884, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24979, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -118820,7 +119585,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24889, + ts+24984, 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)) @@ -119523,7 +120288,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24971) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25066) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119735,7 +120500,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3642, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120864,7 +121629,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24985, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25080, 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 { @@ -120876,12 +121641,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25005, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25100, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25037, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25132, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120922,7 +121687,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121107,7 +121872,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25074, 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+25169, 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)) @@ -121130,14 +121895,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25219 + var zFmt uintptr = ts + 25314 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11265, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11279, 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 { @@ -121178,7 +121943,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25275, ts + 5039, ts + 16197, + ts + 25370, ts + 5053, ts + 16244, } var rtreeModule = Sqlite3_module{ @@ -121221,19 +121986,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+25280, + ts+25375, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25342, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25437, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25347, + ts+25442, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25411, + ts+25506, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25481, + ts+25576, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121262,7 +122027,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25530 + zFormat = ts + 25625 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121274,7 +122039,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+25638, + ts+25733, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121282,18 +122047,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+25683, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25778, 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+12736, 1) + Xsqlite3_str_append(tls, p, ts+12750, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25710, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25805, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25732, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25827, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25740, 0) + Xsqlite3_str_appendf(tls, p, ts+25835, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121308,14 +122073,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25756, - ts + 25809, - ts + 25854, - ts + 25906, - ts + 25960, - ts + 26005, - ts + 26063, - ts + 26118, + ts + 25851, + ts + 25904, + ts + 25949, + ts + 26001, + ts + 26055, + ts + 26100, + ts + 26158, + ts + 26213, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121344,7 +122109,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26165, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26260, 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 @@ -121352,19 +122117,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26185, + ts+26280, 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+3642, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, 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+26242, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26337, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121406,16 +122171,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26277, - ts + 26320, - ts + 26355, - ts + 26391, + ts + 26372, + ts + 26415, + ts + 26450, + ts + 26486, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -121440,7 +122205,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26428, + Xsqlite3_str_appendf(tls, pSql, ts+26523, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -121452,7 +122217,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26452, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26547, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -121475,7 +122240,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -121486,14 +122251,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, 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+3642, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -121536,7 +122301,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -121553,7 +122318,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -121571,7 +122336,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26461, ts + 26472} +var azFormat = [2]uintptr{ts + 26556, ts + 26567} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -121609,13 +122374,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10837, 1) + Xsqlite3_str_append(tls, pOut, ts+10851, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26577, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26488, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26583, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26492, 1) + Xsqlite3_str_append(tls, pOut, ts+26587, 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}))) @@ -121626,7 +122391,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26494, -1) + Xsqlite3_result_error(tls, ctx, ts+26589, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121704,12 +122469,12 @@ 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+26527, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26622, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4041 + return ts + 4055 } - return ts + 1527 + return ts + 1547 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -121728,7 +122493,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+26534, + ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121747,7 +122512,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+26579, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26674, libc.VaList(bp+16, iNode)) } } @@ -121761,8 +122526,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26611, - ts + 26665, + ts + 26706, + ts + 26760, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -121777,23 +122542,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+26713, + rtreeCheckAppendMsg(tls, pCheck, ts+26808, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26775, + ts+26870, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }(), iKey, iVal)) } } @@ -121817,7 +122582,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+26833, libc.VaList(bp, i, iCell, iNode)) + ts+26928, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121837,7 +122602,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+26881, libc.VaList(bp+24, i, iCell, iNode)) + ts+26976, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121854,14 +122619,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+26948, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27043, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26982, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27077, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121869,7 +122634,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+27012, + ts+27107, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121898,14 +122663,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27067, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27162, 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+27098, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27193, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121927,12 +122692,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14472, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14486, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27165, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27260, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121941,12 +122706,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24985, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25080, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27193, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27288, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121960,8 +122725,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+27224, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27319, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121969,7 +122734,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27239, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27334, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121984,7 +122749,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27243, -1) + ts+27338, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121992,7 +122757,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6360 + zDb = ts + 6374 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122002,7 +122767,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17834 + return ts + 17962 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122371,11 +123136,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+27294, 1) + Xsqlite3_str_append(tls, x, ts+27389, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27296, 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+27391, 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+27307, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27402, 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) } @@ -122395,19 +123160,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+27318, 0) + Xsqlite3_str_appendf(tls, x, ts+27413, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27336, 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+27431, 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+27344, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27439, 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+27352, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27447, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27356, 0) + Xsqlite3_str_appendf(tls, x, ts+27451, 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) } @@ -123313,7 +124078,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27369, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27464, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123322,7 +124087,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27391, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27486, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -123330,7 +124095,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123341,7 +124106,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -123366,7 +124131,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -123555,7 +124320,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16197 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16244 (*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 @@ -123565,7 +124330,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27490 (*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 @@ -123573,7 +124338,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27401 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27496 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123685,7 +124450,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27410, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27505, 0) __4: ; goto geopoly_update_end @@ -123815,14 +124580,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27450) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27545) == 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+27466) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27561) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123887,7 +124652,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27481, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27576, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123899,25 +124664,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27489}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27502}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27515}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27528}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27466}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27540}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27450}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27563}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27577}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27590}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27604}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27620}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27597}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27610}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27623}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27561}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27635}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27545}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27658}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27672}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27685}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27699}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27715}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27632}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27727}, } // Register the r-tree module with database handle db. This creates the @@ -123927,26 +124692,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27651, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27746, 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+27661, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27756, 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+27672, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27767, -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+27395, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27490, 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+27683, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124000,7 +124765,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24971, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25066, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124067,6 +124832,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124325,7 +125092,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) return } @@ -124336,7 +125103,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+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124349,7 +125116,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -124361,7 +125128,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -124437,7 +125204,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27714, uintptr(0), uintptr(0), p+64) + ts+27809, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -124501,7 +125268,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+24884, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24979, 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++ { } @@ -124522,16 +125289,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27885, libc.VaList(bp, func() uintptr { + ts+27980, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28035 + return ts + 28130 } - return ts + 1527 + return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28076) + ts+28171) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -124629,7 +125396,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -124647,7 +125414,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+28201, libc.VaList(bp, zTab))) + ts+28296, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124665,7 +125432,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+28320, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28415, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124683,7 +125450,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28341, libc.VaList(bp+16, zIdx))) + ts+28436, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124706,7 +125473,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28487, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124752,7 +125519,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124767,7 +125534,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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)), 1) if iCid >= 0 { @@ -124807,7 +125574,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+19294, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19389, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124817,18 +125584,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28470, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28565, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28489, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28584, 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+28494, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28589, zName) { bRbuRowid = 1 } } @@ -124840,18 +125607,18 @@ 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+28504, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28599, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28533 + return ts + 28628 } - return ts + 28546 + return ts + 28641 }())) } 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+28555, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28650, 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)), 1) @@ -124865,7 +125632,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+28577, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28672, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -124908,12 +125675,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+28604, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14583 + zList = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14597 } return zList } @@ -124924,13 +125691,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+28613, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28708, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124952,25 +125719,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+28626, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28721, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28658, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28753, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+28681) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28687, ts+28694, ts+4936) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+28776) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28782, ts+28789, ts+4950) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) 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+28702, + ts+28797, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28744, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28839, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125007,12 +125774,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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 @@ -125047,7 +125814,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28764 + zCol = ts + 28859 __7: ; goto __5 @@ -125055,13 +125822,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28772, + zLhs = rbuMPrintf(tls, p, ts+28867, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28793, + zOrder = rbuMPrintf(tls, p, ts+28888, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28829, + zSelect = rbuMPrintf(tls, p, ts+28924, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14583 + zSep = ts + 14597 iCol++ goto __1 __2: @@ -125079,12 +125846,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28856, + Xsqlite3_mprintf(tls, ts+28951, 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 + 1527 + zSep = ts + 1547 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125106,8 +125873,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28904, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14583 + zVector = rbuMPrintf(tls, p, ts+28999, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14597 goto __15 __15: iCol++ @@ -125118,7 +125885,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125145,13 +125912,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1527 - var zAnd uintptr = ts + 1527 + var zCom uintptr = ts + 1547 + var zAnd uintptr = ts + 1547 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125163,9 +125930,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28923, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29018, 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 + zType = ts + 1547 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125175,37 +125942,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 + 28764 + zCol = ts + 28859 } else { - zCol = ts + 28494 + zCol = ts + 28589 } - zType = ts + 1092 + zType = ts + 1112 } 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+28945, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29040, 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 + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28965, + zImpPK = Xsqlite3_mprintf(tls, ts+29060, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28986, + zImpCols = Xsqlite3_mprintf(tls, ts+29081, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29019, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29114, 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 + 14583 - zAnd = ts + 21362 + zCom = ts + 14597 + zAnd = ts + 21457 nBind++ } @@ -125239,16 +126006,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1527 + var zS uintptr = ts + 1547 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+29043, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29138, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29055, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29150, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14583 + zS = ts + 14597 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125256,7 +126023,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29064, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29159, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125268,27 +126035,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29079, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29174, 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 zSep uintptr = ts + 1547 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+29093, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21457 } } zList = rbuMPrintf(tls, p, - ts+29105, libc.VaList(bp+40, zList)) + ts+29200, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29155, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21457 } } } @@ -125297,7 +126064,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29168, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29263, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125311,21 +126078,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29155, + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14583 + zSep = ts + 14597 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29194, + zList = rbuMPrintf(tls, p, ts+29289, 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 + 14583 + zSep = ts + 14597 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29224, + zList = rbuMPrintf(tls, p, ts+29319, 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 + 14583 + zSep = ts + 14597 } } } @@ -125360,19 +126127,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29261 + var zSep uintptr = ts + 29356 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16085) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16132) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp+8, zIdx))) } break } @@ -125384,15 +126151,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28681 + zDesc = ts + 28776 } else { - zDesc = ts + 1527 + zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29274, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14583 + z = rbuMPrintf(tls, p, ts+29369, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14597 } } - z = rbuMPrintf(tls, p, ts+29285, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29380, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -125407,12 +126174,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1527 + var zComma uintptr = ts + 1547 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29289) + ts+29384) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -125421,7 +126188,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125431,25 +126198,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29339, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29434, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29361, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } } - zCols = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29466, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29386, + ts+29481, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125459,50 +126226,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1527 + var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1527 + var zPk uintptr = ts + 1547 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, (*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 { - zPk = ts + 29448 + zPk = ts + 29543 } - zSql = rbuMPrintf(tls, p, ts+29461, + zSql = rbuMPrintf(tls, p, ts+29556, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29488 + return ts + 29583 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } 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+29498, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29593, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29505, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29600, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125515,7 +126282,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29552, + ts+29647, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -125552,7 +126319,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29609) + ts+29704) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -125657,7 +126424,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+29675, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29770, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125677,24 +126444,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29695, + ts+29790, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29760, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29855, libc.VaList(bp+128, zTbl, zBind))) } 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+29796, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125710,7 +126477,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29830, + ts+29925, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125718,31 +126485,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }() } - return ts + 1527 + return ts + 1547 }(), 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+29901, + ts+29996, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29962, + ts+30057, 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 + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }(), zCollist, zLimit)) } @@ -125767,8 +126534,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6371) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6367) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6385) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6381) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125777,52 +126544,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1527 + return ts + 1547 } - return ts + 30121 + return ts + 30216 }() 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+30130, + ts+30225, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30166 + return ts + 30261 } - return ts + 1527 + return ts + 1547 }(), zBindings))) } 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+30176, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30271, 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 + var zRbuRowid uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30204 + zRbuRowid = ts + 30299 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30216, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30311, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30292 + return ts + 30387 } - return ts + 1527 + return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30309, + ts+30404, 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+30608, + ts+30703, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125830,14 +126597,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1527 + var zRbuRowid uintptr = ts + 1547 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30707 + zRbuRowid = ts + 30802 } else { - zRbuRowid = ts + 30717 + zRbuRowid = ts + 30812 } } @@ -125850,35 +126617,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28764, 0) + zOrder = rbuMPrintf(tls, p, ts+28859, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) } } 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+30728, + ts+30823, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30776 + return ts + 30871 } - return ts + 1527 + return ts + 1547 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zOrder != 0 { - return ts + 19648 + return ts + 19743 } - return ts + 1527 + return ts + 1547 }(), zOrder, zLimit))) } @@ -125941,12 +126708,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1527 + var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30121 + zPrefix = ts + 30216 } - zUpdate = Xsqlite3_mprintf(tls, ts+30782, + zUpdate = Xsqlite3_mprintf(tls, ts+30877, 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) @@ -125973,7 +126740,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126005,7 +126772,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30812, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30907, 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)), 0) { case RBU_STATE_STAGE: @@ -126075,28 +126842,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6360, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, 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+6360) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30842, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30937, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30869, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3265, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30965, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3279, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6360, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6374, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30887, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30983, 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+6360, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126129,11 +126896,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+30953, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31049, 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+24034, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24129, (*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)))) == '?' { @@ -126145,16 +126912,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30985, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360), + zTarget = Xsqlite3_mprintf(tls, ts+31081, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } - return ts + 31017 + return ts + 31113 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } return zExtra }())) @@ -126170,37 +126937,37 @@ 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+31019, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31115, -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+31034, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31130, 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+31051, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31147, -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+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31067, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 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+31095, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31191, 0) } } @@ -126229,14 +126996,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31067, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, uintptr(0), uintptr(0), uintptr(0)) } } 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+31113, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126345,7 +127112,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126362,23 +127129,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31148, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31244, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) } - zOal = Xsqlite3_mprintf(tls, ts+31173, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126399,12 +127166,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -126498,7 +127262,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23672, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23767, 0) return } @@ -126591,7 +127355,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31187) + ts+31283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -126599,7 +127363,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31305, libc.VaList(bp, iCookie+1)) } } } @@ -126620,7 +127384,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31236, + ts+31332, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -126650,9 +127414,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31394, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31490, 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+31409, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31505, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126666,10 +127430,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31429, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31525, 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+31454) + ts+31550) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126683,12 +127447,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31562) + ts+31658) } 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+31627) + ts+31723) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126700,7 +127464,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31671, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31767, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126720,15 +127484,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17170) - rbuCopyPragma(tls, p, ts+16281) + rbuCopyPragma(tls, p, ts+17217) + rbuCopyPragma(tls, p, ts+16328) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31696, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31792, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126752,10 +127516,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126850,7 +127614,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31724, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31820, 0) } if rc == SQLITE_OK { @@ -126866,7 +127630,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31173, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31269, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126882,7 +127646,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31749, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31845, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126916,7 +127680,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31760, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31856, 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)), -1) } else { @@ -126946,13 +127710,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31832, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31928, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31846) + ts+31942) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126963,7 +127727,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31903) + ts+31999) 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)), 0) @@ -126993,10 +127757,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127007,7 +127772,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3642, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3656, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127036,7 +127801,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+31977, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32073, 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 @@ -127054,12 +127819,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32009, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32105, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32041 + return ts + 32137 } - return ts + 32048 + return ts + 32144 }())) } } @@ -127067,7 +127832,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+14472, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14486, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127078,19 +127843,19 @@ 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+16884) - rbuCopyPragma(tls, p, ts+16296) + rbuCopyPragma(tls, p, ts+16931) + rbuCopyPragma(tls, p, ts+16343) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32055, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32151, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32071, uintptr(0), uintptr(0), p+64) + db, ts+32167, uintptr(0), uintptr(0), p+64) } } @@ -127144,7 +127909,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32095, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32191, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127171,7 +127936,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30121, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30216, 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++ @@ -127188,7 +127953,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127201,13 +127966,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32103, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32199, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127302,7 +128067,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127319,19 +128084,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14472 + zBegin = ts + 14486 } else { - zBegin = ts + 32055 + zBegin = ts + 32151 } 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+32055, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32151, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127339,6 +128104,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -127357,7 +128144,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -127652,7 +128439,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32130, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32226, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127677,7 +128464,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+32153, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32249, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127722,7 +128509,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -130533,7 +131320,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -130575,7 +131362,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -130636,7 +131423,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -130710,13 +131497,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -130778,7 +131565,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -130790,6 +131577,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131142,7 +131938,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -131310,45 +132106,45 @@ 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+11265) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11279) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+32740, bp+16) + sessionAppendStr(tls, bp, ts+32836, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32753, bp+16) + sessionAppendStr(tls, bp, ts+32849, bp+16) 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+32759, bp+16) + sessionAppendStr(tls, bp, ts+32855, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14583 + zSep = ts + 14597 } } - zSep = ts + 1527 - sessionAppendStr(tls, bp, ts+32688, bp+16) + zSep = ts + 1547 + sessionAppendStr(tls, bp, ts+32784, 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+32764, bp+16) + ts+32860, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32696, bp+16) + sessionAppendStr(tls, bp, ts+32792, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21362 + zSep = ts + 21457 } } @@ -131395,42 +132191,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32839, bp+16) + sessionAppendStr(tls, bp, ts+32935, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32688, bp+16) + sessionAppendStr(tls, bp, ts+32784, 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+32759, bp+16) + sessionAppendStr(tls, bp, ts+32855, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21362 + zSep = ts + 21457 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32857, bp+16) + sessionAppendStr(tls, bp, ts+32953, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32400, bp+16) + sessionAppendStr(tls, bp, ts+32496, bp+16) - zSep = ts + 1527 + zSep = ts + 1547 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+32696, bp+16) + sessionAppendStr(tls, bp, ts+32792, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32865 + zSep = ts + 32961 } } - sessionAppendStr(tls, bp, ts+4936, bp+16) + sessionAppendStr(tls, bp, ts+4950, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -131443,7 +132239,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6360, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6374, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -131454,21 +132250,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32870, bp+16) + sessionAppendStr(tls, bp, ts+32966, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21368, bp+16) + sessionAppendStr(tls, bp, ts+21463, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14583, bp+16) + sessionAppendStr(tls, bp, ts+14597, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32888, bp+16) + sessionAppendStr(tls, bp, ts+32984, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32899, bp+16) + sessionAppendStr(tls, bp, ts+32995, bp+16) } - sessionAppendStr(tls, bp, ts+4936, bp+16) + sessionAppendStr(tls, bp, ts+4950, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -131482,14 +132278,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11265, p) + var rc int32 = sessionSelectRow(tls, db, ts+11279, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32903) + ts+32999) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33016) + ts+33112) } return rc } @@ -131517,7 +132313,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131770,7 +132566,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33160, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33256, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131786,7 +132582,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+33181, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33277, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131859,10 +132655,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33200, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33296, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33226, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33322, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -131895,7 +132691,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131908,7 +132704,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6360, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6374, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -131921,19 +132717,19 @@ 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+33256, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33352, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33300, + ts+33396, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33371, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33467, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11265) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11279) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131984,14 +132780,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33431, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33527, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33485, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33581, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132505,7 +133301,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -133239,7 +134035,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33513, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33609, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133527,7 +134323,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33637, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133714,7 +134510,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+33572, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33668, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133782,7 +134578,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33579 + var zErr uintptr = ts + 33675 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133941,7 +134737,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1527 + return ts + 1547 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -133964,7 +134760,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33629 + var zErr uintptr = ts + 33725 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134288,13 +135084,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33677, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33773, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33685, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33781, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33695, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33791, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134705,7 +135501,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6160, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6174, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134845,7 +135641,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33700, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33796, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134872,14 +135668,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+33707, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33738, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33834, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134890,7 +135686,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33771, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33867, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134903,7 +135699,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33808, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33904, 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))) @@ -134912,7 +135708,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+33817, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33913, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134931,7 +135727,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33850, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33946, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134946,14 +135742,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33884, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33980, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33892, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33988, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33924, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34020, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134961,9 +135757,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33930, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34026, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33944, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34040, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134971,9 +135767,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33982, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34078, 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+33993, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -134981,21 +135777,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5054, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5068, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7937, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17275}, - {FzName: ts + 34028, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7951, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17322}, + {FzName: ts + 34124, 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+34036, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34132, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34067, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34163, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135042,15 +135838,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22028) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16197) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34095, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22123) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16244) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34191, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34125) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34221) { *(*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+34135, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34231, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135067,13 +135863,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34166, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34262, 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+34171, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34267, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34178, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+16, i)) } } } @@ -135111,8 +135907,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+22028) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34186, 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+22123) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34282, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135144,7 +135940,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+34215, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34311, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135153,13 +135949,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1527 + return ts + 1547 }(), pzErr) } else { @@ -135181,19 +135977,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 + 33884 + zTail = ts + 33980 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34235 + zTail = ts + 34331 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34243, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34339, 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+16197, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16244, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135237,18 +136033,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34254, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34350, 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 + 1547 } - return ts + 14583 + return ts + 14597 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34270, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34366, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22028)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22123)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135358,7 +136154,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34399) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135368,7 +136164,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+34308) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34404) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135378,7 +136174,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+34317) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34413) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135391,7 +136187,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+34327) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34423) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135401,7 +136197,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+34337) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34433) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135417,7 +136213,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+22028) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22123) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -135440,7 +136236,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34349 + var zSelect uintptr = ts + 34445 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -135462,7 +136258,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34381) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34477) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -135476,7 +136272,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34389, + ts+34485, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -135574,7 +136370,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34454, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34550, 0) return FTS5_EOF } } @@ -135587,20 +136383,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+34474, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34570, 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+34505, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34601, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34508, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34604, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29891, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29986, uint64(3)) == 0 { tok = FTS5_AND } break @@ -137367,9 +138163,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34512, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34608, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33637, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137385,7 +138181,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+34517, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34613, 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') @@ -137472,7 +138268,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20365, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20460, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -137553,7 +138349,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34546, 0) + ts+34642, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137723,12 +138519,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+34599, + ts+34695, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34649 + return ts + 34745 } - return ts + 34512 + return ts + 34608 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138671,7 +139467,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34656, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34752, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -138750,7 +139546,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+34662, + ts+34758, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138775,7 +139571,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34713, + ts+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -138798,7 +139594,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34762, + ts+34858, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139037,7 +139833,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139110,13 +139906,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140236,7 +141032,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34825, + ts+34921, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141429,7 +142225,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1527 + return ts + 1547 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -141595,10 +142391,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -141626,7 +142422,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141702,7 +142498,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+34909, + ts+35005, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141745,7 +142541,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -141757,7 +142553,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -141877,7 +142673,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142276,12 +143072,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -142292,7 +143088,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -142473,7 +143269,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -142597,7 +143393,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -142606,7 +143402,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -142638,8 +143434,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -142692,8 +143488,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -142763,7 +143559,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1527, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1547, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -142779,13 +143575,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+34966, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35062, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24884, ts+34974, 0, pzErr) + pConfig, ts+24979, ts+35070, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11405, - ts+35009, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11419, + ts+35105, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143038,7 +143834,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+34656, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34752, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143152,7 +143948,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35053, + ts+35149, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -143311,6 +144107,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -143318,7 +144118,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35139) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35235) 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)) @@ -143589,7 +144389,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR } @@ -143620,7 +144420,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -143635,7 +144435,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, 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) @@ -143949,7 +144749,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143981,7 +144781,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144013,25 +144813,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35183, + ts+35279, 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 + 14583 + return ts + 14597 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bDesc != 0 { - return ts + 35238 + return ts + 35334 } - return ts + 35243 + return ts + 35339 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144077,12 +144877,12 @@ 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+35247, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35343, 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+5036, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5050, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35253, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35349, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144113,7 +144913,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35281, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35377, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144144,7 +144944,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35291, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35387, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144176,14 +144976,14 @@ 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+35312, libc.VaList(bp, z)) + ts+35408, 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 + 33695 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33791 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144239,7 +145039,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR __1: ; @@ -144282,7 +145082,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144456,7 +145256,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35345, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35441, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -144577,7 +145377,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -144601,28 +145401,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35381, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35477, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35392, 0) + ts+35488, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35472, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35568, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35480, 0) + ts+35576, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16864, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16911, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35632, 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+35542, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35638, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144680,7 +145480,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17409, z) { + 0 == Xsqlite3_stricmp(tls, ts+17456, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -144693,12 +145493,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35558, + ts+35654, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20266 + return ts + 20361 } - return ts + 35595 + return ts + 35691 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145328,7 +146128,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+35607, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35703, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -145572,7 +146372,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+35628, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35724, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -145591,7 +146391,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+35650, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35746, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -145638,7 +146438,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35681) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35777) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -145647,7 +146447,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35694, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35790, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145661,7 +146461,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35785, ts + 33884, ts + 24884, ts + 34235, ts + 11405, + ts + 35881, ts + 33980, ts + 24979, ts + 34331, ts + 11419, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145685,7 +146485,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35792, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35888, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145703,13 +146503,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35792, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35888, 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+35797, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35893, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145764,17 +146564,17 @@ 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)) = [11]uintptr{ - ts + 35812, - ts + 35880, - ts + 35949, - ts + 35982, - ts + 36021, - ts + 36061, - ts + 36100, - ts + 36141, - ts + 36180, - ts + 36222, - ts + 36262, + ts + 35908, + ts + 35976, + ts + 36045, + ts + 36078, + ts + 36117, + ts + 36157, + ts + 36196, + ts + 36237, + ts + 36276, + ts + 36318, + ts + 36358, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145841,7 +146641,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3642, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145876,18 +146676,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36285, + ts+36381, 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+36389, + ts+36485, 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+36427, + ts+36523, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145899,7 +146699,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36465, + ts+36561, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145911,14 +146711,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24884, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11405, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35785, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24979, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11419, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35881, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34235, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34331, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33884, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33980, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145930,17 +146730,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36507, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36603, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36537, + ts+36633, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145977,27 +146777,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36581, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36677, 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+36604, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36700, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33884, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33980, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34235, ts+36610, 0, pzErr) + pConfig, ts+34331, ts+36706, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35785, ts+36642, 1, pzErr) + pConfig, ts+35881, ts+36738, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146203,12 +147003,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36659, + ts+36755, 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+36709, + ts+36805, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146216,7 +147016,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146392,7 +147192,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36738, + zSql = Xsqlite3_mprintf(tls, ts+36834, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -146574,14 +147374,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33884, bp+48) + rc = fts5StorageCount(tls, p, ts+33980, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34235, bp+56) + rc = fts5StorageCount(tls, p, ts+34331, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146776,9 +147576,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+36770) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36866) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36877) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146993,7 +147793,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 + 36792 + var zCat uintptr = ts + 36888 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147005,7 +147805,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36801) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36897) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147016,18 +147816,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+36812) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36908) { 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+36770) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36866) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36877) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36801) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36897) { } else { rc = SQLITE_ERROR } @@ -147303,7 +148103,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)) = uintptr(0) - var zBase uintptr = ts + 36830 + var zBase uintptr = ts + 36926 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147445,7 +148245,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36840, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147453,11 +148253,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, 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+36848, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147465,7 +148265,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147473,7 +148273,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36856, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147481,11 +148281,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, 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+36864, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147493,19 +148293,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36869, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36965, 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+36873, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36879, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36975, 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+36884, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147513,11 +148313,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36888, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36984, 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+36892, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147525,7 +148325,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147533,11 +148333,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36899, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36995, 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+36903, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147545,7 +148345,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36907, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147553,7 +148353,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147561,7 +148361,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147577,24 +148377,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36919, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36899, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36925, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37021, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36915, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37011, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -147609,137 +148409,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36932, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36947, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37043, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37048, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36848, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36944, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36957, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37053, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36843, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36939, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36915, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37011, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15410, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15457, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36925, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37021, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36976, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36884, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36980, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36991, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37087, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } 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+37089, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36907, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37003, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37095, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36915, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37011, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37013, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37114, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37024, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37120, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37007, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37040, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37136, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37140, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36907, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37003, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37148, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37154, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37007, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37064, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37160, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36925, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37021, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147754,16 +148554,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37071, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36856, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36952, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37076, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37172, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147771,21 +148571,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37177, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37183, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37040, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37136, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147793,7 +148593,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37189, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147801,9 +148601,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37195, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147818,12 +148618,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37105, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37201, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37109, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37205, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37112, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147832,7 +148632,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37115, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37211, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147988,7 +148788,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+37119) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37215) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148168,22 +148968,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36830, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36926, 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 + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37230, 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 + 37140, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37236, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 @@ -149326,14 +150126,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+37155) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37251) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37159) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37255) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37163) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37259) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37172, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37268, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149359,19 +150159,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37206, - ts + 37246, - ts + 37281, + ts + 37302, + ts + 37342, + ts + 37377, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23180, *(*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+23275, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37324, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37420, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -149504,11 +150304,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+37357, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37453, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37388, + ts+37484, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -149532,7 +150332,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37439, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37535, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149816,7 +150616,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1527 + zCopy = ts + 1547 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -149927,7 +150727,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37465, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37561, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149949,7 +150749,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37475 + return ts + 37571 } func init() { @@ -150490,7 +151290,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -150800,16 +151600,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -150866,12 +151666,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -150886,6 +151686,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -150907,5 +151708,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go index cde57979b2..2837204cd7 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_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_freebsd_arm.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_arm.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -300,7 +300,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -832,7 +831,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -845,49 +844,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -896,21 +895,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -922,8 +921,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -935,22 +934,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -958,13 +957,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -979,13 +978,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0x0003 @@ -1509,7 +1508,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1605,6 +1604,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1740,6 +1740,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1770,6 +1771,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1870,6 +1872,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1943,7 +1947,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2051,8 +2055,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2470,6 +2474,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3257,7 +3262,6 @@ type sqlite3 = struct { FbusyTimeout int32 FnSavepoint int32 FnStatement int32 - F__ccgo_pad4 [4]byte FnDeferredCons I64 FnDeferredImmCons I64 FpnBytesFreed uintptr @@ -3369,7 +3373,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3700,6 +3713,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3710,6 +3724,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5223,6 +5255,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5260,6 +5303,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5308,7 +5352,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5322,6 +5366,7 @@ type Parse1 = struct { FnLabelAlloc int32 FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5682,8 +5727,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5700,7 +5744,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr F__ccgo_pad2 [4]byte FrevMask Bitmask @@ -5963,8 +6006,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6289,17 +6332,6 @@ type IdxCover = struct { FiCur int32 } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6329,7 +6361,13 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -6338,49 +6376,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 849, - ts + 875, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, ts + 895, - ts + 921, - ts + 944, - ts + 970, - ts + 992, - ts + 1013, - ts + 1024, - ts + 1032, - ts + 1046, - ts + 1059, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -6482,7 +6521,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -6530,10 +6568,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1072)) +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1092)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -6545,10 +6583,6 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1072)) // // 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)} var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), @@ -6558,21 +6592,13 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]uint8{ - uint8(0), - uint8(SQLITE_BLOB), - uint8(SQLITE_INTEGER), - uint8(SQLITE_INTEGER), - uint8(SQLITE_FLOAT), - uint8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1079, - ts + 1083, - ts + 1088, - ts + 1092, - ts + 1100, - ts + 1105, + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, } // SQL is translated into a sequence of instructions to be @@ -6870,7 +6896,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7006,6 +7032,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FpSchema if pSchema != uintptr(0) { @@ -7029,6 +7057,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7043,9 +7072,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7270,7 +7302,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1110, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -7296,13 +7328,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1118, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, 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+1126, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -7378,7 +7410,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*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)) + *(*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)+0.5) 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) @@ -7400,7 +7432,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -7457,7 +7489,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1142) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 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))) @@ -7590,7 +7622,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 96)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+96, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1146, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -7614,12 +7646,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1169)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1176)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1183)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1190)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1189)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1196)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1203)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1210)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1217)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1224)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -7631,7 +7663,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(z))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1231) == 0 { if idx > 1 { return 1 } @@ -7653,7 +7685,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1216) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1236) == 0 { if idx > 1 { return 1 } @@ -7667,7 +7699,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1226) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -7675,7 +7707,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1236) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1256) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -7687,7 +7719,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -7721,9 +7753,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -7742,7 +7774,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1259, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1279, 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) { @@ -7756,14 +7788,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*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+1269) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1289) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1275) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1295) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1300) == 0 { rc = 0 } break @@ -8089,7 +8121,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8099,13 +8131,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1289, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8123,41 +8155,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1321, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1307, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1327, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8170,7 +8202,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1332, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -8220,15 +8252,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1216}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1236}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1317}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1322}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1256}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1342}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1356}, + {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 + 1378}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1396}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -8379,7 +8411,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -8643,7 +8675,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1389, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1409, libc.VaList(bp, nByte)) } return p } @@ -8676,7 +8708,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1427, + ts+1447, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9088,7 +9120,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(4) defer tls.Free(4) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9124,7 +9156,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9144,7 +9176,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9193,24 +9225,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -9526,7 +9585,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -9599,8 +9658,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1477)) -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1510)) +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1497)) +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1530)) 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)}, @@ -9812,7 +9871,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1517, 1) + Xsqlite3_str_append(tls, pAccum, ts+1537, 1) goto __5 __11: ; @@ -10373,7 +10432,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1519 + bufpt = ts + 1539 length = 3 goto __58 __127: @@ -10433,7 +10492,7 @@ __138: } bufpt = bp + 16 *(*uint8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1523, uint32(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1543, uint32(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -10774,7 +10833,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1527 + bufpt = ts + 1547 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -10898,9 +10957,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1528 + return ts + 1548 } - return ts + 1533 + return ts + 1553 }() __220: ; @@ -11048,7 +11107,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1540, 1) + Xsqlite3_str_append(tls, pAccum, ts+1560, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11065,10 +11124,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1542, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1552, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11123,7 +11182,7 @@ __4: __5: } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1566)) +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1586)) // 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 @@ -11288,7 +11347,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1527, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1547, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -11520,20 +11579,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint32(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11546,46 +11711,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint32(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([256]uint8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint32(44)) } 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 + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - sqlite3Prng.FisInit = uint8(1) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint32(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint32(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -12890,7 +13055,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1575 + var pow63 uintptr = ts + 1595 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 } @@ -13436,7 +13601,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1594, + ts+1614, libc.VaList(bp, zType)) } @@ -13455,13 +13620,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1528) + logBadConnection(tls, ts+1548) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1639) + logBadConnection(tls, ts+1659) } return 0 } else { @@ -13474,7 +13639,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1648) + logBadConnection(tls, ts+1668) return 0 } else { return 1 @@ -13999,193 +14164,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1656, - ts + 1666, - ts + 1677, - ts + 1689, - ts + 1700, - ts + 1712, - ts + 1719, - ts + 1727, - ts + 1735, - ts + 1740, - ts + 1746, + ts + 1676, + ts + 1686, + ts + 1697, + ts + 1709, + ts + 1720, + ts + 1732, + ts + 1739, + ts + 1747, + ts + 1755, ts + 1760, - ts + 1766, - ts + 1776, - ts + 1781, - ts + 1786, - ts + 1789, - ts + 1795, - ts + 1808, - ts + 1818, - ts + 1822, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1860, + ts + 1765, + ts + 1771, + ts + 1785, + ts + 1791, + ts + 1801, + ts + 1806, + ts + 1811, + ts + 1814, + ts + 1820, + ts + 1827, + ts + 1831, + ts + 1841, + ts + 1848, + ts + 1855, + ts + 1862, ts + 1869, - ts + 1880, - ts + 1889, - ts + 1895, - ts + 1905, - ts + 1915, - ts + 1920, - ts + 1930, - ts + 1941, - ts + 1946, - ts + 1953, - ts + 1964, - ts + 1969, - ts + 1974, - ts + 1980, - ts + 1986, - ts + 1992, - ts + 1998, - ts + 2001, + ts + 1879, + ts + 1888, + ts + 1899, + ts + 1908, + ts + 1914, + ts + 1924, + ts + 1934, + ts + 1939, + ts + 1949, + ts + 1960, + ts + 1965, + ts + 1972, + ts + 1983, + ts + 1988, + ts + 1993, + ts + 1999, ts + 2005, - ts + 2016, - ts + 2027, + ts + 2011, + ts + 2014, + ts + 2018, + ts + 2024, ts + 2035, - ts + 2044, - ts + 2050, - ts + 2057, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, - ts + 2083, + ts + 2046, + ts + 2054, + ts + 2063, + ts + 2070, + ts + 2078, + ts + 2081, + ts + 2084, + ts + 2087, ts + 2090, - ts + 2100, - ts + 2113, - ts + 2124, - ts + 2130, - ts + 2137, - ts + 2142, - ts + 2151, - ts + 2160, - ts + 2167, - ts + 2180, - ts + 2191, - ts + 2196, - ts + 2204, + ts + 2093, + ts + 2096, + ts + 2103, + ts + 2109, + ts + 2119, + ts + 2132, + ts + 2143, + ts + 2149, + ts + 2156, + ts + 2165, + ts + 2174, + ts + 2181, + ts + 2194, + ts + 2205, ts + 2210, - ts + 2217, - ts + 2229, - ts + 2234, + ts + 2218, + ts + 2224, + ts + 2231, ts + 2243, ts + 2248, ts + 2257, ts + 2262, - ts + 2267, - ts + 2273, + ts + 2271, + ts + 2276, ts + 2281, - ts + 2289, - ts + 2299, - ts + 2307, - ts + 2314, - ts + 2327, - ts + 2332, - ts + 2344, - ts + 2352, - ts + 2359, - ts + 2370, - ts + 2377, + ts + 2287, + ts + 2295, + ts + 2303, + ts + 2313, + ts + 2321, + ts + 2328, + ts + 2341, + ts + 2346, + ts + 2358, + ts + 2366, + ts + 2373, ts + 2384, - ts + 2394, - ts + 2403, - ts + 2414, - ts + 2420, - ts + 2431, - ts + 2441, - ts + 2451, - ts + 2458, - ts + 2464, - ts + 2474, - ts + 2485, - ts + 2489, - ts + 2498, - ts + 2507, - ts + 2514, - ts + 2524, - ts + 2531, - ts + 2540, - ts + 2550, - ts + 2557, - ts + 2565, + ts + 2391, + ts + 2398, + ts + 2408, + ts + 2417, + ts + 2428, + ts + 2434, + ts + 2445, + ts + 2455, + ts + 2465, + ts + 2472, + ts + 2478, + ts + 2488, + ts + 2499, + ts + 2503, + ts + 2512, + ts + 2521, + ts + 2528, + ts + 2538, + ts + 2545, + ts + 2554, + ts + 2564, + ts + 2571, ts + 2579, - ts + 2587, + ts + 2593, ts + 2601, - ts + 2612, - ts + 2625, - ts + 2636, - ts + 2642, - ts + 2654, - ts + 2663, - ts + 2671, - ts + 2680, - ts + 2689, - ts + 2696, - ts + 2704, - ts + 2711, - ts + 2722, + ts + 2615, + ts + 2626, + ts + 2639, + ts + 2650, + ts + 2656, + ts + 2668, + ts + 2677, + ts + 2685, + ts + 2694, + ts + 2703, + ts + 2710, + ts + 2718, + ts + 2725, ts + 2736, - ts + 2747, - ts + 2755, + ts + 2750, ts + 2761, ts + 2769, - ts + 2777, - ts + 2787, - ts + 2800, - ts + 2810, - ts + 2823, - ts + 2832, - ts + 2843, - ts + 2851, + ts + 2775, + ts + 2783, + ts + 2791, + ts + 2801, + ts + 2814, + ts + 2824, + ts + 2837, + ts + 2846, ts + 2857, - ts + 2869, - ts + 2881, - ts + 2889, - ts + 2901, - ts + 2914, - ts + 2924, - ts + 2934, - ts + 2939, - ts + 2951, - ts + 2963, - ts + 2973, - ts + 2979, - ts + 2989, - ts + 2996, - ts + 3008, - ts + 3019, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3054, - ts + 3061, - ts + 3072, - ts + 3085, - ts + 3095, - ts + 3102, - ts + 3110, - ts + 3119, - ts + 3125, + ts + 2865, + ts + 2871, + ts + 2883, + ts + 2895, + ts + 2903, + ts + 2915, + ts + 2928, + ts + 2938, + ts + 2948, + ts + 2953, + ts + 2965, + ts + 2977, + ts + 2987, + ts + 2993, + ts + 3003, + ts + 3010, + ts + 3022, + ts + 3033, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3068, + ts + 3075, + ts + 3086, + ts + 3099, + ts + 3109, + ts + 3116, + ts + 3124, ts + 3133, - ts + 3141, - ts + 3149, - ts + 3159, - ts + 3168, - ts + 3179, - ts + 3189, - ts + 3195, - ts + 3206, - ts + 3217, - ts + 3222, - ts + 3230, + ts + 3139, + ts + 3147, + ts + 3155, + ts + 3163, + ts + 3173, + ts + 3182, + ts + 3193, + ts + 3203, + ts + 3209, + ts + 3220, + ts + 3231, + ts + 3236, + ts + 3244, } type pthread_once = struct { @@ -14624,35 +14789,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3240, FpCurrent: 0}, - {FzName: ts + 3245, FpCurrent: 0}, - {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, + {FzName: ts + 3254, FpCurrent: 0}, + {FzName: ts + 3259, FpCurrent: 0}, {FzName: ts + 3265, FpCurrent: 0}, - {FzName: ts + 3270, FpCurrent: 0}, - {FzName: ts + 3276, FpCurrent: 0}, - {FzName: ts + 3286, FpCurrent: 0}, - {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3297}, - {FzName: ts + 3303}, - {FzName: ts + 3311, FpCurrent: 0}, + {FzName: ts + 3272, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3284, FpCurrent: 0}, + {FzName: ts + 3290, FpCurrent: 0}, + {FzName: ts + 3300, FpCurrent: 0}, + {FzName: ts + 3306, FpCurrent: 0}, + {FzName: ts + 3311}, {FzName: ts + 3317}, - {FzName: ts + 3324}, - {FzName: ts + 3333, FpCurrent: 0}, - {FzName: ts + 3340}, - {FzName: ts + 3350, FpCurrent: 0}, - {FzName: ts + 3357, FpCurrent: 0}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3331}, + {FzName: ts + 3338}, + {FzName: ts + 3347, FpCurrent: 0}, + {FzName: ts + 3354}, + {FzName: ts + 3364, FpCurrent: 0}, {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3377, FpCurrent: 0}, - {FzName: ts + 3383, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3403, FpCurrent: 0}, - {FzName: ts + 3410}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, + {FzName: ts + 3397, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3412, FpCurrent: 0}, {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3438, FpCurrent: 0}, - {FzName: ts + 3444}, + {FzName: ts + 3424}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3452, FpCurrent: 0}, + {FzName: ts + 3458}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -14745,11 +14910,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*12 + 4)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3450, libc.VaList(bp, z, fd)) + ts+3464, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3493, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3507, O_RDONLY, int32(m)) < 0 { break } } @@ -14828,13 +14996,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__error(tls))) - zErr = ts + 1527 + zErr = ts + 1547 if zPath == uintptr(0) { - zPath = ts + 1527 + zPath = ts + 1547 } Xsqlite3_log(tls, errcode, - ts+3503, + ts+3517, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14842,7 +15010,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3245, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3259, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14863,7 +15031,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -14965,19 +15133,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32) if rc != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3534, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3548, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3558, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3572, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3587, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3601, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3614, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3628, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15340,7 +15508,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15613,7 +15781,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3642, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3656, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15631,7 +15799,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3357, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15648,14 +15816,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3645, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3659, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -15675,7 +15843,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -15730,7 +15898,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1527, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1547, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -15743,7 +15911,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -15811,7 +15979,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -15970,7 +16138,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -15998,7 +16166,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3276, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16061,7 +16229,7 @@ __4: ; libc.Xmemset(tls, pShmNode, 0, uint32(unsafe.Sizeof(unixShmNode{}))+uint32(nShmFilename)) zShm = libc.AssignPtrUintptr(pShmNode+8, pShmNode+1*68) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3656, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3670, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16082,7 +16250,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3663, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3677, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -16097,7 +16265,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3240, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) goto shm_open_err __10: ; @@ -16223,11 +16391,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 224)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1527, 1, bp+224) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1547, 1, bp+224) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3311, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) goto shmpage_out __14: ; @@ -16273,7 +16441,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3398, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -16474,7 +16642,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3398 + var zErr uintptr = ts + 3412 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -16512,7 +16680,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -16627,10 +16795,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3676, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3690, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3681) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3695) == 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_EXCL) } @@ -16646,7 +16814,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+8) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -16659,7 +16827,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3691, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3705, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16667,7 +16835,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16680,15 +16848,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3699, - ts + 3708, - ts + 3717, - ts + 1540, + ts + 3713, + ts + 3722, + ts + 3731, + ts + 1560, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3722) - azTempDirs[1] = libc.Xgetenv(tls, ts+3736) + azTempDirs[0] = libc.Xgetenv(tls, ts+3736) + azTempDirs[1] = libc.Xgetenv(tls, ts+3750) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16733,7 +16901,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { 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+3743, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3757, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16818,7 +16986,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3760) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3774) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16866,10 +17034,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -16983,7 +17151,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3240, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17074,7 +17242,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+3350, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) } return rc } @@ -17082,9 +17250,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+3767, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3781, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17151,18 +17319,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3438, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000 { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, bp+224, uint32(unsafe.Sizeof([1026]uint8{}))-uint32(2)) if got <= 0 || got >= Ssize_t(unsafe.Sizeof([1026]uint8{}))-2 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3429, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) return } *(*uint8)(unsafe.Pointer(bp + 224 + uintptr(got))) = uint8(0) @@ -17202,14 +17370,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1028)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, bp, uint32(unsafe.Sizeof([1026]uint8{}))-uint32(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3258, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) } appendAllPathElements(tls, bp+1028, bp) } appendAllPathElements(tls, bp+1028, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1028)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+1028)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1028)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1028)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17261,7 +17429,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3642, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3656, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17289,11 +17457,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint32(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3773, O_RDONLY, uint16(0)) + fd = robust_open(tls, ts+3787, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint32(unsafe.Sizeof(Time_t(0)))) @@ -17304,7 +17472,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -17381,10 +17549,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3786, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3791, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3801, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3681, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3800, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3805, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3815, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3695, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -17436,7 +17604,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3814, + FzName: ts + 3828, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17603,40 +17771,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -17647,7 +17860,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3820, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3834, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17703,7 +17916,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint32(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -17779,7 +17992,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3642, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3656, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17900,7 +18113,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3835, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3849, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -17973,7 +18186,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3858, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3872, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18036,6 +18249,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -18719,6 +18937,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18751,6 +18970,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 28)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21179,7 +21399,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3873, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3887, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -22316,7 +22536,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -22377,7 +22597,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3900, uint32(8)) + libc.Xmemcpy(tls, pPtr, ts+3914, uint32(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -22390,7 +22610,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3909, uint32(4)) + libc.Xmemcpy(tls, pPtr, ts+3923, uint32(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -22442,9 +22662,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3914, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22708,7 +22928,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22832,7 +23052,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22871,7 +23091,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -22948,7 +23168,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23075,6 +23295,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -23948,7 +24169,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24133,7 +24354,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3931, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3945, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24702,7 +24923,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24801,7 +25022,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -24969,7 +25190,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3949, + ts+3963, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -25386,7 +25607,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -25531,7 +25752,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3986, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4000, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25661,7 +25882,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26134,7 +26355,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -26639,7 +26860,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27030,7 +27251,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4012)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4026)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27295,7 +27516,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -27432,7 +27653,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -27449,7 +27670,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -27457,7 +27678,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -27500,7 +27721,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -27510,7 +27731,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -27760,7 +27981,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27792,8 +28013,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27808,7 +28028,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -27818,7 +28038,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27831,7 +28051,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -27840,14 +28060,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -27857,7 +28077,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -27904,63 +28124,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint32(usableSize-iCellStart)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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), uint32(usableSize-iCellStart)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint32(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -27992,10 +28206,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint32(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28006,15 +28219,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28039,7 +28252,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28050,7 +28263,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28098,26 +28311,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28127,7 +28340,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28135,7 +28348,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28143,10 +28356,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28215,7 +28428,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -28245,11 +28458,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -28260,15 +28473,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28296,14 +28509,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -28317,7 +28530,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -28329,7 +28542,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -28432,7 +28645,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -28460,7 +28673,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -28499,7 +28712,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -28523,7 +28736,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+460) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+464) } // Open a database file. @@ -28572,7 +28785,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt 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+4028) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4042) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -29344,7 +29557,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4037, uint32(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4051, uint32(3)) != 0) { goto __14 } goto page1_init_failed @@ -29382,7 +29595,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -29797,7 +30010,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29823,7 +30036,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -29831,6 +30044,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29840,7 +30056,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29856,7 +30072,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29917,7 +30133,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -29952,7 +30168,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) if *(*Pgno)(unsafe.Pointer(bp + 24)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30012,7 +30228,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30051,7 +30267,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30082,7 +30298,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -30423,7 +30639,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30667,14 +30883,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } getCellInfo(tls, pCur) aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload if Uptr((int32(aPayload)-int32((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > (*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30719,7 +30935,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30768,7 +30984,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -30847,10 +31063,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30858,7 +31072,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*uintptr)(unsafe.Pointer(pCur + 120 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*4)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ - return getAndInitPage(tls, pBt, newPgno, pCur+116, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+116, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30920,7 +31135,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+116, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+116, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30940,7 +31155,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -30960,7 +31175,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31172,7 +31387,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -31376,7 +31591,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -31441,7 +31656,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -31489,7 +31704,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -31608,7 +31823,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31768,7 +31983,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -31833,7 +32048,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -31869,7 +32084,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -31913,7 +32128,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32025,7 +32240,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32183,7 +32398,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -32240,7 +32455,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -32256,7 +32471,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -32330,7 +32545,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -32342,7 +32557,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 4)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -32353,7 +32568,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -32518,7 +32733,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32789,12 +33004,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -32802,7 +33017,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -32862,7 +33077,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -32951,7 +33166,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -33067,7 +33282,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 80)) = allocateBtreePage(tls, pBt, bp, bp+4, uint32(0), uint8(0)) @@ -33385,7 +33600,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -33396,7 +33611,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -33554,7 +33769,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -33628,7 +33843,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -33690,7 +33905,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -33718,7 +33933,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -33979,7 +34194,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34171,7 +34386,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34208,6 +34423,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } else { var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 120 + uintptr(iPage-1)*4)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 72 + uintptr(iPage-1)*2))) @@ -34298,7 +34515,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -34321,7 +34538,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -34401,7 +34618,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -34514,7 +34731,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 104)) = btreeComputeFreeSpace(tls, pPage) @@ -34575,7 +34792,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34613,13 +34830,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 108)))) @@ -34726,7 +34943,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34749,7 +34966,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34850,7 +35067,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -34858,11 +35075,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34937,7 +35154,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35006,7 +35223,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35035,7 +35252,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12))) @@ -35111,7 +35328,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35125,7 +35342,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -35259,7 +35476,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35447,7 +35664,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+40, ts+4041, 1) + Xsqlite3_str_append(tls, pCheck+40, ts+4055, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+40, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -35472,11 +35689,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4043, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4057, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4066, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4080, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 312)) != 0 { @@ -35497,13 +35714,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4091, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4105, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4120, + ts+4134, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -35522,7 +35739,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4174, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4188, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -35533,7 +35750,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4196, libc.VaList(bp+8, iPage)) + ts+4210, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35556,12 +35773,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4235, + ts+4249, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4261 + return ts + 4275 } - return ts + 4266 + return ts + 4280 }(), expected-N, expected)) } @@ -35668,13 +35885,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4287 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4301 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4297, libc.VaList(bp, rc)) + ts+4311, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35685,7 +35902,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4335, libc.VaList(bp+8, rc)) + ts+4349, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35693,14 +35910,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4373, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4387, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4395 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4409 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35717,7 +35934,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4421 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4435 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35742,7 +35959,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4449, + checkAppendMsg(tls, pCheck, ts+4463, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35755,7 +35972,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4479, 0) + checkAppendMsg(tls, pCheck, ts+4493, 0) doCoverageCheck = 0 goto __10 __13: @@ -35771,7 +35988,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4503, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4517, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -35809,7 +36026,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4527, 0) + checkAppendMsg(tls, pCheck, ts+4541, 0) depth = d2 __21: ; @@ -35882,7 +36099,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4552, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4566, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -35899,7 +36116,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4589, + ts+4603, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36019,7 +36236,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4641 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4655 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)).FzPfx = uintptr(0) @@ -36055,7 +36272,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4657, + ts+4671, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36065,7 +36282,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4702, 0) + ts+4716, 0) __16: ; __10: @@ -36112,13 +36329,13 @@ __23: 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+4757, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4771, 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+4779, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4793, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -36353,6 +36570,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -36366,8 +36592,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -36375,7 +36601,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3642, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3656, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -36386,7 +36612,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4813, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4827, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -36401,7 +36627,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4833, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4847, 0) return SQLITE_ERROR } return SQLITE_OK @@ -36421,7 +36647,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4864, 0) + pDestDb, SQLITE_ERROR, ts+4878, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36869,7 +37095,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+4904, + Xsqlite3_str_appendf(tls, bp+8, ts+4918, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37286,6 +37512,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37301,7 +37540,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -37361,6 +37600,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 12)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -37443,7 +37685,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1527 + return ts + 1547 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -37675,7 +37917,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37906,7 +38148,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -37968,7 +38210,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1527 + zNeg = ts + 1547 rc = SQLITE_OK __1: @@ -38009,7 +38251,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4911 + zNeg = ts + 4925 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38028,7 +38270,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4913, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4927, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -38332,7 +38574,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -38347,14 +38589,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -38413,6 +38655,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -38437,10 +38682,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+104, 0, uint32(unsafe.Sizeof(Vdbe{}))-uint32(uintptr(0)+104)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 8 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 4 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -38478,21 +38723,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38841,85 +39094,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 + } + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 20 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39019,6 +39304,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39046,7 +39341,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39054,12 +39349,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39078,7 +39373,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39129,7 +39426,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 20 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -39258,8 +39555,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -39270,10 +39567,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39284,6 +39577,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39299,34 +39597,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4918, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4932, 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 + 20 + uintptr(j)*4)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { - zColl = ts + 1527 + zColl = ts + 1547 } - if libc.Xstrcmp(tls, zColl, ts+1072) == 0 { - zColl = ts + 4923 + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 4937 } - Xsqlite3_str_appendf(tls, bp+144, ts+4925, + Xsqlite3_str_appendf(tls, bp+144, ts+4939, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4911 + return ts + 4925 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4933 + return ts + 4947 } - return ts + 1527 + return ts + 1547 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4936, 1) + Xsqlite3_str_append(tls, bp+144, ts+4950, 1) break } @@ -39334,7 +39632,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -39342,32 +39640,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1307, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1301, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -39377,13 +39675,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1307, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, 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+1301, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1528 + zP4 = ts + 1548 } else { - zP4 = ts + 4957 + zP4 = ts + 4971 } break @@ -39391,7 +39689,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4964, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4978, libc.VaList(bp+120, pVtab)) break } @@ -39402,20 +39700,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4972, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4986, 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+4977, 1) + Xsqlite3_str_append(tls, bp+144, ts+4991, 1) break } case -4: { - zP4 = ts + 4979 + zP4 = ts + 4993 break } @@ -39440,7 +39738,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4987, ts + 4989, ts + 4991, ts + 4996} +var encnames = [4]uintptr{ts + 5001, ts + 5003, ts + 5005, ts + 5010} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -39542,7 +39840,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39892,8 +40190,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5001, ts + 5006, ts + 5013, ts + 5016, ts + 5019, ts + 5022, ts + 5025, ts + 5028, - ts + 5036, ts + 5039, ts + 5046, ts + 5054, + ts + 5015, ts + 5020, ts + 5027, ts + 5030, ts + 5033, ts + 5036, ts + 5039, ts + 5042, + ts + 5050, ts + 5053, ts + 5060, ts + 5068, } // Close a VDBE cursor and release all the resources that cursor @@ -40102,7 +40400,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5061, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5075, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40110,16 +40408,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5073, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5101, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5102, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5116, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -40265,7 +40563,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5115, 0) + Xsqlite3VdbeError(tls, p, ts+5129, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -40545,7 +40843,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40555,14 +40853,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40573,16 +40873,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40599,7 +40895,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41150,16 +41446,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(7) { @@ -41177,7 +41477,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else { @@ -41207,7 +41511,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41241,7 +41545,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41264,7 +41568,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 48)) != U32(10)) } if rc != 0 { @@ -41286,7 +41590,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 40 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 48))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 48))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -41430,7 +41741,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -41601,7 +41912,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41627,7 +41938,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41670,7 +41981,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+152, Bft(iCode+1), 0, 0x3) } } @@ -41738,13 +42049,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5145 + zContext = ts + 5159 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5164 + zContext = ts + 5178 } else { - zContext = ts + 5183 + zContext = ts + 5197 } - zMsg = Xsqlite3_mprintf(tls, ts+5192, + zMsg = Xsqlite3_mprintf(tls, ts+5206, 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) @@ -41775,7 +42086,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41830,7 +42141,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*40) } - Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41849,7 +42160,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5228, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5242, 0) return 1 } else { return 0 @@ -41859,7 +42170,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5273, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5287, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41901,14 +42212,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42120,6 +42432,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -42316,7 +42632,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5313, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5327, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -42507,7 +42823,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42582,7 +42898,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5336) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5350) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43011,35 +43327,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5346, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5360, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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)*40 Xsqlite3VdbeMemRelease(tls, pVar) (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43054,7 +43369,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*40 @@ -43086,7 +43401,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, rValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43101,7 +43416,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, iValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43112,7 +43427,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43122,7 +43437,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, pPtr, zPTtype, xDestructor) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43198,7 +43513,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, n) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43342,7 +43657,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -43360,8 +43675,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 164 + uintptr(op)*4)) @@ -43425,7 +43743,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -43569,7 +43887,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -43741,7 +44059,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+5386, 3) + Xsqlite3_str_append(tls, bp+48, ts+5400, 3) Xsqlite3_str_append(tls, bp+48, zStart, (int32(zRawSql)-int32(zStart))/1) } @@ -43777,11 +44095,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 76))-1)*40 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { - Xsqlite3_str_append(tls, bp+48, ts+1528, 4) + Xsqlite3_str_append(tls, bp+48, ts+1548, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1307, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1327, 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+4904, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4918, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43796,21 +44114,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 80 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5390, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+80) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5410, 2) + Xsqlite3_str_append(tls, bp+48, ts+5424, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5413, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5427, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5418, 1) + Xsqlite3_str_append(tls, bp+48, ts+5432, 1) } } } @@ -43866,7 +44184,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -43970,12 +44289,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44027,11 +44345,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1088, - ts + 1100, - ts + 1105, - ts + 1083, - ts + 1528, + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1548, } // Execute as much of a VDBE program as we can. @@ -44069,7 +44387,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44098,11 +44415,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44172,42 +44492,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44215,52 +44536,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44302,19 +44623,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -44323,7 +44644,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -44331,11 +44652,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44571,7 +44892,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45067,20 +45388,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5420, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5434, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5441, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5455, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = (int32(pOp) - int32(aOp)) / 20 - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5448, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5462, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -45470,14 +45791,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) if !(int32(type1)&int32(type2)&MEM_Int != 0) { goto __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45555,72 +45876,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45637,10 +45966,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, int64(0)) -__275: +__276: ; goto __8 @@ -45652,33 +45981,33 @@ __43: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45687,43 +46016,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint32(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45739,26 +46068,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45766,12 +46095,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45786,17 +46115,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45811,163 +46140,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -45976,20 +46305,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -45999,15 +46328,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46015,9 +46344,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46029,52 +46358,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*40, aMem+uintptr(U32(p21)+idx)*40, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&KEYINFO_ORDER_BIGNULL != 0 && (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*40)).Fflags)&MEM_Null != 0)) { - goto __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*20 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*20 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46083,24 +46412,24 @@ __59: v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { - goto __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46114,13 +46443,13 @@ __61: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46129,38 +46458,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } iAddr = U32((int32(pOp) - int32((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 20) 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46169,10 +46498,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46180,10 +46509,10 @@ __65: c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) if !(c1 != 0) { - goto __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46191,35 +46520,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 80 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fflags)&MEM_Null != 0) { - goto __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, int64(0)) -__353: +__362: ; goto __8 @@ -46227,372 +46594,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { - goto __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*40 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*40 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272)) - *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) + *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 272)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 272)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 272))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 120))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 272))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 272)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 272))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 120))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 272)), pDest) *(*U16)(unsafe.Pointer(pDest + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46600,15 +46968,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46617,124 +46985,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 40 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 40 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5472, + Xsqlite3VdbeError(tls, p, ts+5486, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46744,40 +47112,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 40 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46795,339 +47163,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 40 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 40 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 16)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+280, pRec, uint32(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 280)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 280)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 280)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 40 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47136,20 +47504,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 288)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 288)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+288) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 288)) @@ -47160,244 +47528,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5513, 0) + Xsqlite3VdbeError(tls, p, ts+5527, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5564, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5578, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5586, 0) + ts+5600, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -47406,172 +47774,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5640, 0) + ts+5654, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5695 + return ts + 5709 } return func() uintptr { if iRollback != 0 { - return ts + 5743 + return ts + 5757 } - return ts + 5786 + return ts + 5800 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 296)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+296) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 152))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; 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(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5827) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5841) 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 __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47591,36 +47959,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47628,22 +47996,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 152))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47654,24 +48022,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*40 @@ -47679,30 +48047,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47718,10 +48086,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47730,10 +48098,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47753,83 +48121,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1547 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47838,31 +48206,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47870,10 +48238,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47894,105 +48262,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) eqOnly = 0 - (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+304) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+304) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), int64(U64(iKey)), 0, bp+304) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 312)).Fdefault_rc = func() int8 { @@ -48004,231 +48372,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+312, bp+304) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+312, bp+304) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+312)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 304)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 20 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*20 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 344)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 376)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+344, bp+376) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+344, bp+376) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 376)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 376)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 376)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 376)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+384)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 384)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), bp+384, pC7+28) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+384, pC9+28) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48238,85 +48608,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, pC7+28) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), pIdxKey, pC9+28) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+384)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -48324,59 +48694,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 416)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+416, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+416)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 416))) goto notExistsWithKey -__669: +__678: ; __104: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) notExistsWithKey: - pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 36)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 36)) *(*int32)(unsafe.Pointer(bp + 456)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+456) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 456)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 456)) if !(*(*int32)(unsafe.Pointer(bp + 456)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -48391,121 +48761,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 460)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+460) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), bp+460) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 460)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 464)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 464)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) + *(*I64)(unsafe.Pointer(bp + 464)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 464)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 464))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 464)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 464)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 464)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+464) *(*I64)(unsafe.Pointer(bp + 464)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 464))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 464)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 464)))), 0, bp+460)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 460)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 460)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 464)) goto __8 @@ -48513,93 +48883,93 @@ __689: __107: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 472)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 472)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 472)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 472)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 472)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+472, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 36)), bp+472, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48612,7 +48982,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey) -__706: +__715: ; goto __8 @@ -48627,81 +48997,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) - (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48711,38 +49081,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+512) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+512) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48750,205 +49120,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 36)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 36)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 520)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 520)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 36)))).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 + 36)), bp+520) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36)), bp+520) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 36))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 36)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) *(*int32)(unsafe.Pointer(bp + 528)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+528) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 528)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 36)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+532) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 532)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 532)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 532)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -48958,90 +49328,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) *(*int32)(unsafe.Pointer(bp + 536)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+536) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+536) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) if !(*(*int32)(unsafe.Pointer(bp + 536)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 164 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49050,36 +49420,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 544)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 544)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 544)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 544)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 36)), bp+544, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 36)), bp+544, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 @@ -49090,88 +49460,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) - (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 584)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+584, bp+616) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 616)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 624)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+624) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+624) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -49183,35 +49553,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 624)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -49220,63 +49590,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 672)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 672)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 36)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 36)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+632, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+632) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+632) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+632)).Fn, (*Mem)(unsafe.Pointer(bp+632)).Fz, bp+672, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+632) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49285,13 +49655,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 704)) = 0 @@ -49299,20 +49669,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 704))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 704)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 704))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -49322,45 +49692,45 @@ __136: 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+712) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 40)) += *(*I64)(unsafe.Pointer(bp + 712)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 712)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -49373,10 +49743,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+720, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 720))) goto __8 @@ -49387,10 +49757,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -49398,30 +49768,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5872 + goto __797 +__796: + zSchema = ts + 5886 (*InitData)(unsafe.Pointer(bp + 724)).Fdb = db (*InitData)(unsafe.Pointer(bp + 724)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 724)).FpzErrMsg = p + 124 (*InitData)(unsafe.Pointer(bp + 724)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 724)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5886, + ts+5900, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 724)).Frc = SQLITE_OK @@ -49431,36 +49801,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+724, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 724)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+724)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -49468,10 +49838,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -49503,22 +49873,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+752) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 752)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 752)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -49528,15 +49898,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -49546,17 +49916,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+760) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 760))) -__803: +__812: ; goto check_for_interrupt @@ -49566,34 +49936,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49602,48 +49972,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 120 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5929, 0) + Xsqlite3VdbeError(tls, p, ts+5943, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -49651,10 +50021,10 @@ __817: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49676,24 +50046,24 @@ __818: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem1 = pFrame2 + 88 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 40 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49725,78 +50095,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } *(*I64)(unsafe.Pointer(db + 536)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } *(*I64)(unsafe.Pointer(db + 528)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 64)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49804,11 +50174,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49824,14 +50194,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 768)) -__838: +__847: ; goto __8 @@ -49839,16 +50209,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49856,16 +50226,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49876,10 +50246,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -49902,73 +50272,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -49978,22 +50348,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50006,32 +50376,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+776+1*4, bp+776+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 776)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 776 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 40 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50043,70 +50413,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5966, + ts+5980, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6018 + return ts + 6032 } - return ts + 6023 + return ts + 6037 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50114,17 +50484,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50134,10 +50504,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50151,10 +50521,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50164,69 +50534,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+152, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 36))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 36))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 36))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6030, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6044, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -50234,16 +50604,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -50256,17 +50626,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+792) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+124) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+792) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -50276,24 +50646,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 832)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50301,52 +50671,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+832) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 832)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 832)) + *(*uintptr)(unsafe.Pointer(pCur3 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 832)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 832))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5336, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5350, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pArgc = pQuery + 1*40 - pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 36)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 36)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -50355,54 +50725,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+836, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) @@ -50410,69 +50780,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 836)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+836, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36)), bp+836, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+836)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 836)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule rc = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -50484,27 +50854,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 32)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -50512,42 +50882,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 872)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50556,41 +50926,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 872)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50604,16 +50974,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50625,25 +50995,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50652,24 +51022,24 @@ __924: })(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+28) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+228, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50694,16 +51064,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 164 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 164 + 7*4))++ -__932: +__941: ; goto __8 @@ -50718,66 +51088,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 164 + 6*4))++ @@ -50798,73 +51168,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6065, + Xsqlite3_log(tls, rc, ts+6079, libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 32)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 164 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50872,13 +51242,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5313, 0) + Xsqlite3VdbeError(tls, p, ts+5327, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1463, 0) + Xsqlite3VdbeError(tls, p, ts+1483, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -50889,10 +51259,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6097, ts + 6106, ts + 6113, - ts + 6119} +var azType = [4]uintptr{ts + 6111, ts + 6120, ts + 6127, + ts + 6133} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -50941,16 +51315,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6131, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6145, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6160 + return ts + 6174 } return func() uintptr { if type1 == U32(7) { - return ts + 6165 + return ts + 6179 } - return ts + 6170 + return ts + 6184 }() }())) rc = SQLITE_ERROR @@ -50970,10 +51344,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6178, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6192, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -50983,8 +51357,8 @@ 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 { - bp := tls.Alloc(324) - defer tls.Free(324) + bp := tls.Alloc(328) + defer tls.Free(328) var nAttempt int32 var iCol int32 @@ -51004,7 +51378,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51024,8 +51398,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51033,21 +51407,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6198, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6212, 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+6228, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6242, 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+6264, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6278, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51056,8 +51430,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51090,8 +51464,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6285, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6299, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51118,7 +51492,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+36+uintptr(j)*8)).FiFrom == iCol) { goto __22 } - zFault = ts + 6306 + zFault = ts + 6320 __22: ; goto __20 @@ -51151,7 +51525,7 @@ __26: 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 + 6318 + zFault = ts + 6332 __29: ; goto __27 @@ -51171,8 +51545,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6326, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6340, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51241,7 +51615,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+320) + rc = blobSeekToRow(tls, pBlob, iRow, bp+324) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51269,12 +51643,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 320)) != 0 { - return ts + 3642 + if *(*uintptr)(unsafe.Pointer(bp + 324)) != 0 { + return ts + 3656 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 320)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 324)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51318,7 +51692,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51401,7 +51775,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51414,7 +51788,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53852,11 +54226,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54016,7 +54386,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6360, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6374, zDb) == 0) { goto __8 } @@ -54137,7 +54507,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6365) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6379) != 0) { goto __33 } goto __14 @@ -54293,14 +54663,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6367, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6381, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6371, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6385, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -54317,7 +54687,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 8)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6375, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6389, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -54411,7 +54781,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 140)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54420,7 +54790,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 148)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54475,7 +54845,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6384, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6398, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -54483,14 +54853,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6415, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6429, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return WRC_Abort __87: ; @@ -54542,7 +54912,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6470, libc.VaList(bp+16, zCol)) + ts+6484, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+44, 0, uint32(unsafe.Sizeof(struct { FpTab uintptr @@ -54582,7 +54952,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6505 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6519 *(*uintptr)(unsafe.Pointer(pExpr + 20)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54595,23 +54965,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6514 + zErr = ts + 6528 } else { - zErr = ts + 6529 + zErr = ts + 6543 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6551, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54714,15 +55084,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6581 + var zIn uintptr = ts + 6595 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6609 + zIn = ts + 6623 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6627 + zIn = ts + 6641 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6645 + zIn = ts + 6659 } - Xsqlite3ErrorMsg(tls, pParse, ts+6663, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6677, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54801,10 +55171,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6683 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6697 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54851,7 +55221,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6694, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6708, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54915,7 +55285,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*20)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6711, libc.VaList(bp, pExpr)) + ts+6725, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54931,7 +55301,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6775, + Xsqlite3ErrorMsg(tls, pParse, ts+6789, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54945,7 +55315,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6811, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6825, uintptr(0), pExpr) } } else { @@ -54968,30 +55338,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6839, libc.VaList(bp+16, pExpr)) + ts+6853, 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 + 6882 + zType = ts + 6896 } else { - zType = ts + 6889 + zType = ts + 6903 } - Xsqlite3ErrorMsg(tls, pParse, ts+6899, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6913, 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+6927, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6941, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6949, + Xsqlite3ErrorMsg(tls, pParse, ts+6963, 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+6993, + ts+7007, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55063,7 +55433,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7041, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7055, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20))) } @@ -55079,7 +55449,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7052, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7066, pExpr, pExpr) } break @@ -55135,7 +55505,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55210,7 +55580,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7063, libc.VaList(bp, i, zType, mx)) + ts+7077, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55230,7 +55600,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7133, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55265,7 +55635,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7153, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7167, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55322,7 +55692,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 8 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7159, libc.VaList(bp, i+1)) + ts+7173, libc.VaList(bp, i+1)) return 1 } } @@ -55350,7 +55720,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7220, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7234, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55564,7 +55934,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7251, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7265, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55604,7 +55974,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7153) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55615,7 +55985,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7290) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7304) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55627,7 +55997,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7296, 0) + ts+7310, 0) return WRC_Abort } @@ -55727,12 +56097,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg @@ -55768,12 +56138,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*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)) @@ -55892,9 +56262,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) } if op == TK_COLUMN || op == TK_AGG_COLUMN { - if *(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0 { - return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) } if op == TK_SELECT { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList+8)).FpExpr) @@ -55982,14 +56350,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { - if *(*uintptr)(unsafe.Pointer(p + 44)) != uintptr(0) { - var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) - if j >= 0 { - var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) - pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) - } - break + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { + var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) + 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 @@ -56317,7 +56684,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return } @@ -56392,7 +56759,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7355, libc.VaList(bp, mxHeight)) + ts+7369, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -56560,12 +56927,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56636,12 +57008,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7403, + Xsqlite3ErrorMsg(tls, pParse, ts+7417, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7447 + return ts + 7461 } - return ts + 1527 + return ts + 1547 }(), nElem)) break } @@ -56680,7 +57052,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56706,7 +57078,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7451, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7465, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 20)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56734,7 +57106,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7485, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7499, libc.VaList(bp, pExpr)) } } } @@ -56781,7 +57153,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 120 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7505, + Xsqlite3ErrorMsg(tls, pParse, ts+7519, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56806,7 +57178,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 120 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7548, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7562, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56827,11 +57199,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56860,7 +57229,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -56956,7 +57329,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -57380,7 +57753,7 @@ __2: 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+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57503,7 +57876,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7601, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7615, libc.VaList(bp, zObject)) } } @@ -57513,10 +57886,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 20 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -57557,10 +57932,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6683) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6697) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6688) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6702) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -57991,13 +58366,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7624) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7652) == 0 { return 1 } return 0 @@ -58201,7 +58576,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7642, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7656, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58279,7 +58654,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { - goto __56 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - goto __60 -__59: - ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { - goto __61 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0) { - goto __63 - } aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) - goto __64 -__63: - aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) -__64: - ; if !(aff > SQLITE_AFF_BLOB) { - goto __65 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*16 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __70 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7889, + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, (*Expr)(unsafe.Pointer(pExpr)).Fop2) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { - goto __76 - } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) -__76: - ; return iReg -__6: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59673,7 +60087,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59687,10 +60101,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59703,8 +60117,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59712,12 +60126,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59743,10 +60157,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59757,14 +60169,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59794,27 +60208,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59823,9 +60237,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59833,15 +60247,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7942, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7956, libc.VaList(bp+8, pExpr)) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem __88: ; - goto __3 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59872,8 +60286,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7969, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7983, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -59995,8 +60409,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60017,9 +60431,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60032,13 +60446,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60049,11 +60463,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60075,12 +60489,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60095,14 +60509,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60110,9 +60548,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60122,15 +60560,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60140,22 +60578,22 @@ __125: pTest = bp + 100 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 100)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60164,51 +60602,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*20)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*20)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7993, 0) + ts+8007, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60217,18 +60655,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8043)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8057)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -60440,7 +60878,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60679,6 +61117,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60905,6 +61344,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61050,7 +61490,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61576,7 +62020,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) } - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+32)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+32)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+32)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61594,8 +62040,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*20)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61663,6 +62108,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 8)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61686,7 +62133,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61709,7 +62158,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61722,7 +62171,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61742,7 +62193,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61882,7 +62335,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } - return *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61890,7 +62343,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -61941,11 +62394,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 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+8059, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -61957,13 +62410,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8087, + ts+8101, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8262, + ts+8276, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -61973,10 +62426,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8436, libc.VaList(bp, zDb, zDb)) + ts+8450, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8583, 0) + ts+8597, 0) } } @@ -62040,7 +62493,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8734, libc.VaList(bp, zName)) + ts+8748, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62050,7 +62503,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8793, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8807, zName)) { goto __6 } goto exit_rename_table @@ -62059,7 +62512,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8813, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62100,19 +62553,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8826, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8840, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9010, + ts+9024, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9315, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9329, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9331, + ts+9345, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62120,7 +62573,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9389, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9403, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62132,7 +62585,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9654, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9668, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62144,7 +62597,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9667, + ts+9681, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62190,12 +62643,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9705, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9719, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9737, 0) + ts+9751, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62205,11 +62658,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 44 + 4)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9764) + ts+9778) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9823) + ts+9837) } if pDflt != 0 { @@ -62222,12 +62675,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9876) + ts+9890) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9922) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9936) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62238,7 +62691,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9949, + ts+9963, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 44)), zCol, *(*int32)(unsafe.Pointer(pNew + 44)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62260,7 +62713,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10095, + ts+10109, libc.VaList(bp+40, zTab, zDb)) } } @@ -62308,14 +62761,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10325, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10339, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10359, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10373, 0) goto exit_begin_add_column __4: ; @@ -62343,7 +62796,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nAlloc))) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10389, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10403, 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 } @@ -62383,18 +62836,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10408 + zType = ts + 10422 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10413 + zType = ts + 10427 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10427, + Xsqlite3ErrorMsg(tls, pParse, ts+10441, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10445 + return ts + 10459 } - return ts + 10462 + return ts + 10476 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62478,11 +62931,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -62495,17 +62948,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10501, + ts+10515, 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+10683, + ts+10697, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9654, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9668, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62700,7 +63153,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 268; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { + for pp = pParse + 272; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { @@ -62763,12 +63216,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10814, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10828, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -62808,8 +63261,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10839, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10853, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62826,7 +63279,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62848,7 +63301,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10847, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10861, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62888,12 +63341,12 @@ 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+10853, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10867, 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 + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63067,8 +63520,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr @@ -63151,15 +63604,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+20, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp + 20 - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + 20 + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63187,7 +63640,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63220,13 +63673,13 @@ __15: renameTokenFind(tls, bp+20, bp, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) __16: ; - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 20)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63239,7 +63692,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63254,7 +63707,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FaCol+uintptr(i)*16) - Xsqlite3WalkExpr(tls, bp+292, pExpr) + Xsqlite3WalkExpr(tls, bp+296, pExpr) goto __24 __24: i++ @@ -63310,8 +63763,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+20) @@ -63359,7 +63812,7 @@ __39: renameColumnIdlistNames(tls, bp+20, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) __35: ; __8: @@ -63379,7 +63832,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+20)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -63427,8 +63880,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(352) - defer tls.Free(352) + bp := tls.Alloc(356) + defer tls.Free(356) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63470,11 +63923,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 44)) - libc.Xmemset(tls, bp+320, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 320)).FpParse = bp + 48 + libc.Xmemset(tls, bp+324, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 324)).FpParse = bp + 48 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+320) + Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+324) if (*Parse)(unsafe.Pointer(bp+48)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 48)).Frc } else { @@ -63544,7 +63997,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*4))) } else if (*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0 { - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -63567,8 +64020,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63586,16 +64039,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + 272 + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp + 276 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63610,31 +64063,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+292, + Xsqlite3WalkExpr(tls, bp+296, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*16)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+272, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+276, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+272)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+276)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63652,8 +64105,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(304) - defer tls.Free(304) + bp := tls.Alloc(308) + defer tls.Free(308) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63679,9 +64132,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*U64)(unsafe.Pointer(db + 32)) |= 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 { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 272)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+272) + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 276)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+276) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63709,8 +64162,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(296) - defer tls.Free(296) + bp := tls.Alloc(300) + defer tls.Free(300) var db uintptr var iSchema int32 @@ -63747,7 +64200,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -63771,7 +64224,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10858, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10872, 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) @@ -63852,19 +64305,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pName)) goto exit_drop_column __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+10865, + Xsqlite3ErrorMsg(tls, pParse, ts+10879, 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 + 10893 + return ts + 10907 } - return ts + 6106 + return ts + 6120 }(), zCol)) goto exit_drop_column @@ -63873,7 +64326,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10905, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10919, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63887,13 +64340,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10953, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10967, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11074, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11088, 1) if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 @@ -64011,11 +64464,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11092}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11133}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11152}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11171}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11106}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11127}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11147}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11166}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11185}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64049,7 +64502,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11194, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11208, 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) } @@ -64058,10 +64511,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+11217, + ts+11231, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11247, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11261, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64079,9 +64532,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11265, FzCols: ts + 11278}, - {FzName: ts + 11291, FzCols: ts + 11304}, - {FzName: ts + 11332}, + {FzName: ts + 11279, FzCols: ts + 11292}, + {FzName: ts + 11305, FzCols: ts + 11318}, + {FzName: ts + 11346}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64273,7 +64726,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11345} + FzName: ts + 11359} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -64524,7 +64977,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11355} + FzName: ts + 11369} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(72) @@ -64538,7 +64991,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11365, + Xsqlite3_str_appendf(tls, bp+24, ts+11379, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -64551,7 +65004,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11370, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11384, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64593,7 +65046,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11376, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11390, 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)).FnChar-- @@ -64607,7 +65060,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11382} + FzName: ts + 11396} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64651,7 +65104,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11391, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11405, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64668,7 +65121,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+11265, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11279, 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, -6) @@ -64824,7 +65277,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64881,7 +65334,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+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64928,9 +65381,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+11405) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11419) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11409) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11423) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65013,7 +65466,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1527 + z = ts + 1547 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65035,15 +65488,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+11413, z) == 0 { + if Xsqlite3_strglob(tls, ts+11427, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11424, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11438, 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+11434, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11448, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -65319,11 +65772,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11291, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11305, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11446, - ts+11500, + ts+11460, + ts+11514, zDb) } return rc @@ -65370,10 +65823,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11265, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11279, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11552, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11566, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65431,7 +65884,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6360, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6374, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -65461,20 +65914,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1527 + zFile = ts + 1547 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1527 + zName = ts + 1547 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 172 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3814) + *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3828) if !(*(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0)) { goto __5 } @@ -65490,13 +65943,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11593, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11607, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 120 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11596, + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11610, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 7*4)))) goto attach_error __7: @@ -65510,7 +65963,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11633, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11647, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -65521,7 +65974,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+472) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+476) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Db{}))*uint32(3))) @@ -65574,7 +66027,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11663, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11677, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65591,7 +66044,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, - ts+11692, 0) + ts+11706, 0) rc = SQLITE_ERROR __23: ; @@ -65657,13 +66110,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1463, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11760, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11774, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65710,7 +66163,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1527 + zName = ts + 1547 __1: ; i = 0 @@ -65741,14 +66194,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11788, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11802, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11823, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65756,7 +66209,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11835, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11849, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65867,7 +66320,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11857} + FzName: ts + 11871} // Called by the parser to compile an ATTACH statement. // @@ -65880,7 +66333,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11871} + FzName: ts + 11885} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65894,7 +66347,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11885, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11899, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65926,7 +66379,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+11909, + ts+11923, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66101,7 +66554,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11955, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11969, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66127,11 +66580,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+11978, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11984, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11998, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11990, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12004, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66178,7 +66631,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName } else { - zCol = ts + 7632 + zCol = ts + 7646 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66202,7 +66655,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+12017, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12031, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66296,6 +66749,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66323,9 +66778,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -66344,62 +66798,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) - } - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*20 + 16)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) } + } - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) } - - Xsqlite3VdbeGoto(tls, v, 1) } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -66446,13 +66892,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+196)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+200)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+196)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+200)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66477,25 +66923,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6360) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6374) == 0 { i = 0 } else { return uintptr(0) } } 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+8051, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12065) + ts+12079) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, - ts+5872) + ts+5886) } } } @@ -66516,12 +66962,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5872) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5886) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12065) + ts+12079) } } } @@ -66550,9 +66996,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12084, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+404, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12098, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -66563,21 +67009,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12092 + zMsg = ts + 12106 } else { - zMsg = ts + 12105 + zMsg = ts + 12119 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66607,12 +67053,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { - return ts + 12051 + if Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { + return ts + 12065 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { - return ts + 12032 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12079+7) == 0 { + return ts + 12046 } } return zName @@ -66717,10 +67163,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+472 { - libc.Xmemcpy(tls, db+472, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+476 { + libc.Xmemcpy(tls, db+476, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 472 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 476 } } @@ -66876,11 +67322,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 8))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66897,7 +67343,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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+24, zName, uintptr(0)) @@ -66926,7 +67372,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -66970,7 +67416,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5872) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5886) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -66996,7 +67442,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6360, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6374, zName) { goto __3 } @@ -67049,13 +67495,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+12119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12133, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12136, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12150, libc.VaList(bp, pName1)) return -1 } } else { @@ -67093,13 +67539,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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*4))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*4))) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8051, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8065, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12156, + Xsqlite3ErrorMsg(tls, pParse, ts+12170, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67259,9 +67705,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67277,7 +67723,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12212, 0) return __4: ; @@ -67305,9 +67751,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), zName) != 0) { goto __8 } @@ -67323,9 +67769,9 @@ __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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67356,12 +67802,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12239, + Xsqlite3ErrorMsg(tls, pParse, ts+12253, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67376,7 +67822,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12274, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67411,8 +67857,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - reg1 = libc.AssignPtrInt32(pParse+88, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) - reg2 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg1 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+96, 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) @@ -67433,7 +67879,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 132)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 136)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -67463,7 +67909,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12295, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12309, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67487,7 +67933,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12326, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67496,7 +67942,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 132)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 136)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -67507,7 +67953,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12295 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12309 (*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) @@ -67519,7 +67965,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12295, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12309, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -67553,7 +67999,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -67561,13 +68007,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12369, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12383, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).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+12376, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12390, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).Fn-- @@ -67604,7 +68050,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+12386, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67768,10 +68214,10 @@ 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+12412, + Xsqlite3ErrorMsg(tls, pParse, ts+12426, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12471, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Expr{}))) @@ -67802,7 +68248,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12498, 0) + ts+12512, 0) } } @@ -67847,7 +68293,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12550, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12564, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67936,7 +68382,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12591, 0) + ts+12605, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -67962,7 +68408,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*16)).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+72, 1) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+76, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68031,7 +68477,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12647, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12661, 0) goto generated_done __2: ; @@ -68044,13 +68490,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12690, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12704, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12698, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12712, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68083,7 +68529,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12705, + Xsqlite3ErrorMsg(tls, pParse, ts+12719, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68204,13 +68650,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1527 - zSep2 = ts + 12736 - zEnd = ts + 4936 + zSep = ts + 1547 + zSep2 = ts + 12750 + zEnd = ts + 4950 } else { - zSep = ts + 12738 - zSep2 = ts + 12742 - zEnd = ts + 12747 + zSep = ts + 12752 + zSep2 = ts + 12756 + zEnd = ts + 12761 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68218,7 +68664,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12750, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12764, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = uint8('(') @@ -68252,16 +68698,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3642, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3656, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1527, - ts + 12764, - ts + 12770, - ts + 12775, - ts + 12780, + ts + 1547, + ts + 12778, + ts + 12784, + ts + 12789, + ts + 12794, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -68400,8 +68846,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 132)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 132)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 136)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 136)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -68528,7 +68974,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+400, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+404, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return 0 } @@ -68552,7 +68998,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+400, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+404, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return } @@ -68651,7 +69097,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -68668,10 +69114,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+12786, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) + ts+12800, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12819, + Xsqlite3ErrorMsg(tls, pParse, ts+12833, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68690,11 +69136,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+12846, 0) + ts+12860, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12896, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12910, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68728,7 +69174,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12928, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12942, 0) return } } @@ -68753,11 +69199,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8793 - zType2 = ts + 12972 + zType = ts + 8807 + zType2 = ts + 12986 } else { - zType = ts + 10408 - zType2 = ts + 12978 + zType = ts + 10422 + zType2 = ts + 12992 } if pSelect != 0 { @@ -68819,7 +69265,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 196 + pEnd2 = pParse + 200 } else { pEnd2 = pEnd } @@ -68828,11 +69274,11 @@ 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+12983, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12997, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12998, + ts+13012, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68848,13 +69294,13 @@ 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+13096, + ts+13110, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13138, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13152, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68869,7 +69315,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9315) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9329) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68899,7 +69345,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+13172, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13186, 0) goto create_view_fail __1: ; @@ -68915,7 +69361,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10408, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10422, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+4, pSelect) != 0) { goto __3 } @@ -68978,10 +69424,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -68999,12 +69442,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13208, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69064,6 +69503,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69123,13 +69569,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13238, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13252, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13253, + ts+13267, 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) } @@ -69170,10 +69616,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13320, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13334, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11217, + ts+11231, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69205,12 +69651,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13334, + ts+13348, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13379, + ts+13393, 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) @@ -69238,11 +69684,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3265, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7052, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7066, 10) == 0 { return 0 } return 1 @@ -69320,9 +69766,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zArg2 = uintptr(0) @@ -69381,21 +69827,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13446, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13460, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13474, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13488, 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+13508, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13522, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69407,7 +69853,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11409, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11423, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69471,7 +69917,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13540, + ts+13554, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -69483,7 +69929,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13603, 0) + ts+13617, 0) goto fk_end goto __7 __6: @@ -69568,7 +70014,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13697, + ts+13711, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -69795,12 +70241,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 8 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13743, + Xsqlite3ErrorMsg(tls, pParse, ts+13757, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13771 + return ts + 13785 } - return ts + 13777 + return ts + 13791 }())) return 1 } @@ -69921,7 +70367,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13782, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13796, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -69940,7 +70386,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13788, + ts+13802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -69966,26 +70412,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13838, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13852, 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+13866, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13880, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13891, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13905, 0) goto exit_create_index __17: ; @@ -69999,7 +70445,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13782, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13796, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70011,10 +70457,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13925, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13939, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70026,7 +70472,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13959, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13973, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70055,7 +70501,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13983, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13997, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70076,9 +70522,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70117,7 +70563,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13782) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13796) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70218,7 +70664,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14006, 0) + ts+14020, 0) goto exit_create_index __56: ; @@ -70232,6 +70678,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -70252,6 +70699,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) __61: ; __59: @@ -70433,7 +70881,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14067, libc.VaList(bp+48, 0)) + ts+14081, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70485,8 +70933,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14109, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14123, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -70532,12 +70980,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14126, + zStmt = Xsqlite3MPrintf(tls, db, ts+14140, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1527 + return ts + 1547 } - return ts + 14146 + return ts + 14160 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70545,7 +70993,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14154, + ts+14168, 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, @@ -70559,7 +71007,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14213, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14227, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70720,7 +71168,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14240, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14254, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70735,7 +71183,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14258, libc.VaList(bp+8, 0)) + ts+14272, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70746,9 +71194,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70774,9 +71222,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14331, + ts+14345, 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+11405, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11419, (*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) @@ -70857,6 +71305,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70864,7 +71313,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*8)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70910,7 +71359,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+14391, + Xsqlite3ErrorMsg(tls, pParse, ts+14405, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71045,6 +71494,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71056,11 +71506,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 36 + 4))&0x2>>1)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 64))) @@ -71087,7 +71539,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71115,12 +71567,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14427, + Xsqlite3ErrorMsg(tls, pParse, ts+14441, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14463 + return ts + 14477 } - return ts + 14466 + return ts + 14480 }())) goto append_from_error __1: @@ -71289,7 +71741,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14472, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14486, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71325,9 +71777,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14478 + return ts + 14492 } - return ts + 14487 + return ts + 14501 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71352,7 +71804,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14472, ts + 14494, ts + 14478} +var az = [3]uintptr{ts + 14486, ts + 14508, ts + 14492} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71367,7 +71819,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14502, 0) + ts+14516, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71385,7 +71837,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11992, 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+14586, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14600, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71671,7 +72123,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14595, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71767,7 +72219,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+14641, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, zName)) } } } @@ -71867,7 +72319,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+444, zName) + pColl = Xsqlite3HashFind(tls, db+448, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71881,7 +72333,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*20)).FzName = pColl + 3*20 (*CollSeq)(unsafe.Pointer(pColl + 2*20)).Fenc = U8(SQLITE_UTF16BE) libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint32(nName)) - pDel = Xsqlite3HashInsert(tls, db+444, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+448, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -71960,7 +72412,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14671, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14685, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72087,7 +72539,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+428, zName) + p = Xsqlite3HashFind(tls, db+432, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72121,7 +72573,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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+428, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) + pOther = Xsqlite3HashInsert(tls, db+432, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72144,26 +72596,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(600) + defer tls.Free(600) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 16)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 584)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 568)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash Xsqlite3HashInit(tls, pSchema+40) Xsqlite3HashClear(tls, pSchema+24) - for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { - Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) + for pElem = (*Hash)(unsafe.Pointer(bp + 568)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+568) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 16)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 584)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+16) + Xsqlite3HashClear(tls, bp+584) Xsqlite3HashClear(tls, pSchema+56) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -72229,10 +72682,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14716, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -72245,19 +72714,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14702, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14749, 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+14731, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14778, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -72484,17 +72955,19 @@ __18: goto __20 } - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } - Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -72507,10 +72980,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+8)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -72519,15 +72992,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -72536,98 +73009,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+40) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.Xmemset(tls, aToOpen, 1, uint32(nIdx+1)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 40)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72635,138 +73108,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+48, bp+52) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 48))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 48)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 48)), *(*int32)(unsafe.Pointer(bp + 52)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 40 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14816) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72869,7 +73347,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+11265) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11279) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73099,7 +73577,7 @@ 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 + 6170, ts + 6165, ts + 7924, ts + 7919, ts + 6160} +var azType2 = [5]uintptr{ts + 6184, ts + 6179, ts + 7938, ts + 7933, ts + 6174} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73158,7 +73636,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) return } iVal = -iVal @@ -73462,7 +73940,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14799, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14846, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73652,7 +74130,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73765,13 +74243,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73794,7 +74286,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 120 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14804, -1) + Xsqlite3_result_error(tls, context, ts+14851, -1) return } if argc == 3 { @@ -73804,7 +74296,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14837, -1) + ts+14884, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73857,7 +74349,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73897,13 +74389,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4904, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4918, 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+14882, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14929, libc.VaList(bp+8, r1)) } } break @@ -73911,7 +74403,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1307, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1327, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -73940,13 +74432,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14889, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1528, 4) + Xsqlite3_str_append(tls, pStr, ts+1548, 4) break } @@ -74256,7 +74748,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10837} +var azOne = [1]uintptr{ts + 10851} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74268,7 +74760,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1527 + zIn = ts + 1547 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -74292,7 +74784,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14892, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14939, 4, uintptr(0)) } } @@ -74317,7 +74809,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12017, -1) + Xsqlite3_result_error(tls, context, ts+12031, -1) return } @@ -74395,7 +74887,7 @@ func sumFinalize(tls *libc.TLS, context 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+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74657,7 +75149,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14897, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14944, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74677,14 +75169,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14903, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14903, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74924,107 +75416,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14908}, - {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 + 14928}, - {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 + 14941}, - {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 + 14959}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14968}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14991}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15017}, - {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 + 15042}, - {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 + 15051}, - {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 + 15062}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15095}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15095}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15100}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15100}, - {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 + 15100}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15104}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15104}, - {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 + 15104}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15108}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15136}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15179}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15185}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15189}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15236}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15253}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15296}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15310}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {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 + 15344}, - {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 + 15348}, - {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 + 15354}, - {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 + 15358}, - {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 + 15358}, - {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 + 15364}, - {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 + 15364}, - {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 + 15377}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15387}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, - {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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15407}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15429}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(2), 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 + 15443}, + {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 + 14955}, + {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 + 14975}, + {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 + 14988}, + {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 + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15015}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15038}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15064}, + {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 + 15089}, + {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 + 15098}, + {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 + 15109}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15130}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15130}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15136}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15136}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15142}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15142}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15147}, + {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 + 15147}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15151}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15151}, + {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 + 15151}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15155}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15170}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15183}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(1), 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 + 15205}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, + {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 + 15220}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15226}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15236}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15243}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15283}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15300}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15311}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15335}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15343}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15357}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {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 + 15391}, + {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 + 15395}, + {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 + 15401}, + {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 + 15405}, + {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 + 15405}, + {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 + 15411}, + {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 + 15411}, + {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 + 15424}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {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 + 15442}, {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(2), 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 + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15457}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15457}, {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 + 15476}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15481}, - {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}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15503}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15509}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, - {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 + 15533}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6505}, - {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 + 15538}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(2), 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 + 15490}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15495}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15511}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15515}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15523}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15528}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15533}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15544}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15550}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15556}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15561}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15569}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15580}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6519}, + {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 + 15585}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75145,7 +75637,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+15542, + ts+15589, 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) @@ -75805,8 +76297,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6371, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6367, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6385, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6381, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75885,7 +76377,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 40)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName (*Token)(unsafe.Pointer(bp + 40)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+40)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5115) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5129) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -75987,7 +76479,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 44 + 4)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76095,6 +76587,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).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) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76135,13 +76648,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76153,21 +76665,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { - *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).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 } @@ -76238,7 +76740,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -76296,7 +76798,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7889, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76599,6 +77101,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76762,7 +77266,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15587, + ts+15634, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -76787,7 +77291,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15628, + Xsqlite3ErrorMsg(tls, pParse, ts+15675, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76936,7 +77440,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15660, + ts+15707, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -76946,7 +77450,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15712, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15759, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -76998,7 +77502,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15737, + Xsqlite3ErrorMsg(tls, pParse, ts+15784, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77006,7 +77510,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15830, 0) goto insert_cleanup __57: ; @@ -77188,7 +77692,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*20)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*20)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77203,137 +77720,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*20)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { - goto __107 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -77345,64 +77862,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 144)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+144, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 144)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15804) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15851) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -77410,7 +77931,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77712,7 +78237,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11992, 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) @@ -78802,13 +79327,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1527 + zSql = ts + 1547 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -79247,6 +79772,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79285,7 +79811,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12017, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12031, 0) __3: ; return SQLITE_ERROR @@ -79294,7 +79820,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15818 + zEntry = ts + 15865 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79309,7 +79835,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11978, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79345,7 +79871,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15841, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15888, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79359,7 +79885,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15850, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15897, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79383,7 +79909,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15854, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15901, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79401,7 +79927,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15860, libc.VaList(bp+16, zEntry, zFile)) + ts+15907, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -79428,7 +79954,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15903, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15950, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -79466,7 +79992,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15935, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15982, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -79476,7 +80002,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15972, + ts + 16019, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79631,7 +80157,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15975, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16022, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79639,63 +80165,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5036, - ts + 16014, - ts + 8793, - ts + 16018, - ts + 16023, - ts + 16026, - ts + 16036, - ts + 16046, - ts + 16052, - ts + 16056, + ts + 5050, ts + 16061, - ts + 16066, - ts + 16074, - ts + 16085, - ts + 16088, - ts + 16095, - ts + 16056, - ts + 16061, - ts + 16102, - ts + 16107, - ts + 16110, - ts + 16117, - ts + 16052, - ts + 16056, - ts + 16123, - ts + 16128, - ts + 16133, - ts + 16056, - ts + 16137, - ts + 16061, - ts + 16145, + ts + 8807, + ts + 16065, + ts + 16070, + ts + 16073, + ts + 16083, + ts + 16093, + ts + 16099, + ts + 16103, + ts + 16108, + ts + 16113, + ts + 16121, + ts + 16132, + ts + 16135, + ts + 16142, + ts + 16103, + ts + 16108, ts + 16149, ts + 16154, - ts + 11409, - ts + 11405, - ts + 16160, - ts + 16165, + ts + 16157, + ts + 16164, + ts + 16099, + ts + 16103, ts + 16170, - ts + 16014, - ts + 16056, ts + 16175, - ts + 16182, - ts + 16189, - ts + 8793, - ts + 16197, - ts + 5039, - ts + 16203, - ts + 16014, - ts + 16056, - ts + 16208, - ts + 16213, - ts + 15410, - ts + 16218, - ts + 16231, - ts + 16240, - ts + 16247, - ts + 16258, + ts + 16180, + ts + 16103, + ts + 16184, + ts + 16108, + ts + 16192, + ts + 16196, + ts + 16201, + ts + 11423, + ts + 11419, + ts + 16207, + ts + 16212, + ts + 16217, + ts + 16061, + ts + 16103, + ts + 16222, + ts + 16229, + ts + 16236, + ts + 8807, + ts + 16244, + ts + 5053, + ts + 16250, + ts + 16061, + ts + 16103, + ts + 16255, + ts + 16260, + ts + 15457, + ts + 16265, + ts + 16278, + ts + 16287, + ts + 16294, + ts + 16305, } // Definitions of all built-in pragmas @@ -79712,238 +80238,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16266, + {FzName: ts + 16313, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16281, + {FzName: ts + 16328, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16296, + {FzName: ts + 16343, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16308, + {FzName: ts + 16355, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16324, + {FzName: ts + 16371, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16247, + {FzName: ts + 16294, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16337, + {FzName: ts + 16384, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16349, + {FzName: ts + 16396, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16369, + {FzName: ts + 16416, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16385, + {FzName: ts + 16432, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16406, + {FzName: ts + 16453, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16421, + {FzName: ts + 16468, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16437, + {FzName: ts + 16484, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16451, + {FzName: ts + 16498, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16464, + {FzName: ts + 16511, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16478, + {FzName: ts + 16525, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16497, + {FzName: ts + 16544, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16516, + {FzName: ts + 16563, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16539, + {FzName: ts + 16586, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16548, + {FzName: ts + 16595, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16566, + {FzName: ts + 16613, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16583, + {FzName: ts + 16630, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16596, + {FzName: ts + 16643, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16611, + {FzName: ts + 16658, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16629, + {FzName: ts + 16676, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16639, + {FzName: ts + 16686, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16653, + {FzName: ts + 16700, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16669, + {FzName: ts + 16716, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16694, + {FzName: ts + 16741, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16713, + {FzName: ts + 16760, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16724, + {FzName: ts + 16771, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16735, + {FzName: ts + 16782, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16747, + {FzName: ts + 16794, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16763, + {FzName: ts + 16810, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16776, + {FzName: ts + 16823, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16795, + {FzName: ts + 16842, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16814, + {FzName: ts + 16861, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16827, + {FzName: ts + 16874, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16842, + {FzName: ts + 16889, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16852, + {FzName: ts + 16899, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16873, + {FzName: ts + 16920, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16884, + {FzName: ts + 16931, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16894, + {FzName: ts + 16941, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16906, + {FzName: ts + 16953, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16917, + {FzName: ts + 16964, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16929, + {FzName: ts + 16976, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16946, + {FzName: ts + 16993, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16965, + {FzName: ts + 17012, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16991, + {FzName: ts + 17038, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17006, + {FzName: ts + 17053, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17020, + {FzName: ts + 17067, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17039, + {FzName: ts + 17086, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17053, + {FzName: ts + 17100, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17069, + {FzName: ts + 17116, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17081, + {FzName: ts + 17128, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17092, + {FzName: ts + 17139, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17103, + {FzName: ts + 17150, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17115, + {FzName: ts + 17162, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17126, + {FzName: ts + 17173, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17147, + {FzName: ts + 17194, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17155, + {FzName: ts + 17202, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17170, + {FzName: ts + 17217, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17183, + {FzName: ts + 17230, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17202, + {FzName: ts + 17249, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17217, + {FzName: ts + 17264, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -79965,7 +80491,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17233)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17280)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -79977,10 +80503,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17258) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17305) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17268) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17315) { return PAGER_LOCKINGMODE_NORMAL } } @@ -79989,13 +80515,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7937) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7951) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17280) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17327) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80010,9 +80536,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16208) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16255) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17292) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17339) == 0 { return 2 } else { return 0 @@ -80026,7 +80552,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17299, 0) + ts+17346, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -80117,19 +80643,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17361 + zName = ts + 17408 break case OE_SetDflt: - zName = ts + 17370 + zName = ts + 17417 break case OE_Cascade: - zName = ts + 17382 + zName = ts + 17429 break case OE_Restrict: - zName = ts + 17390 + zName = ts + 17437 break default: - zName = ts + 17399 + zName = ts + 17446 break } return zName @@ -80146,7 +80672,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17409, ts + 17416, ts + 17424, ts + 17428, ts + 17292, ts + 17437, + ts + 17456, ts + 17463, ts + 17471, ts + 17475, ts + 17339, ts + 17484, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80193,13 +80719,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17441 + zType = ts + 17488 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17443 + zType = ts + 17490 } else { - zType = ts + 7447 + zType = ts + 7461 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17445, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17492, 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), @@ -80207,7 +80733,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17452, ts + 17457, ts + 17465} +var azEnc = [4]uintptr{uintptr(0), ts + 17499, ts + 17504, ts + 17512} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80232,8 +80758,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(576) - defer tls.Free(576) + bp := tls.Alloc(616) + defer tls.Free(616) var zLeft uintptr var zRight uintptr @@ -80340,13 +80866,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -80366,6 +80901,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -80416,7 +80953,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -80431,7 +80968,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -80441,7 +80978,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17473, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17520, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -80458,30 +80995,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 444)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 444 + 1*4)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 444 + 2*4)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 444 + 3*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484 + 1*4)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 484 + 2*4)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 484 + 3*4)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+444) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+484) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 444)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 444))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 484)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 484))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 444)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 484)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 444)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 484)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80702,7 +81239,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17477) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17524) == 0) { goto __64 } b = 2 @@ -80736,7 +81273,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -80745,36 +81282,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+464) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+504) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 464)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 504)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 464)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 504)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 464)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 504)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17268 + zRet = ts + 17315 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80812,7 +81349,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17258 + zRet = ts + 17305 __83: ; returnSingleText(tls, v, zRet) @@ -80893,21 +81430,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 472)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 512)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+472) - if !(*(*I64)(unsafe.Pointer(bp + 472)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+512) + if !(*(*I64)(unsafe.Pointer(bp + 512)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 472)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 512)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 472)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 472))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 472))) + *(*I64)(unsafe.Pointer(bp + 512)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 512))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 512))) goto __15 __23: @@ -80949,15 +81486,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 480)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+480) != 0) || *(*int32)(unsafe.Pointer(bp + 480)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 520)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+520) != 0) || *(*int32)(unsafe.Pointer(bp + 520)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 480)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 520)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 480)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 520)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -80994,14 +81531,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 484)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+484) != 0) { + *(*int32)(unsafe.Pointer(bp + 524)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+524) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 484))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 524))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 484)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 524)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 32)) |= uint64(SQLITE_CacheSpill) @@ -81020,17 +81557,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81041,7 +81578,7 @@ __114: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).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)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 488))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 528))) __117: ; goto __115 @@ -81053,12 +81590,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+488) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+528) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 488))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 528))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81095,11 +81632,11 @@ __123: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+496) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 496)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+536) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 536)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17482, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17529, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81118,7 +81655,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81140,7 +81677,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17507, 0) + ts+17554, 0) goto __133 __132: if !(iDb != 1) { @@ -81194,7 +81731,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17560) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17607) == 0) { goto __142 } @@ -81291,13 +81828,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17566 + return ts + 17613 } - return ts + 17574 + return ts + 17621 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1527), + Xsqlite3ColumnType(tls, pCol, ts+1547), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 { return 1 @@ -81362,20 +81899,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17581, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17628, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 500)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+500, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 500))) + *(*uintptr)(unsafe.Pointer(bp + 540)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+540, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 540))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -81408,29 +81945,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10408 + zType = ts + 10422 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12690 + zType = ts + 12704 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17597 + zType = ts + 17644 goto __183 __182: - zType = ts + 8793 + zType = ts + 8807 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17651, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -81496,7 +82033,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -81506,7 +82043,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17616, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17663, 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)))) @@ -81543,12 +82080,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 504)) = [3]uintptr{ts + 17621, ts + 17623, ts + 16085} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17625, + *(*[3]uintptr)(unsafe.Pointer(bp + 544)) = [3]uintptr{ts + 17668, ts + 17670, ts + 16132} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17672, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 504 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), + *(*uintptr)(unsafe.Pointer(bp + 544 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -81577,7 +82114,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17631, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17678, 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))) @@ -81593,13 +82130,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 444)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 448)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17635, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17682, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81638,7 +82175,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 428)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 432)).Ffirst __212: if !(j != 0) { goto __214 @@ -81657,13 +82194,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 400)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 404)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81679,7 +82216,7 @@ __218: if !(i6 < int32(uint32(unsafe.Sizeof(aPragmaName))/uint32(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -81714,7 +82251,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81722,7 +82259,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17647)) + ts+17694)) goto __227 __227: j2++ @@ -81795,20 +82332,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 516)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 556)) = 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+516, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+556, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 516)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 556)) == 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 + 516)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 516))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 556)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 556))) __242: ; goto __240 @@ -81846,12 +82383,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 516)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 556)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+516, bp+520) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+556, bp+560) __248: ; @@ -81868,8 +82405,8 @@ __250: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __252 } - if *(*uintptr)(unsafe.Pointer(bp + 520)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 520)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 560)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 36 + uintptr(j3)*8)).FiFrom } @@ -81882,11 +82419,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 516)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 556)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 516))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 556))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -81911,10 +82448,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17652, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17699, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))) goto __246 __246: i8++ @@ -81952,17 +82489,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 524)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 564)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+524) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+564) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 524)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 564)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 524)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 564)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -81978,7 +82515,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 524))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 564))-1, 1) i9 = 0 __264: @@ -82128,7 +82665,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+17656, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17703, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82155,178 +82692,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+528, bp+532) + 1, uintptr(0), bp+568, bp+572) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 528)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 568)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 528)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17727, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 568)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*16 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 528)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 576)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+576) + if !(*(*uintptr)(unsafe.Pointer(bp + 576)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 576))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 576))) +__318: + ; +__317: ; + p11 = *(*int32)(unsafe.Pointer(bp + 568)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17763, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17783, + libc.VaList(bp+392, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17805, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17828, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17830, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 528)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 568)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*20)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17722, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17850, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 528)), 0, 0, bp+536, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 568)), 0, 0, bp+580, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 532))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 572))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17752) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17880) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17757) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17885) 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) @@ -82334,87 +83000,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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)*16 + 4))&0xf>>0)) != 0) { - goto __323 + goto __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 532))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 532))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 572))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17778) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17906) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 536))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 528)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17805) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17933) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 532))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 572))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -82432,14 +83104,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(endCode))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 524)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 564)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17834 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17962 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -82447,27 +83119,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -82476,25 +83148,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 8 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17837, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17965, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -82502,50 +83174,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(setCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp2 = iCookie (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp5 = U16(1) - goto __340 -__339: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(readCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) -__340: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -82560,31 +83239,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17275) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17322) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17862) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17990) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17428) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17475) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -82594,10 +83273,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -82617,19 +83296,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82638,86 +83317,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__359: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 56))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17870, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17998, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82725,60 +83404,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+544) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+552) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { + goto __395 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)))) { - goto __373 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 552))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+560) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 560)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 560))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+568) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 568)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 568)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82786,10 +83465,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82822,6 +83501,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82833,14 +83520,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17888, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17893, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17899, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17908, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17917, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17925, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17933}, - {FzName: ts + 17940}, + {FzName: ts + 18016, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18021, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18045, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18053, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18061}, + {FzName: ts + 18068}, {}, } var setCookie = [2]VdbeOpList{ @@ -82892,7 +83579,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+17946) + Xsqlite3_str_appendall(tls, bp+32, ts+18074) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82900,7 +83587,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17961, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18089, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -82913,19 +83600,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, 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+17974) + Xsqlite3_str_appendall(tls, bp+32, ts+18102) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17986) + Xsqlite3_str_appendall(tls, bp+32, ts+18114) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4936, 1) + Xsqlite3_str_append(tls, bp+32, ts+4950, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+56) @@ -82941,7 +83628,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83089,7 +83776,7 @@ __1: var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) == uintptr(0) { return SQLITE_NOMEM } @@ -83105,13 +83792,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+18001) + Xsqlite3_str_appendall(tls, bp+32, ts+18129) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18009, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18137, 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+18013, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18141, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83120,7 +83807,7 @@ __3: rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+4, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83188,33 +83875,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18017, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+18145, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*4)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*4)) } else { - zObj = ts + 4987 + zObj = ts + 5001 } - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18173, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18076, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18204, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18084, - ts + 18091, - ts + 18103, + ts + 18212, + ts + 18219, + ts + 18231, } // Check to see if any sibling index (another index on the same table) @@ -83274,7 +83961,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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } libc.SetBitFieldPtr8Uint32(db+172+8, uint32(0), 0, 0x1) @@ -83306,13 +83993,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+18114) + corruptSchema(tls, pData, argv, ts+18242) } 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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } } @@ -83345,16 +84032,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8793 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8807 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7857 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18127 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7871 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18255 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40)).FiDb = iDb @@ -83439,7 +84126,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11692) + ts+11706) rc = SQLITE_ERROR goto initone_error_out __13: @@ -83474,7 +84161,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+18199) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18327) rc = SQLITE_ERROR goto initone_error_out __17: @@ -83488,7 +84175,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18223, + ts+18351, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83671,16 +84358,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83748,20 +84439,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var rc int32 var i int32 @@ -83773,8 +84464,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83783,7 +84474,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1463, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1483, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -83794,7 +84485,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83814,7 +84505,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18257, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18385, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83830,100 +84521,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 120 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18287, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18415, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr((int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) - goto __13 -__12: - (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3642, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3656, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83936,7 +84631,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84035,7 +84730,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84178,7 +84873,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -84353,8 +85048,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10837 - var zSp2 uintptr = ts + 10837 + var zSp1 uintptr = ts + 10851 + var zSp2 uintptr = ts + 10851 if pB == uintptr(0) { zSp1++ } @@ -84362,13 +85057,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18306, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18434, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18336)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18464)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -84543,7 +85238,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 48)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18370, libc.VaList(bp, 0)) + ts+18498, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -84588,7 +85283,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18420, libc.VaList(bp+8, zName)) + ts+18548, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -84599,7 +85294,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*72 + 36 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*72 + 48)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18484, + Xsqlite3ErrorMsg(tls, pParse, ts+18612, libc.VaList(bp+16, zName)) break } @@ -84643,7 +85338,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6505, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6519, Fn: uint32(8)} // 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. @@ -84990,6 +85685,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85165,7 +85863,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -85227,16 +85925,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18521 + z = ts + 18649 break case TK_INTERSECT: - z = ts + 18531 + z = ts + 18659 break case TK_EXCEPT: - z = ts + 18541 + z = ts + 18669 break default: - z = ts + 18548 + z = ts + 18676 break } return z @@ -85246,7 +85944,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18554, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18682, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -85452,8 +86150,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1092 - *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16197 + zType = ts + 1112 + *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16244 } else { *(*uintptr)(unsafe.Pointer(bp + 40)) = (*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)) @@ -85592,13 +86290,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16197 + zCol = ts + 16244 } 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+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11992, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85606,7 +86304,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+18577, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85696,7 +86394,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16197 + zName = ts + 16244 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85706,7 +86404,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18577, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 48)) = U32(0) @@ -85722,7 +86420,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18586, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18714, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -86009,7 +86707,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18594, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18722, 0) return __1: ; @@ -86100,7 +86798,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18643, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18771, 0) goto end_of_recursive_query __15: ; @@ -86120,7 +86818,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18685, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86157,7 +86855,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18691, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18819, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86191,11 +86889,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+18706, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18834, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1527 + return ts + 1547 } - return ts + 18729 + return ts + 18857 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86296,8 +86994,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18731, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18746, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18859, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18874, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -86344,7 +87042,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18521, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18649, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -86411,7 +87109,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -86473,7 +87171,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -86626,10 +87324,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18786, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18914, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18832, + ts+18960, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86883,8 +87581,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7153) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7153) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7167) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86911,13 +87609,13 @@ 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+18914, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19042, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18925, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19053, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86929,7 +87627,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+18930, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19058, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87030,7 +87728,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87055,6 +87753,7 @@ type SubstContext1 = struct { FiNewTable int32 FisOuterJoin int32 FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87071,7 +87770,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87108,7 +87807,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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)*20)).FpExpr + var iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*20)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87119,6 +87819,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87143,15 +87844,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1072 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*20)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1092 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -87328,9 +88034,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(52) + defer tls.Free(52) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -87399,7 +88112,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -87415,17 +88127,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*72)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 48)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -87446,7 +88149,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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)*20 + 16))) == 0 { return 0 @@ -87458,6 +88160,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*20)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*20)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87613,6 +88326,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87636,8 +88350,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+20, pParse) - Xsqlite3WalkSelect(tls, bp+20, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+24, pParse) + Xsqlite3WalkSelect(tls, bp+24, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87813,8 +88527,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(24) + defer tls.Free(24) var pNew uintptr var nChng int32 = 0 @@ -87831,6 +88545,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87860,6 +88579,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87893,12 +88613,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15100) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15147) == 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+15104) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15151) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -87964,7 +88684,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+18936, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19064, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88047,7 +88767,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18954, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19082, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88176,7 +88896,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+18977, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19105, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 8, 0x100) @@ -88202,7 +88922,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18997, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19125, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88218,7 +88938,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19040 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19168 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -88244,7 +88964,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+19063, + Xsqlite3ErrorMsg(tls, pParse, ts+19191, 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 @@ -88255,9 +88975,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 + 19101 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19229 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19135 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19263 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88284,9 +89004,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -88304,7 +89024,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+19173, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19301, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -88416,7 +89136,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19177, + Xsqlite3ErrorMsg(tls, pParse, ts+19305, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -88435,7 +89155,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+19216, + Xsqlite3ErrorMsg(tls, pParse, ts+19344, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -88443,7 +89163,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x80>>7)) != 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+19247, + Xsqlite3ErrorMsg(tls, pParse, ts+14716, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -88544,7 +89264,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName } else { - zSchemaName = ts + 6365 + zSchemaName = ts + 6379 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -88559,7 +89279,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*20 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19280, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19375, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 7, 0x80) } @@ -88624,7 +89344,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19285, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19380, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88636,7 +89356,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88655,9 +89375,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19294, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19389, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19407, 0) } } } @@ -88667,7 +89387,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+19332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19427, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88817,13 +89537,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19363, 0) + ts+19458, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19414, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19509, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89004,19 +89724,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19447, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19542, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19459 + return ts + 19554 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1527 + return ts + 1547 }())) } } @@ -89029,7 +89749,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7857) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89187,7 +89907,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -89286,7 +90005,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19482, + ts+19577, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -89347,7 +90066,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19536, + Xsqlite3ErrorMsg(tls, pParse, ts+19631, 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 __15: @@ -89451,7 +90170,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1527, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1547, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -89461,7 +90180,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 216)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 36 + 4))&0x100>>8) == 0 || @@ -89493,7 +90212,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19576, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19671, 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), 5, 0x20) @@ -89551,8 +90270,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19591, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19686, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+88) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+88)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -89586,7 +90308,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 216)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89679,16 +90401,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 32)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89697,13 +90424,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89715,52 +90442,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89778,111 +90505,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+116, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 20 - goto __76 goto __78 __78: + k-- + pItem2 += 20 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 20 - goto __79 goto __81 __81: + k-- + pItem2 += 20 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*20)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*20)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+128, 0, uint32(unsafe.Sizeof(NameContext{}))) @@ -89901,33 +90628,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+128, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+128, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+128, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+160) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*20)).FpFExpr @@ -89935,28 +90662,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+128, *(*uintptr)(unsafe.Pointer(pExpr + 20))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+128, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 128 + 24)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -89967,7 +90694,7 @@ __98: (*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 + 20)) != uintptr(0)) { - goto __101 + goto __102 } pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) + 8)).FpExpr pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) @@ -89978,7 +90705,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90004,7 +90731,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90017,27 +90744,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19607 + return ts + 19702 } - return ts + 19616 + return ts + 19711 }()) groupBySort = 1 @@ -90045,49 +90772,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*20)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*20 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90101,45 +90828,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*20)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90158,16 +90885,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90198,16 +90925,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90220,98 +90947,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) @@ -90320,79 +91047,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 160)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19607) -__147: + explainTempTable(tls, pParse, ts+19702) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19625 + return ts + 19720 } - return ts + 19648 + return ts + 19743 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -90466,7 +91193,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) + z = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) if !(z == uintptr(0)) { goto __10 } @@ -90488,7 +91215,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19657, 0) + ts+19752, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -90584,7 +91311,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3642, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90676,7 +91403,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -90721,7 +91448,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+19722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19817, 0) goto trigger_cleanup __3: ; @@ -90765,7 +91492,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19768, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19863, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -90783,7 +91510,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19776, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19871, 0) goto trigger_orphan_error __11: ; @@ -90795,7 +91522,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19768, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19863, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90810,7 +91537,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19817, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90822,22 +91549,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19938, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19881, + Xsqlite3ErrorMsg(tls, pParse, ts+19976, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19918 + return ts + 20013 } - return ts + 19925 + return ts + 20020 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90846,7 +91573,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19931, libc.VaList(bp+24, pTableName+8)) + ts+20026, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90875,9 +91602,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -90995,7 +91722,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19768, bp+56) + Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19863, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91028,7 +91755,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19977, + ts+20072, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91053,13 +91780,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20025, + ts+20120, libc.VaList(bp+16, (*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+20100, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20195, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -91315,7 +92042,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20129, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20224, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -91354,9 +92081,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -91368,7 +92095,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20149, + ts+20244, 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) @@ -91482,12 +92209,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20211, + ts+20306, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20259 + return ts + 20354 } - return ts + 20266 + return ts + 20361 }())) __15: ; @@ -91601,7 +92328,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20273, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20368, 0) return 1 } @@ -91652,7 +92379,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 132)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 136)) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+80, 0, uint32(unsafe.Sizeof(SrcList{}))) @@ -91721,7 +92448,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91784,8 +92511,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(312) - defer tls.Free(312) + bp := tls.Alloc(316) + defer tls.Free(316) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91818,26 +92545,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 16 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+280, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 280)).FpParse = bp + 8 + libc.Xmemset(tls, bp+284, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 284)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20315, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20410, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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+280, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+284, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91854,7 +92581,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt transferParseError(tls, pParse, bp+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+96) + (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+100) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92047,10 +92774,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(4) defer tls.Free(4) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) var enc U8 = (*Sqlite3)(unsafe.Pointer(Xsqlite3VdbeDb(tls, v))).Fenc - var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), Xsqlite3ColumnExpr(tls, pTab, pCol), enc, @@ -92059,7 +92788,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -92421,7 +93150,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20329, + ts+20424, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -92453,7 +93182,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20365, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20460, 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: @@ -92463,7 +93192,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7632 + return ts + 7646 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16)).FzCnName }(), @@ -93333,7 +94062,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20384) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20479) __169: ; update_cleanup: @@ -93639,10 +94368,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+20397, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+152, ts+20492, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20401, libc.VaList(bp+8, bp+152)) + ts+20496, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -93733,7 +94462,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+12119, -1) + ts+12133, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93765,7 +94494,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20474, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20478, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20569, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20573, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93902,23 +94631,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20482) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20577) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20522) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) return SQLITE_ERROR __2: ; @@ -93929,7 +94660,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20565) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20660) return SQLITE_ERROR __5: ; @@ -93938,7 +94669,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 60)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1527 + zOut = ts + 1547 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -93957,7 +94688,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20583, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20678, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -93977,20 +94708,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20606) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20701) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __7: ; nRes = Xsqlite3BtreeGetRequestedReserve(tls, pMain) Xsqlite3BtreeSetCacheSize(tls, pTemp, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema)).Fcache_size) Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) - Xsqlite3BtreeSetPagerFlags(tls, pTemp, uint32(PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14472) + rc = execSql(tls, db, pzErrMsg, ts+14486) if !(rc != SQLITE_OK) { goto __9 } @@ -94035,7 +94768,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20633, + ts+20728, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94044,7 +94777,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20741, + ts+20836, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94055,7 +94788,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20795, + ts+20890, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94066,7 +94799,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20946, + ts+21041, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94188,7 +94921,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+400, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+404, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -94230,7 +94963,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 404)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -94387,7 +95120,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 44 + 4)) != 0 { @@ -94411,7 +95144,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -94495,11 +95228,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21076, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21171, libc.VaList(bp, pParse+192)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21100, + ts+21195, 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, @@ -94509,7 +95242,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21199, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21294, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -94543,7 +95276,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 252 + var pArg uintptr = pParse + 256 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 @@ -94570,7 +95303,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+21218, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21313, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94608,9 +95341,9 @@ 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+21260, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3642, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94620,7 +95353,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 + 21290 + var zFormat uintptr = ts + 21385 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94632,12 +95365,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) = pVTable for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { - var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1527) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1547) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16088, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16135, 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 @@ -94690,17 +95423,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+400, zMod) + pMod = Xsqlite3HashFind(tls, db+404, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21336, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21431, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94749,10 +95482,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+400, zMod) + pMod = Xsqlite3HashFind(tls, db+404, zMod) 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+21336, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21431, 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) @@ -94772,8 +95505,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(280) - defer tls.Free(280) + bp := tls.Alloc(284) + defer tls.Free(284) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94786,7 +95519,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94828,7 +95561,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95196,7 +95929,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -95239,7 +95972,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -95266,7 +95999,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -95495,31 +96228,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21355 + return ts + 21450 } if i == -1 { - return ts + 16197 + return ts + 16244 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -95528,35 +96243,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } - Xsqlite3_str_append(tls, pStr, ts+4987, 1) + Xsqlite3_str_append(tls, pStr, ts+5001, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } } @@ -95573,29 +96288,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21370, 2) + Xsqlite3_str_append(tls, pStr, ts+21465, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21373 + return ts + 21468 } - return ts + 21378 + return ts + 21473 }(), 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))), j, i, ts+21386) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21481) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21388) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21483) } - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95636,11 +96351,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21390, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21485, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21396 + return ts + 21491 } - return ts + 21403 + return ts + 21498 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95650,43 +96365,43 @@ 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 + 10893 + zFmt = ts + 10907 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21408 + zFmt = ts + 21503 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21441 + zFmt = ts + 21536 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21466 + zFmt = ts + 21561 } else { - zFmt = ts + 21484 + zFmt = ts + 21579 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21493, 7) + Xsqlite3_str_append(tls, bp+64, ts+21588, 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 + 16197 - Xsqlite3_str_appendf(tls, bp+64, ts+21501, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16244 + Xsqlite3_str_appendf(tls, bp+64, ts+21596, 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+21532, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21627, 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+21542, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21637, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21547, + Xsqlite3_str_appendf(tls, bp+64, ts+21642, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21574, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21669, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95718,25 +96433,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21680, 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+21373, 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+21468, 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+21701, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21362, 5) + Xsqlite3_str_append(tls, bp+24, ts+21457, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21373, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21468, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4936, 1) + Xsqlite3_str_append(tls, bp+24, ts+4950, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96097,7 +96812,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96150,104 +96865,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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+8, pExpr, uint32(unsafe.Sizeof(Expr{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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 + 44)) = uintptr(0) - return WRC_Prune - } else { - return WRC_Continue - } - return int32(0) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - preserveExpr(tls, pX, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), 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 + 44)) = uintptr(0) - } - } - return WRC_Continue -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(56) - defer tls.Free(56) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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 + 28)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer(aColExpr + 8 + uintptr(iIdxCol)*20)).FpExpr - if Xsqlite3ExprIsConstant(tls, (*IdxExprTrans)(unsafe.Pointer(bp+28)).FpIdxExpr) != 0 { - continue - } - (*Walker)(unsafe.Pointer(bp)).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)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16)).FcolFlags)&COLFLAG_HASCOLL == 0 || - Xsqlite3StrICmp(tls, Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16), - uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) == 0) { - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -96286,7 +96903,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(4) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 768 + uintptr(iLevel)*88 + var pLevel uintptr = pWInfo + 760 + uintptr(iLevel)*88 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -96306,6 +96923,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -96456,12 +97075,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 88 + pWC = pWInfo + 80 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)*72 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+504, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+496, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -96480,13 +97099,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(j)*88)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*88)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(j)*88)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*88)).FpRJ != 0) { goto __6 } goto __4 @@ -96499,7 +97118,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 768 + uintptr(j)*88)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(j)*88)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x20>>5)) != 0) { goto __7 @@ -96561,7 +97180,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96708,6 +97327,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97050,13 +97671,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97064,104 +97692,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97170,92 +97807,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -97265,24 +97896,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -97302,152 +97933,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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, uint32(unsafe.Sizeof(SrcItem{}))) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*72, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*88)).FiFrom)*72, uint32(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*48)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21709, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+768, uint16(0)) + pParse, pOrTab, pSubWInfo+760, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -97456,121 +98088,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 52))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 48))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 768)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 760)).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)) + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 64)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -97579,36 +98211,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97626,219 +98258,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+504, *(*int32)(unsafe.Pointer(pE + 36))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 48 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr pAlt = Xsqlite3WhereFindTerm(tls, pWC, iCur, *(*int32)(unsafe.Pointer(pTerm + 24)), notReady, uint32(WO_EQ|WO_IN|WO_IS), uintptr(0)) if !(pAlt == uintptr(0)) { - goto __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 + 20)))).FpEList)).FnExpr > 1) { - goto __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 20)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 20)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+20, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 10)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 48 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97848,24 +98480,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97876,41 +98508,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 48 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -97944,7 +98576,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 88 + var pWC uintptr = pWInfo + 80 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 @@ -97952,13 +98584,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21638, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21733, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(k)*88)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(k)*88)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 768 + uintptr(k)*88)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*88)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*88)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(k)*88)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -98237,7 +98869,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*20)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { for i = 0; i < int32(uint32(unsafe.Sizeof(aOp))/uint32(unsafe.Sizeof(Op2{}))); i++ { if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), aOp[i].FzOp) == 0 { *(*uint8)(unsafe.Pointer(peOp2)) = aOp[i].FeOp2 @@ -98250,7 +98882,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -98274,11 +98906,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { res++ } - if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -98310,10 +98942,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16046, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15377, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14903, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21652, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16093, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15424, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14950, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21747, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -98455,7 +99087,7 @@ __1: { 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+504, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -98472,10 +99104,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+504, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+496, (*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)*48 - b = b | Xsqlite3WhereGetMask(tls, pWInfo+504, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -98532,7 +99164,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+504, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98718,6 +99350,7 @@ __3: 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)*20)).FpExpr, iCur) == 0 { *(*int32)(unsafe.Pointer(aiCurCol)) = iCur *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 @@ -98773,7 +99406,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*48 - pMaskSet = pWInfo + 504 + pMaskSet = pWInfo + 496 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98810,12 +99443,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98894,7 +99527,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -98988,7 +99621,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21700 + return ts + 21795 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99182,7 +99815,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -99361,7 +99994,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21707, + Xsqlite3ErrorMsg(tls, pParse, ts+21802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -99430,6 +100063,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -99456,10 +100092,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 768 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*88 + pInner = pWInfo + 760 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*88 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -99479,14 +100115,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&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 + 768 + uintptr(i)*88 + pInner = pWInfo + 760 + uintptr(i)*88 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 @@ -99523,14 +100159,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+20, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -99973,6 +100609,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -99982,11 +100630,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100081,7 +100727,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21743, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21838, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -100152,7 +100798,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21769 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21864 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -100386,7 +101032,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 768 + uintptr(iLevel)*88 + pLevel = pWInfo + 760 + uintptr(iLevel)*88 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -100448,11 +101094,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_OK) @@ -100520,7 +101164,7 @@ __3: uint32(unsafe.Sizeof(sqlite3_index_orderby{}))*uint32(nOrderBy)+uint32(unsafe.Sizeof(HiddenIndexInfo1{}))+ uint32(unsafe.Sizeof(uintptr(0)))*uint32(nTerm))) if pIdxInfo == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) return uintptr(0) } pHidden = pIdxInfo + 1*72 @@ -100642,9 +101286,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3642, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100712,7 +101356,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanLt + uintptr(iCol)*4)) } @@ -101061,9 +101705,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 64 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint32(unsafe.Sizeof([3]uintptr{})) / uint32(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101087,7 +101734,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) return SQLITE_NOMEM } @@ -101103,32 +101751,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+88) + Xsqlite3WhereClauseClear(tls, pWInfo+80) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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+8, uint32(unsafe.Sizeof(Expr{}))) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -101274,7 +101912,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+64, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+60, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -101517,13 +102155,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 + 24)) |= uint8(SQLITE_BLDF1_UNIQUE) } else { @@ -101534,7 +102169,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTerm @@ -101589,31 +102225,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } else if int32(eOp)&WO_ISNULL != 0 { *(*U32)(unsafe.Pointer(pNew + 44)) |= 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 + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = 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 { - pTop = pTerm + 1*48 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)*4)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*48 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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)*4)) + } else { + pBtm = uintptr(0) + } } } @@ -101816,6 +102454,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(36) + defer tls.Free(36) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(102) defer tls.Free(102) @@ -101947,6 +102643,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -101961,6 +102660,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -101991,7 +102693,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 88 + var pWC2 uintptr = pWInfo + 80 for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC2)).FnTerm; ii++ { var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC2)).Fa + uintptr(ii)*48 if !(Xsqlite3ExprCoveredByIndex(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iCur, pProbe) != 0) { @@ -102146,7 +102848,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+21780, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102204,7 +102906,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21780, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102562,7 +103264,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -102574,7 +103276,7 @@ __1: var mUnusable Bitmask = uint64(0) (*WhereLoop)(unsafe.Pointer(pNew)).FiTab = U8(iTab) *(*uint32)(unsafe.Pointer(pBuilder + 28)) += uint32(SQLITE_QUERY_PLANNER_LIMIT_INCR) - (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+504, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -102589,7 +103291,7 @@ __1: var p uintptr for p = pItem + 1*72; p < pEnd; p += 72 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+504, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102602,7 +103304,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21806, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21901, 0) rc = SQLITE_OK } else { goto __3 @@ -102703,7 +103405,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+88, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+80, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102877,7 +103579,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+504, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+496, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102929,7 +103631,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -102957,7 +103659,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -102978,7 +103679,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103000,7 +103700,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { nSpace = int32((uint32(unsafe.Sizeof(WherePath{})) + uint32(unsafe.Sizeof(uintptr(0)))*uint32(nLoop)) * uint32(mxChoice) * uint32(2)) nSpace = int32(uint32(nSpace) + uint32(unsafe.Sizeof(LogEst(0)))*uint32(nOrderBy)) - pSpace = Xsqlite3DbMallocRawNN(tls, db, uint64(nSpace)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103062,9 +103762,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103080,7 +103779,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103100,6 +103801,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103196,8 +103902,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21841, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21936, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103209,7 +103915,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 768 + uintptr(iLoop)*88 + var pLevel uintptr = pWInfo + 760 + uintptr(iLoop)*88 (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop = libc.AssignUintptr(&pWLoop, *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(iLoop)*4))) (*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)*72)).FiCursor @@ -103224,7 +103930,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -103244,7 +103950,7 @@ __3: uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+16)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -103252,7 +103958,7 @@ __3: } 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+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -103262,7 +103968,7 @@ __3: pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+24)) if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 3, 0x8) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -103270,7 +103976,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -103302,7 +104008,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 88 + pWC = pWInfo + 80 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -103359,10 +104065,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).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) @@ -103406,16 +104112,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+504, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+504, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*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 + 768 + uintptr(i)*88)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(i)*88)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*72 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -103448,7 +104154,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } if i != int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 { var nByte int32 = int32(uint32(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1-i) * uint32(unsafe.Sizeof(WhereLevel{}))) - libc.Xmemmove(tls, pWInfo+768+uintptr(i)*88, pWInfo+768+uintptr(i+1)*88, uint32(nByte)) + libc.Xmemmove(tls, pWInfo+760+uintptr(i)*88, pWInfo+760+uintptr(i+1)*88, uint32(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -103460,9 +104166,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 768 + uintptr(i)*88)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(i)*88)).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) { @@ -103480,6 +104186,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*20)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -103566,7 +104324,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(40) defer tls.Free(40) @@ -103623,7 +104381,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21859, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21954, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -103646,31 +104404,30 @@ __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 + 24)) = libc.AssignPtrInt32(pWInfo+24+1*4, -1) + *(*int32)(unsafe.Pointer(pWInfo + 20)) = libc.AssignPtrInt32(pWInfo+20+1*4, -1) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel = U8(nTabList) - (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+32, Xsqlite3VdbeMakeLabel(tls, pParse)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+28, 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+49, 0, - uint32(uintptr(0)+88)-uint32(uintptr(0)+49)) - libc.Xmemset(tls, pWInfo+768, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+45, 0, + uint32(uintptr(0)+80)-uint32(uintptr(0)+45)) + libc.Xmemset(tls, pWInfo+760, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 504 + pMaskSet = pWInfo + 496 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 88 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 80 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+88, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+88, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+80, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+80, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103688,13 +104445,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21887, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21982, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*72)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*72, pWInfo+88) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*72, pWInfo+80) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103705,169 +104462,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+88) - Xsqlite3WhereAddLimit(tls, pWInfo+88, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+80) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+80, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } pT = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).Fa + uintptr(ii)*48 if !(int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags)&TERM_VIRTUAL != 0) { - goto __15 + goto __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 10)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } wctrlFlags = libc.Uint16FromInt32(int32(wctrlFlags) & libc.CplInt32(WHERE_WANT_DISTINCT)) - *(*U16)(unsafe.Pointer(pWInfo + 44)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) - goto __19 -__18: - if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+88, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 40)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+80, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 44)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 40)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103876,26 +104638,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 768 -__40: + pLevel = pWInfo + 760 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 @@ -103903,37 +104665,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 20)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -103941,92 +104703,98 @@ __51: int32((*Table)(unsafe.Pointer(pTab)).FnCol) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(n), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __57 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 20 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104036,24 +104804,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104063,96 +104831,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 20)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 44)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 88 - goto __40 goto __42 __42: + ii++ + pLevel += 88 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 768 + uintptr(ii)*88 + pLevel = pWInfo + 760 + uintptr(ii)*88 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+88, + constructAutomaticIndex(tls, pParse, pWInfo+80, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104160,30 +104928,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104203,7 +104969,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 768 + uintptr(i)*88 + pLevel = pWInfo + 760 + uintptr(i)*88 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -104339,11 +105105,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 768 + pLevel = pWInfo + 760 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -104382,6 +105145,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*20 @@ -104555,7 +105328,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21905, -1) + pCtx, ts+22000, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104688,7 +105461,7 @@ 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+21961, -1) + pCtx, ts+22056, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104777,17 +105550,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22006)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22017)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22028)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22033)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22046)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22056)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22062)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22073)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22083)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22095)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22100)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22101)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22112)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22123)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22128)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22141)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22151)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22157)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22168)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22178)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22190)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22195)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104833,7 +105606,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22104, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22199, libc.VaList(bp, zName)) } return p } @@ -104877,12 +105650,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+22123, 0) + ts+22218, 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+22194, 0) + ts+22289, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104905,7 +105678,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).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+7857) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) } break } @@ -105072,7 +105845,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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)*20)).FpExpr, 0) - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pDup) break @@ -105109,7 +105881,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22257, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22352, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105225,7 +105997,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463)) } pSub = Xsqlite3SelectNew(tls, @@ -105339,7 +106111,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22283, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22378, 0) goto windowAllocErr __2: ; @@ -105404,15 +106176,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22315 + zErr = ts + 22410 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22332 + zErr = ts + 22427 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22348 + zErr = ts + 22443 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22368, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22463, 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 { @@ -105433,7 +106205,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+22401, 0) + ts+22496, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -105571,7 +106343,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -105589,11 +106361,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22448, - ts + 22501, - ts + 21905, - ts + 22552, - ts + 22604, + ts + 22543, + ts + 22596, + ts + 22000, + ts + 22647, + ts + 22699, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106073,13 +106845,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -106985,19 +107761,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22654, + Xsqlite3ErrorMsg(tls, pParse, ts+22749, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19648 + return ts + 19743 } - return ts + 22696 + return ts + 22791 }(), 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+22702, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22797, 0) } } @@ -107068,7 +107844,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22736, + Xsqlite3ErrorMsg(tls, pParse, ts+22831, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108163,7 +108939,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22869, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109138,21 +109914,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16197, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16244, 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+22796, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16110, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16157, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22796, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, 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)) @@ -109895,7 +110671,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22823) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22918) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110059,7 +110835,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 92)) = *(*Token)(unsafe.Pointer(yymsp + 4)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp+32, bp+92)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp+32, bp+92)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -110276,9 +111052,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) != 0 { - return ts + 6683 + return ts + 6697 } - return ts + 6688 + return ts + 6702 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) @@ -110557,19 +111333,19 @@ 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+22856, 0) + ts+22951, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22951, 0) + ts+23046, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23035, 0) + ts+23130, 0) } break case uint32(273): @@ -110948,9 +111724,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23120, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23215, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111718,7 +112494,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 1248)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23137, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, bp+1248)) break } } @@ -111739,9 +112515,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3642, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23162, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23257, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111754,7 +112530,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111914,7 +112690,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23173, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23268, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111927,11 +112703,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19768, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19863, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23280, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -111944,9 +112720,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23195, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23290, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23199, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23294, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112056,36 +112832,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112202,7 +112956,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -112473,16 +113227,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -112546,6 +113301,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -112596,6 +113352,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112744,7 +113501,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 404)).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) @@ -112774,7 +113531,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112789,7 +113546,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23207, 0) + ts+23302, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112885,7 +113642,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 428)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 432)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112896,8 +113653,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+428) - for i = (*Hash)(unsafe.Pointer(db + 444)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+432) + for i = (*Hash)(unsafe.Pointer(db + 448)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112907,13 +113664,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+444) - for i = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+448) + for i = (*Hash)(unsafe.Pointer(db + 404)).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+400) + Xsqlite3HashClear(tls, db+404) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -112980,23 +113737,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23275 + var zErr uintptr = ts + 23370 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23289 + zErr = ts + 23384 break } case SQLITE_ROW: { - zErr = ts + 23311 + zErr = ts + 23406 break } case SQLITE_DONE: { - zErr = ts + 23333 + zErr = ts + 23428 break } @@ -113014,35 +113771,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23356, - ts + 23369, + ts + 23451, + ts + 23464, uintptr(0), - ts + 23385, - ts + 23410, - ts + 23424, - ts + 23443, - ts + 1463, - ts + 23468, + ts + 23480, ts + 23505, - ts + 23517, - ts + 23532, - ts + 23565, - ts + 23583, - ts + 23608, - ts + 23637, + ts + 23519, + ts + 23538, + ts + 1483, + ts + 23563, + ts + 23600, + ts + 23612, + ts + 23627, + ts + 23660, + ts + 23678, + ts + 23703, + ts + 23732, uintptr(0), - ts + 5827, - ts + 5313, - ts + 23654, - ts + 23672, - ts + 23690, + ts + 5841, + ts + 5327, + ts + 23749, + ts + 23767, + ts + 23785, uintptr(0), - ts + 23724, + ts + 23819, uintptr(0), - ts + 23745, - ts + 23771, - ts + 23794, - ts + 23815, + ts + 23840, + ts + 23866, + ts + 23889, + ts + 23910, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113157,7 +113914,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113202,7 +113959,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+23831, 0) + ts+23926, 0) return SQLITE_BUSY } else { @@ -113319,7 +114076,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23894, libc.VaList(bp, zName)) + ts+23989, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113335,6 +114092,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -113344,7 +114104,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -113552,7 +114312,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+23945, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24040, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113645,7 +114405,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113715,7 +114475,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113725,7 +114485,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113757,20 +114517,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23966, 0) + ts+24061, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+444, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+448, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*20 @@ -113894,7 +114654,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+24034, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24129, uint32(5)) == 0) { goto __1 } iOut = 0 @@ -113939,10 +114699,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24040, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24135, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24050, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24145, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114047,7 +114807,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24078, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24173, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -114058,17 +114818,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24082, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24177, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24082 + zModeType = ts + 24177 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24088, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24183, zOpt, uint32(4)) == 0) { goto __32 } @@ -114076,7 +114836,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3251 + zModeType = ts + 3265 __32: ; if !(aMode != 0) { @@ -114106,7 +114866,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24093, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24188, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114114,7 +114874,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24113, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24208, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114154,7 +114914,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24137, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24232, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114177,15 +114937,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24153, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24248, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24168, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24171, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24174, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17292, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24263, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24266, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24269, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17339, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114300,7 +115060,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 472 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 476 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -114319,8 +115079,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+444) - Xsqlite3HashInit(tls, db+400) + Xsqlite3HashInit(tls, db+448) + Xsqlite3HashInit(tls, db+404) 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 @@ -114331,10 +115091,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+21700, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21795, 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+24178, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24273, 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) { @@ -114348,7 +115108,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -114365,7 +115125,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16)))) @@ -114399,9 +115159,9 @@ __22: Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FpSchema = Xsqlite3SchemaGet(tls, db, uintptr(0)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6360 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6374 (*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 + 23180 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23275 (*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) @@ -114506,7 +115266,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24184 + zFilename = ts + 24279 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114609,21 +115369,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24187, + Xsqlite3_log(tls, iErr, ts+24282, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24212) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24307) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24232) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24327) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24334) } // This is a convenience routine that makes sure that all thread-specific @@ -114734,7 +115494,7 @@ __4: 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 + 1092 + zDataType = ts + 1112 primarykey = 1 __13: ; @@ -114781,14 +115541,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24256, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24351, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114858,6 +115618,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -115434,7 +116197,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24284, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24379, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -115552,7 +116315,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 + 24292 + return ts + 24387 } return uintptr(0) }(), 0) @@ -115729,7 +116492,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6160, ts + 6683, ts + 6688, ts + 6170, ts + 6165, ts + 7924, ts + 24315, ts + 24321, + ts + 6174, ts + 6697, ts + 6702, ts + 6184, ts + 6179, ts + 7938, ts + 24410, ts + 24416, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115882,7 +116645,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)(unsafe.Pointer(ts + 24328 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24423 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -115908,7 +116671,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6160, uint32(4)) + jsonAppendRaw(tls, p, ts+6174, uint32(4)) break } @@ -115937,7 +116700,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24345, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24440, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -115995,19 +116758,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6160, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6174, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6683, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6697, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6688, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6702, uint32(5)) break } @@ -116552,17 +117315,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6160, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6174, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6683, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6697, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6688, uint32(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6702, uint32(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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)) @@ -116663,7 +117426,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+24374, -1) + Xsqlite3_result_error(tls, pCtx, ts+24469, -1) } } jsonParseReset(tls, pParse) @@ -116969,7 +117732,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+24389, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24484, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -116984,7 +117747,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24393, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24488, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117038,7 +117801,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24419, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24514, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117143,11 +117906,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24462, uint32(2)) + jsonAppendRaw(tls, bp, ts+24557, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4977, uint32(2)) + jsonAppendRaw(tls, bp, ts+4991, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24465, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24560, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -117188,7 +117951,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6160, uint32(4)) + jsonAppendRaw(tls, bp, ts+6174, uint32(4)) } } if i == argc { @@ -117304,14 +118067,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24468, -1) + ts+24563, -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+24519, -1) + Xsqlite3_result_error(tls, ctx, ts+24614, -1) jsonReset(tls, bp) return } @@ -117406,7 +118169,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117481,9 +118244,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24553 + return ts + 24648 } - return ts + 24557 + return ts + 24652 }()) return __2: @@ -117616,7 +118379,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24564, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24659, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117713,7 +118476,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24567, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24662, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117757,7 +118520,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24570) + ts+24665) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117888,7 +118651,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24653, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24748, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117907,7 +118670,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*12 pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24659, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24754, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 @@ -118003,7 +118766,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24659, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24754, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118027,7 +118790,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 + 24664 + zRoot = ts + 24759 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118143,7 +118906,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+24374, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24469, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118238,25 +119001,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24666}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24671}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON), FxSFunc: 0, FzName: ts + 24713}, - {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 + 24716}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24720}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24732}, - {FnArg: int8(2), 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 + 24755}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24766}, - {FnArg: int8(-1), 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), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24810}, - {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 + 24821}, - {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 + 24838}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24777}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24795}, + {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 + 24808}, + {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 + 24811}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24815}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24827}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24839}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24850}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24861}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24873}, + {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 + 24886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24905}, + {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 + 24916}, + {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 + 24933}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118275,8 +119038,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24856, FpModule: 0}, - {FzName: ts + 24866, FpModule: 0}, + {FzName: ts + 24951, FpModule: 0}, + {FzName: ts + 24961, FpModule: 0}, } type Rtree1 = struct { @@ -118533,11 +119296,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+24876, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24971, 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+24884, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24979, iNode, 0, pRtree+76) Xsqlite3_free(tls, zTab) } @@ -118748,7 +119511,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24889, + ts+24984, 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)) @@ -119451,7 +120214,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24971) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25066) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119663,7 +120426,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120792,7 +121555,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24985, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25080, 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 { @@ -120804,12 +121567,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25005, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25100, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25037, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25132, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120850,7 +121613,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121035,7 +121798,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25074, 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+25169, 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)) @@ -121058,14 +121821,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25219 + var zFmt uintptr = ts + 25314 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11265, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11279, 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 { @@ -121106,7 +121869,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25275, ts + 5039, ts + 16197, + ts + 25370, ts + 5053, ts + 16244, } var rtreeModule = Sqlite3_module{ @@ -121149,19 +121912,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+25280, + ts+25375, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25342, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25437, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25347, + ts+25442, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25411, + ts+25506, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25481, + ts+25576, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121190,7 +121953,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25530 + zFormat = ts + 25625 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121202,7 +121965,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+25638, + ts+25733, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121210,18 +121973,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+25683, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25778, 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+12736, 1) + Xsqlite3_str_append(tls, p, ts+12750, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25710, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25805, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25732, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25827, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25740, 0) + Xsqlite3_str_appendf(tls, p, ts+25835, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121236,14 +121999,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25756, - ts + 25809, - ts + 25854, - ts + 25906, - ts + 25960, - ts + 26005, - ts + 26063, - ts + 26118, + ts + 25851, + ts + 25904, + ts + 25949, + ts + 26001, + ts + 26055, + ts + 26100, + ts + 26158, + ts + 26213, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121272,7 +122035,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26165, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26260, 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 @@ -121280,19 +122043,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26185, + ts+26280, 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 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, 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+26242, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26337, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121334,16 +122097,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26277, - ts + 26320, - ts + 26355, - ts + 26391, + ts + 26372, + ts + 26415, + ts + 26450, + ts + 26486, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) return SQLITE_ERROR __1: ; @@ -121368,7 +122131,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26428, + Xsqlite3_str_appendf(tls, pSql, ts+26523, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -121380,7 +122143,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26452, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26547, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -121403,7 +122166,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -121414,14 +122177,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) 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+3642, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -121464,7 +122227,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) goto rtreeInit_fail __22: ; @@ -121481,7 +122244,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -121499,7 +122262,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26461, ts + 26472} +var azFormat = [2]uintptr{ts + 26556, ts + 26567} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(600) @@ -121537,13 +122300,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+48, bp+16, ii, bp+552) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10837, 1) + Xsqlite3_str_append(tls, pOut, ts+10851, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26577, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+48)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26488, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26583, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26492, 1) + Xsqlite3_str_append(tls, pOut, ts+26587, 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}))) @@ -121554,7 +122317,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26494, -1) + Xsqlite3_result_error(tls, ctx, ts+26589, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121630,12 +122393,12 @@ 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+26527, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26622, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4041 + return ts + 4055 } - return ts + 1527 + return ts + 1547 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -121654,7 +122417,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+26534, + ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121673,7 +122436,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+26579, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26674, libc.VaList(bp+16, iNode)) } } @@ -121687,8 +122450,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26611, - ts + 26665, + ts + 26706, + ts + 26760, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -121703,23 +122466,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+26713, + rtreeCheckAppendMsg(tls, pCheck, ts+26808, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26775, + ts+26870, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }(), iKey, iVal)) } } @@ -121743,7 +122506,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+26833, libc.VaList(bp, i, iCell, iNode)) + ts+26928, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121763,7 +122526,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+26881, libc.VaList(bp+24, i, iCell, iNode)) + ts+26976, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121780,14 +122543,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+26948, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27043, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26982, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27077, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121795,7 +122558,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+27012, + ts+27107, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121824,14 +122587,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27067, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27162, 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+27098, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27193, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121853,12 +122616,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14472, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14486, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27165, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27260, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121867,12 +122630,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24985, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25080, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27193, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27288, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121886,8 +122649,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+27224, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27319, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121895,7 +122658,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 24 + 1*4))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27239, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27334, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121910,7 +122673,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27243, -1) + ts+27338, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121918,7 +122681,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6360 + zDb = ts + 6374 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4))) } @@ -121928,7 +122691,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17834 + return ts + 17962 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122296,11 +123059,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+27294, 1) + Xsqlite3_str_append(tls, x, ts+27389, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27296, 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+27391, 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+27307, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27402, 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) } @@ -122320,19 +123083,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+27318, 0) + Xsqlite3_str_appendf(tls, x, ts+27413, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27336, 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+27431, 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+27344, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27439, 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+27352, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27447, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27356, 0) + Xsqlite3_str_appendf(tls, x, ts+27451, 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) } @@ -123237,7 +124000,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27369, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27464, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123246,7 +124009,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27391, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27486, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -123254,7 +124017,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123265,7 +124028,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -123290,7 +124053,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -123479,7 +124242,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16197 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16244 (*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 @@ -123489,7 +124252,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27490 (*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 @@ -123497,7 +124260,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27401 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27496 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123609,7 +124372,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27410, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27505, 0) __4: ; goto geopoly_update_end @@ -123739,14 +124502,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27450) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27545) == 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+27466) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27561) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123811,7 +124574,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27481, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27576, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123823,25 +124586,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27489}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27502}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27515}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27528}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27466}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27540}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27450}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27563}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27577}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27590}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27604}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27620}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27597}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27610}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27623}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27561}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27635}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27545}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27658}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27672}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27685}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27699}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27715}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27632}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27727}, } // Register the r-tree module with database handle db. This creates the @@ -123851,26 +124614,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27651, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27746, 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+27661, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27756, 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+27672, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27767, -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+27395, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27490, 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+27683, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -123924,7 +124687,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24971, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25066, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -123988,6 +124751,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124240,7 +125005,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) return } @@ -124251,7 +125016,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+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124264,7 +125029,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -124276,7 +125041,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -124352,7 +125117,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27714, uintptr(0), uintptr(0), p+36) + ts+27809, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -124416,7 +125181,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+24884, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24979, 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++ { } @@ -124437,16 +125202,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27885, libc.VaList(bp, func() uintptr { + ts+27980, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28035 + return ts + 28130 } - return ts + 1527 + return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28076) + ts+28171) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -124544,7 +125309,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -124562,7 +125327,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+28201, libc.VaList(bp, zTab))) + ts+28296, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124580,7 +125345,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+28320, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28415, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124598,7 +125363,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28341, libc.VaList(bp+16, zIdx))) + ts+28436, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124621,7 +125386,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28487, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124667,7 +125432,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124682,7 +125447,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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)), 1) if iCid >= 0 { @@ -124722,7 +125487,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+19294, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19389, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124732,18 +125497,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28470, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28565, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28489, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28584, 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+28494, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28589, zName) { bRbuRowid = 1 } } @@ -124755,18 +125520,18 @@ 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+28504, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28599, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28533 + return ts + 28628 } - return ts + 28546 + return ts + 28641 }())) } 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+28555, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28650, 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)), 1) @@ -124780,7 +125545,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+28577, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28672, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 5) @@ -124823,12 +125588,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+28604, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14583 + zList = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14597 } return zList } @@ -124839,13 +125604,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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)*4)) - zRet = rbuMPrintf(tls, p, ts+28613, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28708, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124867,25 +125632,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+28626, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28721, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28658, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28753, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+28681) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28687, ts+28694, ts+4936) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+28776) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28782, ts+28789, ts+4950) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) 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+28702, + ts+28797, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28744, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28839, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -124922,12 +125687,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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 @@ -124962,7 +125727,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28764 + zCol = ts + 28859 __7: ; goto __5 @@ -124970,13 +125735,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28772, + zLhs = rbuMPrintf(tls, p, ts+28867, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28793, + zOrder = rbuMPrintf(tls, p, ts+28888, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28829, + zSelect = rbuMPrintf(tls, p, ts+28924, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14583 + zSep = ts + 14597 iCol++ goto __1 __2: @@ -124994,12 +125759,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28856, + Xsqlite3_mprintf(tls, ts+28951, 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 } - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125021,8 +125786,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28904, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14583 + zVector = rbuMPrintf(tls, p, ts+28999, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14597 goto __15 __15: iCol++ @@ -125033,7 +125798,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125060,13 +125825,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1527 - var zAnd uintptr = ts + 1527 + var zCom uintptr = ts + 1547 + var zAnd uintptr = ts + 1547 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125078,9 +125843,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28923, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29018, 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 + zType = ts + 1547 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125090,37 +125855,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 + 28764 + zCol = ts + 28859 } else { - zCol = ts + 28494 + zCol = ts + 28589 } - zType = ts + 1092 + zType = ts + 1112 } 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+28945, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29040, 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 + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28965, + zImpPK = Xsqlite3_mprintf(tls, ts+29060, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28986, + zImpCols = Xsqlite3_mprintf(tls, ts+29081, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29019, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29114, 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 + 14583 - zAnd = ts + 21362 + zCom = ts + 14597 + zAnd = ts + 21457 nBind++ } @@ -125154,16 +125919,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1527 + var zS uintptr = ts + 1547 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)*4)) - zList = Xsqlite3_mprintf(tls, ts+29043, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29138, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29055, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29150, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14583 + zS = ts + 14597 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125171,7 +125936,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29064, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29159, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125183,27 +125948,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29079, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29174, 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 zSep uintptr = ts + 1547 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+29093, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21457 } } zList = rbuMPrintf(tls, p, - ts+29105, libc.VaList(bp+40, zList)) + ts+29200, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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)*4)) - zList = rbuMPrintf(tls, p, ts+29155, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21457 } } } @@ -125212,7 +125977,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29168, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29263, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125226,21 +125991,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29155, + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14583 + zSep = ts + 14597 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29194, + zList = rbuMPrintf(tls, p, ts+29289, 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 + 14583 + zSep = ts + 14597 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29224, + zList = rbuMPrintf(tls, p, ts+29319, 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 + 14583 + zSep = ts + 14597 } } } @@ -125275,19 +126040,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29261 + var zSep uintptr = ts + 29356 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16085) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16132) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp+8, zIdx))) } break } @@ -125299,15 +126064,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28681 + zDesc = ts + 28776 } else { - zDesc = ts + 1527 + zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29274, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14583 + z = rbuMPrintf(tls, p, ts+29369, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14597 } } - z = rbuMPrintf(tls, p, ts+29285, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29380, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60))) } return z @@ -125322,12 +126087,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 172)) = uintptr(0) - var zComma uintptr = ts + 1527 + var zComma uintptr = ts + 1547 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29289) + ts+29384) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -125336,7 +126101,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125346,25 +126111,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 4) - zCols = rbuMPrintf(tls, p, ts+29339, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29434, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29361, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } } - zCols = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29466, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29386, + ts+29481, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125374,50 +126139,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1527 + var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1527 + var zPk uintptr = ts + 1547 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*4)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, (*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 { - zPk = ts + 29448 + zPk = ts + 29543 } - zSql = rbuMPrintf(tls, p, ts+29461, + zSql = rbuMPrintf(tls, p, ts+29556, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29488 + return ts + 29583 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } 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+29498, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29593, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29505, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29600, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125430,7 +126195,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29552, + ts+29647, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -125467,7 +126232,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29609) + ts+29704) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -125572,7 +126337,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+29675, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29770, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125592,24 +126357,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+604, bp+608, bp+612) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 612))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29695, + ts+29790, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 604)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 612)) 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+29760, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29855, libc.VaList(bp+128, zTbl, zBind))) } 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+29796, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) + Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125625,7 +126390,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29830, + ts+29925, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125633,31 +126398,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }() } - return ts + 1527 + return ts + 1547 }(), 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+29901, + ts+29996, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29962, + ts+30057, 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 + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }(), zCollist, zLimit)) } @@ -125682,8 +126447,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6371) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6367) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6385) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6381) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125692,52 +126457,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1527 + return ts + 1547 } - return ts + 30121 + return ts + 30216 }() 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+30130, + ts+30225, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30166 + return ts + 30261 } - return ts + 1527 + return ts + 1547 }(), zBindings))) } 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+30176, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30271, 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 + var zRbuRowid uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30204 + zRbuRowid = ts + 30299 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30216, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30311, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30292 + return ts + 30387 } - return ts + 1527 + return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30309, + ts+30404, 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+30608, + ts+30703, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125745,14 +126510,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1527 + var zRbuRowid uintptr = ts + 1547 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30707 + zRbuRowid = ts + 30802 } else { - zRbuRowid = ts + 30717 + zRbuRowid = ts + 30812 } } @@ -125765,35 +126530,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28764, 0) + zOrder = rbuMPrintf(tls, p, ts+28859, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) } } 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+30728, + ts+30823, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30776 + return ts + 30871 } - return ts + 1527 + return ts + 1547 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zOrder != 0 { - return ts + 19648 + return ts + 19743 } - return ts + 1527 + return ts + 1547 }(), zOrder, zLimit))) } @@ -125856,12 +126621,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1527 + var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30121 + zPrefix = ts + 30216 } - zUpdate = Xsqlite3_mprintf(tls, ts+30782, + zUpdate = Xsqlite3_mprintf(tls, ts+30877, 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) @@ -125888,7 +126653,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -125920,7 +126685,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 12)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30812, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30907, 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)), 0) { case RBU_STATE_STAGE: @@ -125990,28 +126755,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6360, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, 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+6360) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30842, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30937, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30869, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+24, ts+3265, uint32(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30965, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+24, ts+3279, uint32(4)) } else { - libc.Xmemcpy(tls, p+24, ts+6360, uint32(4)) + libc.Xmemcpy(tls, p+24, ts+6374, uint32(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30887, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30983, 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 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+6360, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126044,11 +126809,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+30953, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31049, 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+24034, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24129, (*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)))) == '?' { @@ -126060,16 +126825,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30985, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360), + zTarget = Xsqlite3_mprintf(tls, ts+31081, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } - return ts + 31017 + return ts + 31113 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } return zExtra }())) @@ -126085,37 +126850,37 @@ 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+31019, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31115, -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+31034, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31130, 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+31051, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31147, -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+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31067, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 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+31095, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31191, 0) } } @@ -126144,14 +126909,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31067, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, uintptr(0), uintptr(0), uintptr(0)) } } 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+31113, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126260,7 +127025,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126277,23 +127042,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31148, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31244, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) } - zOal = Xsqlite3_mprintf(tls, ts+31173, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126314,12 +127079,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -126413,7 +127175,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23672, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23767, 0) return } @@ -126506,7 +127268,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31187) + ts+31283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -126514,7 +127276,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31305, libc.VaList(bp, iCookie+1)) } } } @@ -126535,7 +127297,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31236, + ts+31332, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -126565,9 +127327,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31394, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31490, 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+31409, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31505, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126581,10 +127343,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31429, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31525, 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+31454) + ts+31550) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126598,12 +127360,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31562) + ts+31658) } 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+31627) + ts+31723) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126615,7 +127377,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31671, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31767, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126635,15 +127397,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17170) - rbuCopyPragma(tls, p, ts+16281) + rbuCopyPragma(tls, p, ts+17217) + rbuCopyPragma(tls, p, ts+16328) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31696, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31792, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126667,10 +127429,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126765,7 +127527,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31724, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31820, 0) } if rc == SQLITE_OK { @@ -126781,7 +127543,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31173, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31269, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126797,7 +127559,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31749, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31845, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126831,7 +127593,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31760, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31856, 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)), -1) } else { @@ -126861,13 +127623,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31832, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31928, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31846) + ts+31942) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126878,7 +127640,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31903) + ts+31999) 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)), 0) @@ -126908,10 +127670,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*248 + var pCsr uintptr = p + 1*256 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -126922,7 +127685,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+Size_t(1)) pCsr += uintptr(nRbu + Size_t(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3642, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3656, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -126951,7 +127714,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+31977, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32073, 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 @@ -126969,12 +127732,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32009, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32105, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32041 + return ts + 32137 } - return ts + 32048 + return ts + 32144 }())) } } @@ -126982,7 +127745,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+14472, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14486, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+48) @@ -126993,19 +127756,19 @@ 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+16884) - rbuCopyPragma(tls, p, ts+16296) + rbuCopyPragma(tls, p, ts+16931) + rbuCopyPragma(tls, p, ts+16343) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32055, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32151, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32071, uintptr(0), uintptr(0), p+36) + db, ts+32167, uintptr(0), uintptr(0), p+36) } } @@ -127059,7 +127822,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32095, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32191, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -127086,7 +127849,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30121, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30216, 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++ @@ -127103,7 +127866,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127116,13 +127879,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+36) } rbuObjIterFinalize(tls, p+48) 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+32103, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32199, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127217,7 +127980,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127234,19 +127997,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14472 + zBegin = ts + 14486 } else { - zBegin = ts + 32055 + zBegin = ts + 32151 } 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+32055, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32151, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127254,6 +128017,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -127272,7 +128057,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 232)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -127567,7 +128352,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32130, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32226, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127592,7 +128377,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+32153, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32249, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127637,7 +128422,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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 + 188)) |= U32((int32(1)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -130443,7 +131228,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -130485,7 +131270,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -130546,7 +131331,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -130620,13 +131405,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -130688,7 +131473,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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)*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, 215972)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -130700,6 +131485,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*4)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131052,7 +131846,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -131218,45 +132012,45 @@ 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+11265) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11279) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) (*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+32740, bp+12) + sessionAppendStr(tls, bp, ts+32836, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32753, bp+12) + sessionAppendStr(tls, bp, ts+32849, bp+12) 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+32759, bp+12) + sessionAppendStr(tls, bp, ts+32855, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14583 + zSep = ts + 14597 } } - zSep = ts + 1527 - sessionAppendStr(tls, bp, ts+32688, bp+12) + zSep = ts + 1547 + sessionAppendStr(tls, bp, ts+32784, 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) if bStat1 != 0 && ii == 1 { sessionAppendStr(tls, bp, - ts+32764, bp+12) + ts+32860, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32696, bp+12) + sessionAppendStr(tls, bp, ts+32792, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21362 + zSep = ts + 21457 } } @@ -131303,42 +132097,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(16) var i int32 - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32839, bp+12) + sessionAppendStr(tls, bp, ts+32935, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32688, bp+12) + sessionAppendStr(tls, bp, ts+32784, 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+32759, bp+12) + sessionAppendStr(tls, bp, ts+32855, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21362 + zSep = ts + 21457 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32857, bp+12) + sessionAppendStr(tls, bp, ts+32953, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32400, bp+12) + sessionAppendStr(tls, bp, ts+32496, bp+12) - zSep = ts + 1527 + zSep = ts + 1547 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+32696, bp+12) + sessionAppendStr(tls, bp, ts+32792, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32865 + zSep = ts + 32961 } } - sessionAppendStr(tls, bp, ts+4936, bp+12) + sessionAppendStr(tls, bp, ts+4950, bp+12) } if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { @@ -131351,7 +132145,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6360, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) + db, ts+6374, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -131362,21 +132156,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32870, bp+12) + sessionAppendStr(tls, bp, ts+32966, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21368, bp+12) + sessionAppendStr(tls, bp, ts+21463, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14583, bp+12) + sessionAppendStr(tls, bp, ts+14597, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32888, bp+12) + sessionAppendStr(tls, bp, ts+32984, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32899, bp+12) + sessionAppendStr(tls, bp, ts+32995, bp+12) } - sessionAppendStr(tls, bp, ts+4936, bp+12) + sessionAppendStr(tls, bp, ts+4950, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+8, uintptr(0)) @@ -131390,14 +132184,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11265, p) + var rc int32 = sessionSelectRow(tls, db, ts+11279, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32903) + ts+32999) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33016) + ts+33112) } return rc } @@ -131425,7 +132219,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131678,7 +132472,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33160, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33256, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131694,7 +132488,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+33181, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33277, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131767,10 +132561,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33200, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33296, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33226, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33322, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+124, bp+128, bp+132, uintptr(0)) @@ -131803,7 +132597,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 124)))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) + *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) if *(*uintptr)(unsafe.Pointer(bp + 140)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131816,7 +132610,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+136, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6360, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) + db, ts+6374, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) if rc != SQLITE_OK { break } @@ -131829,19 +132623,19 @@ 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+33256, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33352, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33300, + ts+33396, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 128)))) } 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+33371, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33467, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 128)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11265) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11279) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131892,14 +132686,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33431, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33527, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33485, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33581, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132413,7 +133207,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint32(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint32(n2)) pOut += uintptr(n2) @@ -133136,7 +133930,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33513, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33609, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133424,7 +134218,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33637, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133609,7 +134403,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+33572, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33668, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133677,7 +134471,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33579 + var zErr uintptr = ts + 33675 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133835,7 +134629,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1527 + return ts + 1547 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -133858,7 +134652,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33629 + var zErr uintptr = ts + 33725 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134182,13 +134976,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33677, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33773, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33685, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33781, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33695, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33791, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134599,7 +135393,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6160, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6174, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134738,7 +135532,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33700, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33796, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134765,14 +135559,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+33707, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33738, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33834, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134783,7 +135577,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33771, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33867, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134796,7 +135590,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33808, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33904, 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) @@ -134805,7 +135599,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+33817, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33913, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134824,7 +135618,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33850, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33946, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134839,14 +135633,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33884, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33980, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33892, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33988, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33924, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34020, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134854,9 +135648,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33930, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34026, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33944, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34040, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134864,9 +135658,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33982, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34078, 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+33993, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -134874,21 +135668,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5054, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5068, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44)) = [4]Fts5Enum{ - {FzName: ts + 7937, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17275}, - {FzName: ts + 34028, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7951, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17322}, + {FzName: ts + 34124, 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+34036, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34132, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34067, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34163, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -134935,15 +135729,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22028) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16197) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34095, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22123) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16244) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34191, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34125) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34221) { *(*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+34135, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34231, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -134960,13 +135754,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34166, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34262, 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+34171, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34267, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34178, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34274, libc.VaList(bp+16, i)) } } } @@ -135004,8 +135798,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+22028) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34186, 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+22123) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34282, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135037,7 +135831,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+34215, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34311, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135046,13 +135840,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 44)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 44)) } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 52)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 52)) } - return ts + 1527 + return ts + 1547 }(), pzErr) } else { @@ -135074,19 +135868,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 + 33884 + zTail = ts + 33980 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34235 + zTail = ts + 34331 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34243, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34339, 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+16197, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16244, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135130,18 +135924,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34254, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34350, 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 + 1547 } - return ts + 14583 + return ts + 14597 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34270, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34366, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22028)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22123)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135251,7 +136045,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34399) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135261,7 +136055,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+34308) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34404) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135271,7 +136065,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+34317) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34413) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135284,7 +136078,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+34327) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34423) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135294,7 +136088,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+34337) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34433) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135310,7 +136104,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+22028) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22123) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4) @@ -135333,7 +136127,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34349 + var zSelect uintptr = ts + 34445 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -135355,7 +136149,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34381) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34477) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40)) = 0 @@ -135369,7 +136163,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34389, + ts+34485, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -135467,7 +136261,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34454, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34550, 0) return FTS5_EOF } } @@ -135480,20 +136274,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+34474, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34570, 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+34505, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34601, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34508, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34604, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29891, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29986, uint32(3)) == 0 { tok = FTS5_AND } break @@ -137261,9 +138055,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34512, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34608, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33637, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137279,7 +138073,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+34517, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34613, 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') @@ -137366,7 +138160,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20365, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20460, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -137447,7 +138241,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34546, 0) + ts+34642, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137617,12 +138411,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+34599, + ts+34695, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34649 + return ts + 34745 } - return ts + 34512 + return ts + 34608 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138571,7 +139365,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34656, iRowid, 0, p+40) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34752, iRowid, 0, p+40) } if rc == SQLITE_ERROR { @@ -138650,7 +139444,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+34662, + ts+34758, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138675,7 +139469,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34713, + ts+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+48, zSql) != 0 { return @@ -138698,7 +139492,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34762, + ts+34858, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -138937,7 +139731,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139010,13 +139804,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*12 - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ { - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140136,7 +140930,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+60, Xsqlite3_mprintf(tls, - ts+34825, + ts+34921, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141328,7 +142122,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1527 + return ts + 1547 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -141494,10 +142288,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+36, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+36, pPage+32, nTerm, pTerm) @@ -141525,7 +142319,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist != 0 || (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 { sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, iRowid) } else { - sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, iRowid-(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid) + sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141601,7 +142395,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+34909, + ts+35005, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141644,7 +142438,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { sqlite3Fts5BufferSize(tls, p+36, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn+(*Fts5Buffer)(unsafe.Pointer(bp)).Fn)) } sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32(unsafe.Sizeof([4]U8{})), bp+12) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -141656,7 +142450,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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+36, bp, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(4)) sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) } @@ -141776,7 +142570,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp+4+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp+4+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142176,12 +142970,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+36, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+36, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -142192,7 +142986,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu return sqlite3Fts5BufferSize(tls, p+36, pBuf, uint32(nByte+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) }() { { - *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iDelta)) + *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), iDelta) } { @@ -142373,7 +143167,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf for *(*uintptr)(unsafe.Pointer(bp + 896)) != 0 { { { - *(*int32)(unsafe.Pointer(bp + 900 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+900)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+900)).Fn), uint64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 896)))).Fiter.FiRowid-iLastRowid)) + *(*int32)(unsafe.Pointer(bp + 900 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+900)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+900)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 896)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 896)))).Fiter.FiRowid } @@ -142497,7 +143291,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -142506,7 +143300,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -142538,8 +143332,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 12)), pSeg) if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).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 + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } } @@ -142592,8 +143386,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) - })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } @@ -142663,7 +143457,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1527, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1547, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -142679,13 +143473,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+34966, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35062, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24884, ts+34974, 0, pzErr) + pConfig, ts+24979, ts+35070, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11405, - ts+35009, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11419, + ts+35105, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -142938,7 +143732,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+34656, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34752, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) @@ -143052,7 +143846,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35053, + ts+35149, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -143211,6 +144005,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+4) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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 + 4))) @@ -143218,7 +144016,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8)).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+35139) + sqlite3Fts5BufferAppendBlob(tls, p+36, bp+8, uint32(4), ts+35235) 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)) @@ -143489,7 +144287,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR } @@ -143520,7 +144318,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } 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+4954, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -143535,7 +144333,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return uint8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, 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) @@ -143849,7 +144647,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143881,7 +144679,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -143913,25 +144711,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35183, + ts+35279, 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 + 14583 + return ts + 14597 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bDesc != 0 { - return ts + 35238 + return ts + 35334 } - return ts + 35243 + return ts + 35339 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -143977,12 +144775,12 @@ 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+35247, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35343, 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+5036, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5050, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35253, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35349, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144013,7 +144811,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35281, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35377, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144044,7 +144842,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35291, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35387, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144076,14 +144874,14 @@ 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+35312, libc.VaList(bp, z)) + ts+35408, 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 + 33695 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33791 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144139,7 +144937,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR __1: ; @@ -144182,7 +144980,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144356,7 +145154,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35345, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35441, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -144477,7 +145275,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -144501,28 +145299,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35381, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35477, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35392, 0) + ts+35488, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35472, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35568, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35480, 0) + ts+35576, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16864, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16911, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35632, 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+35542, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35638, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144580,7 +145378,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) != SQLITE_NULL { 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+17409, z) { + 0 == Xsqlite3_stricmp(tls, ts+17456, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -144593,12 +145391,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35558, + ts+35654, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20266 + return ts + 20361 } - return ts + 35595 + return ts + 35691 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145228,7 +146026,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+35607, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35703, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -145472,7 +146270,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+35628, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35724, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -145491,7 +146289,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+35650, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35746, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -145538,7 +146336,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35681) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35777) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -145547,7 +146345,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35694, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35790, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145561,7 +146359,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35785, ts + 33884, ts + 24884, ts + 34235, ts + 11405, + ts + 35881, ts + 33980, ts + 24979, ts + 34331, ts + 11419, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145585,7 +146383,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35792, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35888, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145603,13 +146401,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35792, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35888, 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+35797, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35893, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145664,17 +146462,17 @@ 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)) = [11]uintptr{ - ts + 35812, - ts + 35880, - ts + 35949, - ts + 35982, - ts + 36021, - ts + 36061, - ts + 36100, - ts + 36141, - ts + 36180, - ts + 36222, - ts + 36262, + ts + 35908, + ts + 35976, + ts + 36045, + ts + 36078, + ts + 36117, + ts + 36157, + ts + 36196, + ts + 36237, + ts + 36276, + ts + 36318, + ts + 36358, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145741,7 +146539,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3642, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145776,18 +146574,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36285, + ts+36381, 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+36389, + ts+36485, 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+36427, + ts+36523, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145799,7 +146597,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36465, + ts+36561, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145811,14 +146609,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24884, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11405, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35785, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24979, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11419, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35881, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34235, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34331, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33884, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33980, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145830,17 +146628,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36507, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36603, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36537, + ts+36633, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145877,27 +146675,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36581, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36677, 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+36604, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36700, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33884, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33980, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34235, ts+36610, 0, pzErr) + pConfig, ts+34331, ts+36706, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35785, ts+36642, 1, pzErr) + pConfig, ts+35881, ts+36738, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146103,12 +146901,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36659, + ts+36755, 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+36709, + ts+36805, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146116,7 +146914,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146292,7 +147090,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36738, + zSql = Xsqlite3_mprintf(tls, ts+36834, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -146474,14 +147272,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 40)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33884, bp+40) + rc = fts5StorageCount(tls, p, ts+33980, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34235, bp+48) + rc = fts5StorageCount(tls, p, ts+34331, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146676,9 +147474,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+36770) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36866) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36877) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146892,7 +147690,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 + 36792 + var zCat uintptr = ts + 36888 var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -146904,7 +147702,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36801) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36897) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -146915,18 +147713,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+36812) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36908) { 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+36770) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36866) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36877) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36801) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36897) { } else { rc = SQLITE_ERROR } @@ -147202,7 +148000,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)) = uintptr(0) - var zBase uintptr = ts + 36830 + var zBase uintptr = ts + 36926 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147342,7 +148140,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36840, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147350,11 +148148,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, 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+36848, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147362,7 +148160,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147370,7 +148168,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36856, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147378,11 +148176,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, 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+36864, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147390,19 +148188,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36869, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36965, 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+36873, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36879, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36975, 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+36884, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147410,11 +148208,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36888, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36984, 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+36892, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147422,7 +148220,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147430,11 +148228,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36899, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36995, 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+36903, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147442,7 +148240,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36907, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147450,7 +148248,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147458,7 +148256,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147474,24 +148272,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36919, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36899, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36925, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37021, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36915, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37011, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -147506,137 +148304,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36932, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36899, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36947, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37043, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37048, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36848, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36944, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36957, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37053, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36843, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36939, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36915, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37011, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15410, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15457, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36925, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37021, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36976, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37077, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36884, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36980, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36991, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37087, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } 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+37089, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36907, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37003, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37095, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36915, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37011, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36899, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37013, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36899, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36995, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37114, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37024, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37120, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37007, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37040, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37136, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37140, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36907, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37003, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37148, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37154, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37007, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37064, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37160, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36925, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37021, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147651,16 +148449,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37071, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36856, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36952, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37076, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37172, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147668,21 +148466,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37177, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37183, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37040, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37136, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147690,7 +148488,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37189, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147698,9 +148496,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37195, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147715,12 +148513,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37105, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37201, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37109, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37205, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37112, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147729,7 +148527,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37115, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37211, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147885,7 +148683,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+37119) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37215) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148065,22 +148863,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36830, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36926, 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 + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37230, 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 + 37140, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37236, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 @@ -149222,14 +150020,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+37155) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37251) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37159) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37255) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37163) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37259) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37172, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37268, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149255,19 +150053,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4)) = [3]uintptr{ - ts + 37206, - ts + 37246, - ts + 37281, + ts + 37302, + ts + 37342, + ts + 37377, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23180, *(*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+23275, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37324, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37420, 0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else { var nByte int32 @@ -149400,11 +150198,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+37357, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37453, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37388, + ts+37484, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -149428,7 +150226,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 68)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37439, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37535, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149712,7 +150510,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1527 + zCopy = ts + 1547 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -149823,7 +150621,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37465, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37561, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149845,7 +150643,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37475 + return ts + 37571 } func init() { @@ -150386,7 +151184,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch @@ -150696,16 +151494,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension @@ -150762,12 +151560,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 @@ -150782,6 +151580,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1052)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1060)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit @@ -150803,5 +151602,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go index 4dfe5a22f1..e7c31d8cf3 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_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_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -300,7 +300,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -833,7 +832,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -846,49 +845,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -897,21 +896,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -923,8 +922,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -936,22 +935,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -959,13 +958,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -980,13 +979,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0x0003 @@ -1510,7 +1509,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1606,6 +1605,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1741,6 +1741,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1771,6 +1772,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1871,6 +1873,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1944,7 +1948,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2052,8 +2056,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2471,6 +2475,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3373,7 +3378,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3704,6 +3718,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3714,6 +3729,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5253,6 +5286,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5292,6 +5336,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5342,7 +5387,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5357,6 +5402,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5725,8 +5771,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5743,7 +5788,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6005,8 +6049,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6351,17 +6395,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6391,7 +6424,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -6400,49 +6440,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 849, - ts + 875, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, ts + 895, - ts + 921, - ts + 944, - ts + 970, - ts + 992, - ts + 1013, - ts + 1024, - ts + 1032, - ts + 1046, - ts + 1059, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -6544,7 +6585,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -6592,10 +6632,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1092)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -6607,10 +6647,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -6620,21 +6656,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1079, - ts + 1083, - ts + 1088, - ts + 1092, - ts + 1100, - ts + 1105, + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, } // SQL is translated into a sequence of instructions to be @@ -6933,7 +6961,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7069,6 +7097,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7092,6 +7122,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7106,9 +7137,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7331,7 +7365,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1110, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -7357,13 +7391,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1118, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1126, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -7439,7 +7473,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -7461,7 +7495,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -7518,7 +7552,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1142) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 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))) @@ -7651,7 +7685,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1146, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -7675,12 +7709,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1169)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1189)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -7692,7 +7726,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1231) == 0 { if idx > 1 { return 1 } @@ -7714,7 +7748,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1216) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1236) == 0 { if idx > 1 { return 1 } @@ -7728,7 +7762,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1226) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -7736,7 +7770,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1236) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1256) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -7748,7 +7782,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1246) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -7782,9 +7816,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -7803,7 +7837,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1259, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1279, 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) { @@ -7817,14 +7851,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1269) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1289) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1275) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1295) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1300) == 0 { rc = 0 } break @@ -8150,7 +8184,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8160,13 +8194,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1289, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8184,41 +8218,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1321, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1307, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1327, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1284, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8231,7 +8265,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1332, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -8281,15 +8315,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1216}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1236}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1317}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1322}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1256}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1342}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1356}, + {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 + 1378}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1396}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -8440,7 +8474,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -8704,7 +8738,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1389, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1409, libc.VaList(bp, nByte)) } return p } @@ -8737,7 +8771,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1427, + ts+1447, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9148,7 +9182,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9184,7 +9218,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9204,7 +9238,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9253,24 +9287,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -9586,7 +9647,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -9659,8 +9720,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1497)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1530)) 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)}, @@ -9872,7 +9933,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1517, 1) + Xsqlite3_str_append(tls, pAccum, ts+1537, 1) goto __5 __11: ; @@ -10433,7 +10494,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1519 + bufpt = ts + 1539 length = 3 goto __58 __127: @@ -10493,7 +10554,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1523, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1543, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -10834,7 +10895,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1527 + bufpt = ts + 1547 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -10958,9 +11019,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1528 + return ts + 1548 } - return ts + 1533 + return ts + 1553 }() __220: ; @@ -11108,7 +11169,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1540, 1) + Xsqlite3_str_append(tls, pAccum, ts+1560, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11125,10 +11186,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1542, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1552, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11183,7 +11244,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1566)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1586)) // 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 @@ -11348,7 +11409,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1527, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1547, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -11580,20 +11641,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11606,46 +11773,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -12950,7 +13117,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1575 + var pow63 uintptr = ts + 1595 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -13496,7 +13663,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1594, + ts+1614, libc.VaList(bp, zType)) } @@ -13515,13 +13682,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1528) + logBadConnection(tls, ts+1548) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1639) + logBadConnection(tls, ts+1659) } return 0 } else { @@ -13534,7 +13701,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1648) + logBadConnection(tls, ts+1668) return 0 } else { return 1 @@ -14059,193 +14226,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1656, - ts + 1666, - ts + 1677, - ts + 1689, - ts + 1700, - ts + 1712, - ts + 1719, - ts + 1727, - ts + 1735, - ts + 1740, - ts + 1746, + ts + 1676, + ts + 1686, + ts + 1697, + ts + 1709, + ts + 1720, + ts + 1732, + ts + 1739, + ts + 1747, + ts + 1755, ts + 1760, - ts + 1766, - ts + 1776, - ts + 1781, - ts + 1786, - ts + 1789, - ts + 1795, - ts + 1808, - ts + 1818, - ts + 1822, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1860, + ts + 1765, + ts + 1771, + ts + 1785, + ts + 1791, + ts + 1801, + ts + 1806, + ts + 1811, + ts + 1814, + ts + 1820, + ts + 1827, + ts + 1831, + ts + 1841, + ts + 1848, + ts + 1855, + ts + 1862, ts + 1869, - ts + 1880, - ts + 1889, - ts + 1895, - ts + 1905, - ts + 1915, - ts + 1920, - ts + 1930, - ts + 1941, - ts + 1946, - ts + 1953, - ts + 1964, - ts + 1969, - ts + 1974, - ts + 1980, - ts + 1986, - ts + 1992, - ts + 1998, - ts + 2001, + ts + 1879, + ts + 1888, + ts + 1899, + ts + 1908, + ts + 1914, + ts + 1924, + ts + 1934, + ts + 1939, + ts + 1949, + ts + 1960, + ts + 1965, + ts + 1972, + ts + 1983, + ts + 1988, + ts + 1993, + ts + 1999, ts + 2005, - ts + 2016, - ts + 2027, + ts + 2011, + ts + 2014, + ts + 2018, + ts + 2024, ts + 2035, - ts + 2044, - ts + 2050, - ts + 2057, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, - ts + 2083, + ts + 2046, + ts + 2054, + ts + 2063, + ts + 2070, + ts + 2078, + ts + 2081, + ts + 2084, + ts + 2087, ts + 2090, - ts + 2100, - ts + 2113, - ts + 2124, - ts + 2130, - ts + 2137, - ts + 2142, - ts + 2151, - ts + 2160, - ts + 2167, - ts + 2180, - ts + 2191, - ts + 2196, - ts + 2204, + ts + 2093, + ts + 2096, + ts + 2103, + ts + 2109, + ts + 2119, + ts + 2132, + ts + 2143, + ts + 2149, + ts + 2156, + ts + 2165, + ts + 2174, + ts + 2181, + ts + 2194, + ts + 2205, ts + 2210, - ts + 2217, - ts + 2229, - ts + 2234, + ts + 2218, + ts + 2224, + ts + 2231, ts + 2243, ts + 2248, ts + 2257, ts + 2262, - ts + 2267, - ts + 2273, + ts + 2271, + ts + 2276, ts + 2281, - ts + 2289, - ts + 2299, - ts + 2307, - ts + 2314, - ts + 2327, - ts + 2332, - ts + 2344, - ts + 2352, - ts + 2359, - ts + 2370, - ts + 2377, + ts + 2287, + ts + 2295, + ts + 2303, + ts + 2313, + ts + 2321, + ts + 2328, + ts + 2341, + ts + 2346, + ts + 2358, + ts + 2366, + ts + 2373, ts + 2384, - ts + 2394, - ts + 2403, - ts + 2414, - ts + 2420, - ts + 2431, - ts + 2441, - ts + 2451, - ts + 2458, - ts + 2464, - ts + 2474, - ts + 2485, - ts + 2489, - ts + 2498, - ts + 2507, - ts + 2514, - ts + 2524, - ts + 2531, - ts + 2540, - ts + 2550, - ts + 2557, - ts + 2565, + ts + 2391, + ts + 2398, + ts + 2408, + ts + 2417, + ts + 2428, + ts + 2434, + ts + 2445, + ts + 2455, + ts + 2465, + ts + 2472, + ts + 2478, + ts + 2488, + ts + 2499, + ts + 2503, + ts + 2512, + ts + 2521, + ts + 2528, + ts + 2538, + ts + 2545, + ts + 2554, + ts + 2564, + ts + 2571, ts + 2579, - ts + 2587, + ts + 2593, ts + 2601, - ts + 2612, - ts + 2625, - ts + 2636, - ts + 2642, - ts + 2654, - ts + 2663, - ts + 2671, - ts + 2680, - ts + 2689, - ts + 2696, - ts + 2704, - ts + 2711, - ts + 2722, + ts + 2615, + ts + 2626, + ts + 2639, + ts + 2650, + ts + 2656, + ts + 2668, + ts + 2677, + ts + 2685, + ts + 2694, + ts + 2703, + ts + 2710, + ts + 2718, + ts + 2725, ts + 2736, - ts + 2747, - ts + 2755, + ts + 2750, ts + 2761, ts + 2769, - ts + 2777, - ts + 2787, - ts + 2800, - ts + 2810, - ts + 2823, - ts + 2832, - ts + 2843, - ts + 2851, + ts + 2775, + ts + 2783, + ts + 2791, + ts + 2801, + ts + 2814, + ts + 2824, + ts + 2837, + ts + 2846, ts + 2857, - ts + 2869, - ts + 2881, - ts + 2889, - ts + 2901, - ts + 2914, - ts + 2924, - ts + 2934, - ts + 2939, - ts + 2951, - ts + 2963, - ts + 2973, - ts + 2979, - ts + 2989, - ts + 2996, - ts + 3008, - ts + 3019, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3054, - ts + 3061, - ts + 3072, - ts + 3085, - ts + 3095, - ts + 3102, - ts + 3110, - ts + 3119, - ts + 3125, + ts + 2865, + ts + 2871, + ts + 2883, + ts + 2895, + ts + 2903, + ts + 2915, + ts + 2928, + ts + 2938, + ts + 2948, + ts + 2953, + ts + 2965, + ts + 2977, + ts + 2987, + ts + 2993, + ts + 3003, + ts + 3010, + ts + 3022, + ts + 3033, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3068, + ts + 3075, + ts + 3086, + ts + 3099, + ts + 3109, + ts + 3116, + ts + 3124, ts + 3133, - ts + 3141, - ts + 3149, - ts + 3159, - ts + 3168, - ts + 3179, - ts + 3189, - ts + 3195, - ts + 3206, - ts + 3217, - ts + 3222, - ts + 3230, + ts + 3139, + ts + 3147, + ts + 3155, + ts + 3163, + ts + 3173, + ts + 3182, + ts + 3193, + ts + 3203, + ts + 3209, + ts + 3220, + ts + 3231, + ts + 3236, + ts + 3244, } type pthread_once = struct { @@ -14672,35 +14839,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3240, FpCurrent: 0}, - {FzName: ts + 3245, FpCurrent: 0}, - {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, + {FzName: ts + 3254, FpCurrent: 0}, + {FzName: ts + 3259, FpCurrent: 0}, {FzName: ts + 3265, FpCurrent: 0}, - {FzName: ts + 3270, FpCurrent: 0}, - {FzName: ts + 3276, FpCurrent: 0}, - {FzName: ts + 3286, FpCurrent: 0}, - {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3297}, - {FzName: ts + 3303}, - {FzName: ts + 3311, FpCurrent: 0}, + {FzName: ts + 3272, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3284, FpCurrent: 0}, + {FzName: ts + 3290, FpCurrent: 0}, + {FzName: ts + 3300, FpCurrent: 0}, + {FzName: ts + 3306, FpCurrent: 0}, + {FzName: ts + 3311}, {FzName: ts + 3317}, - {FzName: ts + 3324}, - {FzName: ts + 3333, FpCurrent: 0}, - {FzName: ts + 3340}, - {FzName: ts + 3350, FpCurrent: 0}, - {FzName: ts + 3357, FpCurrent: 0}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3331}, + {FzName: ts + 3338}, + {FzName: ts + 3347, FpCurrent: 0}, + {FzName: ts + 3354}, + {FzName: ts + 3364, FpCurrent: 0}, {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3377, FpCurrent: 0}, - {FzName: ts + 3383, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3403, FpCurrent: 0}, - {FzName: ts + 3410}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, + {FzName: ts + 3397, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3412, FpCurrent: 0}, {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3438, FpCurrent: 0}, - {FzName: ts + 3444}, + {FzName: ts + 3424}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3452, FpCurrent: 0}, + {FzName: ts + 3458}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -14793,11 +14960,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3450, libc.VaList(bp, z, fd)) + ts+3464, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3493, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3507, O_RDONLY, int32(m)) < 0 { break } } @@ -14876,13 +15046,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__error(tls))) - zErr = ts + 1527 + zErr = ts + 1547 if zPath == uintptr(0) { - zPath = ts + 1527 + zPath = ts + 1547 } Xsqlite3_log(tls, errcode, - ts+3503, + ts+3517, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14890,7 +15060,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3245, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3259, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14911,7 +15081,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15013,19 +15183,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3534, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3548, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3558, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3572, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3587, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3601, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3614, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3628, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15388,7 +15558,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15661,7 +15831,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3642, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3656, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15679,7 +15849,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3357, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15696,14 +15866,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3645, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3659, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -15723,7 +15893,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -15778,7 +15948,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1527, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1547, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -15791,7 +15961,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3276, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -15859,7 +16029,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16018,7 +16188,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16046,7 +16216,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3276, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16109,7 +16279,7 @@ __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+3656, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3670, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16130,7 +16300,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3663, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3677, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -16145,7 +16315,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3240, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) goto shm_open_err __10: ; @@ -16271,11 +16441,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 224)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1527, 1, bp+224) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1547, 1, bp+224) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3311, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) goto shmpage_out __14: ; @@ -16321,7 +16491,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3398, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -16522,7 +16692,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3398 + var zErr uintptr = ts + 3412 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -16560,7 +16730,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -16675,10 +16845,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3676, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3690, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3681) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3695) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -16694,7 +16864,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -16707,7 +16877,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3691, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3705, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16715,7 +16885,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16728,15 +16898,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3699, - ts + 3708, - ts + 3717, - ts + 1540, + ts + 3713, + ts + 3722, + ts + 3731, + ts + 1560, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3722) - azTempDirs[1] = libc.Xgetenv(tls, ts+3736) + azTempDirs[0] = libc.Xgetenv(tls, ts+3736) + azTempDirs[1] = libc.Xgetenv(tls, ts+3750) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16781,7 +16951,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3743, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3757, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16866,7 +17036,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3760) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3774) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16914,10 +17084,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17031,7 +17201,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3240, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17122,7 +17292,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+3350, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) } return rc } @@ -17130,9 +17300,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+3767, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3781, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17199,18 +17369,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3438, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000 { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+224, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3429, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 224 + uintptr(got))) = int8(0) @@ -17250,14 +17420,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3258, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17311,7 +17481,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3642, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3656, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17339,11 +17509,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3773, O_RDONLY, uint16(0)) + fd = robust_open(tls, ts+3787, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -17354,7 +17524,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -17431,10 +17601,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3786, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3791, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3801, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3681, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3800, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3805, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3815, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3695, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -17489,7 +17659,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3814, + FzName: ts + 3828, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17656,40 +17826,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -17700,7 +17915,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3820, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3834, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17756,7 +17971,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -17832,7 +18047,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3642, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3656, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17953,7 +18168,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3835, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3849, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18026,7 +18241,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3858, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3872, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18089,6 +18304,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -18772,6 +18992,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18804,6 +19025,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21234,7 +21456,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3873, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3887, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -22371,7 +22593,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -22432,7 +22654,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3900, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3914, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -22445,7 +22667,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3909, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3923, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -22497,9 +22719,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3914, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22763,7 +22985,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22887,7 +23109,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22926,7 +23148,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23003,7 +23225,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23130,6 +23352,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24003,7 +24226,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24188,7 +24411,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3931, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3945, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24760,7 +24983,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24859,7 +25082,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25027,7 +25250,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3949, + ts+3963, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -25445,7 +25668,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -25590,7 +25813,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3986, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4000, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25720,7 +25943,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26193,7 +26416,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -26698,7 +26921,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27089,7 +27312,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4012)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4026)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27354,7 +27577,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -27491,7 +27714,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -27508,7 +27731,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -27516,7 +27739,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -27559,7 +27782,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -27569,7 +27792,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -27819,7 +28042,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27851,8 +28074,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27867,7 +28089,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -27877,7 +28099,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27890,7 +28112,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -27899,14 +28121,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -27916,7 +28138,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -27963,63 +28185,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28051,10 +28267,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28065,15 +28280,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28098,7 +28313,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28109,7 +28324,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28157,26 +28372,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28186,7 +28401,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28194,7 +28409,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28202,10 +28417,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28274,7 +28489,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -28304,11 +28519,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -28319,15 +28534,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28355,14 +28570,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -28376,7 +28591,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -28388,7 +28603,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -28491,7 +28706,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -28519,7 +28734,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -28558,7 +28773,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -28582,7 +28797,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -28631,7 +28846,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4028) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4042) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -29403,7 +29618,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4037, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4051, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -29441,7 +29656,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -29856,7 +30071,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29882,7 +30097,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -29890,6 +30105,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29899,7 +30117,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29915,7 +30133,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29976,7 +30194,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30011,7 +30229,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30071,7 +30289,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30110,7 +30328,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30141,7 +30359,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -30482,7 +30700,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30726,14 +30944,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30778,7 +30996,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30827,7 +31045,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -30906,10 +31124,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30917,7 +31133,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30979,7 +31196,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30999,7 +31216,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31019,7 +31236,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31231,7 +31448,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -31435,7 +31652,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -31500,7 +31717,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -31548,7 +31765,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -31667,7 +31884,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31827,7 +32044,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -31892,7 +32109,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -31928,7 +32145,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -31972,7 +32189,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32084,7 +32301,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32242,7 +32459,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -32299,7 +32516,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -32315,7 +32532,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -32389,7 +32606,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -32401,7 +32618,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -32412,7 +32629,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -32577,7 +32794,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32849,12 +33066,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -32862,7 +33079,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -32922,7 +33139,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33011,7 +33228,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33127,7 +33344,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -33445,7 +33662,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -33456,7 +33673,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -33614,7 +33831,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -33688,7 +33905,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -33750,7 +33967,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -33778,7 +33995,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34039,7 +34256,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34231,7 +34448,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34268,6 +34485,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -34358,7 +34577,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -34381,7 +34600,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -34461,7 +34680,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -34574,7 +34793,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -34635,7 +34854,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34673,13 +34892,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -34786,7 +35005,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34809,7 +35028,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34910,7 +35129,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -34918,11 +35137,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34997,7 +35216,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35066,7 +35285,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35095,7 +35314,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35171,7 +35390,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35185,7 +35404,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -35319,7 +35538,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35507,7 +35726,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4041, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4055, 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)) @@ -35532,11 +35751,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4043, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4057, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4066, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4080, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { @@ -35557,13 +35776,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4091, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4105, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4120, + ts+4134, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -35582,7 +35801,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4174, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4188, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -35593,7 +35812,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4196, libc.VaList(bp+8, iPage)) + ts+4210, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35616,12 +35835,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4235, + ts+4249, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4261 + return ts + 4275 } - return ts + 4266 + return ts + 4280 }(), expected-N, expected)) } @@ -35728,13 +35947,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4287 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4301 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4297, libc.VaList(bp, rc)) + ts+4311, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35745,7 +35964,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4335, libc.VaList(bp+8, rc)) + ts+4349, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35753,14 +35972,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4373, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4387, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4395 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4409 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35777,7 +35996,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4421 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4435 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35802,7 +36021,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4449, + checkAppendMsg(tls, pCheck, ts+4463, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35815,7 +36034,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4479, 0) + checkAppendMsg(tls, pCheck, ts+4493, 0) doCoverageCheck = 0 goto __10 __13: @@ -35831,7 +36050,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4503, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4517, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -35869,7 +36088,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4527, 0) + checkAppendMsg(tls, pCheck, ts+4541, 0) depth = d2 __21: ; @@ -35942,7 +36161,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4552, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4566, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -35959,7 +36178,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4589, + ts+4603, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36079,7 +36298,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4641 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4655 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)).FzPfx = uintptr(0) @@ -36115,7 +36334,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4657, + ts+4671, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36125,7 +36344,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4702, 0) + ts+4716, 0) __16: ; __10: @@ -36172,13 +36391,13 @@ __23: 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+4757, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4771, 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+4779, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4793, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -36413,6 +36632,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -36426,8 +36654,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -36435,7 +36663,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3642, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3656, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -36446,7 +36674,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4813, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4827, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -36461,7 +36689,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4833, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4847, 0) return SQLITE_ERROR } return SQLITE_OK @@ -36481,7 +36709,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4864, 0) + pDestDb, SQLITE_ERROR, ts+4878, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36929,7 +37157,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+4904, + Xsqlite3_str_appendf(tls, bp+8, ts+4918, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37346,6 +37574,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37361,7 +37602,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -37421,6 +37662,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -37503,7 +37747,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1527 + return ts + 1547 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -37735,7 +37979,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37967,7 +38211,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38029,7 +38273,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1527 + zNeg = ts + 1547 rc = SQLITE_OK __1: @@ -38070,7 +38314,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4911 + zNeg = ts + 4925 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38089,7 +38333,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4913, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4927, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -38393,7 +38637,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -38408,14 +38652,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -38474,6 +38718,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -38498,10 +38745,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -38539,21 +38786,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38902,85 +39157,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39080,6 +39367,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39107,7 +39404,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39115,12 +39412,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39139,7 +39436,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39190,7 +39489,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -39319,8 +39618,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -39331,10 +39630,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39345,6 +39640,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39360,34 +39660,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4918, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4932, 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 + 1527 + zColl = ts + 1547 } - if libc.Xstrcmp(tls, zColl, ts+1072) == 0 { - zColl = ts + 4923 + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 4937 } - Xsqlite3_str_appendf(tls, bp+144, ts+4925, + Xsqlite3_str_appendf(tls, bp+144, ts+4939, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4911 + return ts + 4925 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4933 + return ts + 4947 } - return ts + 1527 + return ts + 1547 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4936, 1) + Xsqlite3_str_append(tls, bp+144, ts+4950, 1) break } @@ -39395,7 +39695,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -39403,32 +39703,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4947, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1307, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1301, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -39438,13 +39738,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1307, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1327, 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+1301, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1321, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1528 + zP4 = ts + 1548 } else { - zP4 = ts + 4957 + zP4 = ts + 4971 } break @@ -39452,7 +39752,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4964, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4978, libc.VaList(bp+120, pVtab)) break } @@ -39463,20 +39763,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4972, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4986, 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+4977, 1) + Xsqlite3_str_append(tls, bp+144, ts+4991, 1) break } case -4: { - zP4 = ts + 4979 + zP4 = ts + 4993 break } @@ -39501,7 +39801,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4987, ts + 4989, ts + 4991, ts + 4996} +var encnames = [4]uintptr{ts + 5001, ts + 5003, ts + 5005, ts + 5010} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -39603,7 +39903,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39952,8 +40252,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5001, ts + 5006, ts + 5013, ts + 5016, ts + 5019, ts + 5022, ts + 5025, ts + 5028, - ts + 5036, ts + 5039, ts + 5046, ts + 5054, + ts + 5015, ts + 5020, ts + 5027, ts + 5030, ts + 5033, ts + 5036, ts + 5039, ts + 5042, + ts + 5050, ts + 5053, ts + 5060, ts + 5068, } // Close a VDBE cursor and release all the resources that cursor @@ -40162,7 +40462,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5061, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5075, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40170,16 +40470,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5073, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5087, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5101, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5102, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5116, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -40325,7 +40625,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5115, 0) + Xsqlite3VdbeError(tls, p, ts+5129, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -40605,7 +40905,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40615,14 +40915,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40633,16 +40935,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40659,7 +40957,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41210,16 +41508,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41237,7 +41539,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -41267,7 +41573,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41301,7 +41607,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41324,7 +41630,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -41346,7 +41652,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -41490,7 +41803,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -41661,7 +41974,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41687,7 +42000,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41730,7 +42043,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -41798,13 +42111,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5145 + zContext = ts + 5159 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5164 + zContext = ts + 5178 } else { - zContext = ts + 5183 + zContext = ts + 5197 } - zMsg = Xsqlite3_mprintf(tls, ts+5192, + zMsg = Xsqlite3_mprintf(tls, ts+5206, 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) @@ -41835,7 +42148,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41890,7 +42203,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41909,7 +42222,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5228, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5242, 0) return 1 } else { return 0 @@ -41919,7 +42232,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5273, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5287, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41961,14 +42274,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42180,6 +42494,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -42376,7 +42694,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5313, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5327, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -42567,7 +42885,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42642,7 +42960,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5336) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5350) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43071,35 +43389,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5346, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5360, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43114,7 +43431,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43146,7 +43463,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43161,7 +43478,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43172,7 +43489,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43182,7 +43499,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43258,7 +43575,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43402,7 +43719,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -43420,8 +43737,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -43485,7 +43805,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -43629,7 +43949,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -43801,7 +44121,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5386, 3) + Xsqlite3_str_append(tls, bp+48, ts+5400, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -43837,11 +44157,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1528, 4) + Xsqlite3_str_append(tls, bp+48, ts+1548, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1307, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1327, 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+4904, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4918, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43856,21 +44176,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5390, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5404, 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+5397, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5410, 2) + Xsqlite3_str_append(tls, bp+48, ts+5424, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5413, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5427, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5418, 1) + Xsqlite3_str_append(tls, bp+48, ts+5432, 1) } } } @@ -43926,7 +44246,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44030,12 +44351,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44087,11 +44407,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1088, - ts + 1100, - ts + 1105, - ts + 1083, - ts + 1528, + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1548, } // Execute as much of a VDBE program as we can. @@ -44129,7 +44449,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44158,11 +44477,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44232,42 +44554,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44275,52 +44598,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44362,19 +44685,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -44383,7 +44706,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -44391,11 +44714,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44631,7 +44954,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45127,20 +45450,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5420, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5434, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5441, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5455, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5448, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5462, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -45530,14 +45853,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45615,72 +45938,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45697,10 +46028,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -45712,33 +46043,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45747,43 +46078,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45799,26 +46130,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45826,12 +46157,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45846,17 +46177,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45871,163 +46202,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46036,20 +46367,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46059,15 +46390,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46075,9 +46406,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46089,52 +46420,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46143,24 +46474,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46174,13 +46505,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46189,38 +46520,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46229,10 +46560,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46240,10 +46571,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46251,35 +46582,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -46287,372 +46656,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46660,15 +47030,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46677,124 +47047,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5472, + Xsqlite3VdbeError(tls, p, ts+5486, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46804,40 +47174,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46855,339 +47225,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47196,20 +47566,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47220,244 +47590,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5513, 0) + Xsqlite3VdbeError(tls, p, ts+5527, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5564, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5578, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5586, 0) + ts+5600, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -47466,172 +47836,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5640, 0) + ts+5654, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5695 + return ts + 5709 } return func() uintptr { if iRollback != 0 { - return ts + 5743 + return ts + 5757 } - return ts + 5786 + return ts + 5800 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5827) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5841) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47651,36 +48021,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47688,22 +48058,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47714,24 +48084,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -47739,30 +48109,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47778,10 +48148,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47790,10 +48160,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47813,83 +48183,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1547 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47898,31 +48268,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47930,10 +48300,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47954,105 +48324,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48064,231 +48434,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48298,85 +48670,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -48384,59 +48756,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -48451,121 +48823,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -48573,93 +48945,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48672,7 +49044,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -48687,81 +49059,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48771,38 +49143,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48810,205 +49182,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49018,90 +49390,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49110,36 +49482,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49150,88 +49522,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -49243,35 +49615,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -49280,63 +49652,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49345,13 +49717,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -49359,20 +49731,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -49382,45 +49754,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -49433,10 +49805,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -49447,10 +49819,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -49458,30 +49830,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5872 + goto __797 +__796: + zSchema = ts + 5886 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5886, + ts+5900, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -49491,36 +49863,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -49528,10 +49900,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -49563,22 +49935,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -49588,15 +49960,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -49606,17 +49978,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -49626,34 +49998,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49662,48 +50034,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5929, 0) + Xsqlite3VdbeError(tls, p, ts+5943, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -49711,10 +50083,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49736,24 +50108,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49785,78 +50157,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49864,11 +50236,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49884,14 +50256,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -49899,16 +50271,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49916,16 +50288,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49936,10 +50308,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -49962,73 +50334,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50038,22 +50410,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50066,32 +50438,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50103,70 +50475,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5966, + ts+5980, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6018 + return ts + 6032 } - return ts + 6023 + return ts + 6037 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50174,17 +50546,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50194,10 +50566,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50211,10 +50583,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50224,69 +50596,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6030, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6044, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -50294,16 +50666,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -50316,17 +50688,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -50336,24 +50708,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50361,52 +50733,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5336, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5350, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -50415,54 +50787,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -50470,69 +50842,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -50544,27 +50916,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -50572,42 +50944,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50616,41 +50988,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50664,16 +51036,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50685,25 +51057,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50712,24 +51084,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50754,16 +51126,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -50778,66 +51150,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -50858,73 +51230,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3642, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6065, + Xsqlite3_log(tls, rc, ts+6079, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50932,13 +51304,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5313, 0) + Xsqlite3VdbeError(tls, p, ts+5327, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1463, 0) + Xsqlite3VdbeError(tls, p, ts+1483, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -50949,10 +51321,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6097, ts + 6106, ts + 6113, - ts + 6119} +var azType = [4]uintptr{ts + 6111, ts + 6120, ts + 6127, + ts + 6133} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51001,16 +51377,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6131, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6145, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6160 + return ts + 6174 } return func() uintptr { if type1 == U32(7) { - return ts + 6165 + return ts + 6179 } - return ts + 6170 + return ts + 6184 }() }())) rc = SQLITE_ERROR @@ -51030,10 +51406,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6178, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6192, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51043,8 +51419,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51064,7 +51440,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51084,8 +51460,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51093,21 +51469,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6198, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6212, 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+6228, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6242, 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+6264, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6278, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51116,8 +51492,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51150,8 +51526,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6285, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6299, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51178,7 +51554,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6306 + zFault = ts + 6320 __22: ; goto __20 @@ -51211,7 +51587,7 @@ __26: 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 + 6318 + zFault = ts + 6332 __29: ; goto __27 @@ -51231,8 +51607,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6326, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6340, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51301,7 +51677,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51329,12 +51705,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3642 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3656 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51378,7 +51754,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51461,7 +51837,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51474,7 +51850,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53914,11 +54290,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54078,7 +54450,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6360, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6374, zDb) == 0) { goto __8 } @@ -54199,7 +54571,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6365) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6379) != 0) { goto __33 } goto __14 @@ -54355,14 +54727,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6367, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6381, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6371, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6385, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -54379,7 +54751,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6375, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6389, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -54473,7 +54845,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54482,7 +54854,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54537,7 +54909,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6384, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6398, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -54545,14 +54917,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6415, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6429, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return WRC_Abort __87: ; @@ -54604,7 +54976,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6470, libc.VaList(bp+16, zCol)) + ts+6484, 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 @@ -54641,7 +55013,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6505 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6519 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54654,23 +55026,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6514 + zErr = ts + 6528 } else { - zErr = ts + 6529 + zErr = ts + 6543 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6551, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54773,15 +55145,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6581 + var zIn uintptr = ts + 6595 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6609 + zIn = ts + 6623 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6627 + zIn = ts + 6641 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6645 + zIn = ts + 6659 } - Xsqlite3ErrorMsg(tls, pParse, ts+6663, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6677, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54860,10 +55232,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6683 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6697 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54910,7 +55282,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6694, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6708, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54974,7 +55346,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6711, libc.VaList(bp, pExpr)) + ts+6725, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54990,7 +55362,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6775, + Xsqlite3ErrorMsg(tls, pParse, ts+6789, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55004,7 +55376,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6811, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6825, uintptr(0), pExpr) } } else { @@ -55027,30 +55399,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6839, libc.VaList(bp+16, pExpr)) + ts+6853, 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 + 6882 + zType = ts + 6896 } else { - zType = ts + 6889 + zType = ts + 6903 } - Xsqlite3ErrorMsg(tls, pParse, ts+6899, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6913, 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+6927, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6941, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6949, + Xsqlite3ErrorMsg(tls, pParse, ts+6963, 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+6993, + ts+7007, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55122,7 +55494,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7041, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7055, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55138,7 +55510,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7052, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7066, pExpr, pExpr) } break @@ -55194,7 +55566,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55269,7 +55641,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7063, libc.VaList(bp, i, zType, mx)) + ts+7077, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55289,7 +55661,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7133, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55324,7 +55696,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7153, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7167, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55381,7 +55753,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7159, libc.VaList(bp, i+1)) + ts+7173, libc.VaList(bp, i+1)) return 1 } } @@ -55409,7 +55781,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7220, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7234, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55623,7 +55995,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7251, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7265, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55663,7 +56035,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7153) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55674,7 +56046,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7290) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7304) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55686,7 +56058,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7296, 0) + ts+7310, 0) return WRC_Abort } @@ -55786,12 +56158,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -55827,12 +56199,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -55951,9 +56323,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -56041,14 +56411,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -56376,7 +56745,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) return } @@ -56451,7 +56820,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7355, libc.VaList(bp, mxHeight)) + ts+7369, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -56619,12 +56988,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56695,12 +57069,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7403, + Xsqlite3ErrorMsg(tls, pParse, ts+7417, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7447 + return ts + 7461 } - return ts + 1527 + return ts + 1547 }(), nElem)) break } @@ -56739,7 +57113,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56765,7 +57139,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7451, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7465, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56793,7 +57167,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7485, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7499, libc.VaList(bp, pExpr)) } } } @@ -56840,7 +57214,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7505, + Xsqlite3ErrorMsg(tls, pParse, ts+7519, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56865,7 +57239,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7548, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7562, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56886,11 +57260,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56919,7 +57290,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57015,7 +57390,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -57439,7 +57814,7 @@ __2: 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+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57562,7 +57937,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7601, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7615, libc.VaList(bp, zObject)) } } @@ -57572,10 +57947,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -57616,10 +57993,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6683) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6697) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6688) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6702) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58050,13 +58427,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7624) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7652) == 0 { return 1 } return 0 @@ -58260,7 +58637,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7642, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7656, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58338,7 +58715,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7889, + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59732,7 +60148,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59746,10 +60162,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59762,8 +60178,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59771,12 +60187,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59802,10 +60218,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59816,14 +60230,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59853,27 +60269,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59882,9 +60298,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59892,15 +60308,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7942, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7956, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59931,8 +60347,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7969, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7983, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60054,8 +60470,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60076,9 +60492,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60091,13 +60507,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7571, + Xsqlite3ErrorMsg(tls, pParse, ts+7585, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60108,11 +60524,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60134,12 +60550,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60154,14 +60570,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6452, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60169,9 +60609,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60181,15 +60621,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60199,22 +60639,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60223,51 +60663,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7993, 0) + ts+8007, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60276,18 +60716,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8043)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8057)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -60499,7 +60939,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60738,6 +61178,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60964,6 +61405,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61109,7 +61551,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61635,7 +62081,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61653,8 +62101,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61722,6 +62169,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61745,7 +62194,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61768,7 +62219,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61781,7 +62232,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61801,7 +62254,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61941,7 +62396,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61949,7 +62404,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62000,11 +62455,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 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+8059, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62016,13 +62471,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8087, + ts+8101, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8262, + ts+8276, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62032,10 +62487,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8436, libc.VaList(bp, zDb, zDb)) + ts+8450, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8583, 0) + ts+8597, 0) } } @@ -62099,7 +62554,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8734, libc.VaList(bp, zName)) + ts+8748, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62109,7 +62564,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8793, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8807, zName)) { goto __6 } goto exit_rename_table @@ -62118,7 +62573,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8813, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62159,19 +62614,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8826, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8840, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9010, + ts+9024, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9315, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9329, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9331, + ts+9345, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62179,7 +62634,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9389, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9403, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62191,7 +62646,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9654, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9668, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62203,7 +62658,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9667, + ts+9681, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62249,12 +62704,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9705, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9719, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9737, 0) + ts+9751, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62264,11 +62719,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9764) + ts+9778) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9823) + ts+9837) } if pDflt != 0 { @@ -62281,12 +62736,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9876) + ts+9890) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9922) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9936) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62297,7 +62752,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9949, + ts+9963, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62319,7 +62774,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10095, + ts+10109, libc.VaList(bp+40, zTab, zDb)) } } @@ -62367,14 +62822,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10325, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10339, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10359, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10373, 0) goto exit_begin_add_column __4: ; @@ -62402,7 +62857,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10389, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10403, 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 } @@ -62442,18 +62897,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10408 + zType = ts + 10422 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10413 + zType = ts + 10427 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10427, + Xsqlite3ErrorMsg(tls, pParse, ts+10441, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10445 + return ts + 10459 } - return ts + 10462 + return ts + 10476 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62537,11 +62992,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -62554,17 +63009,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10501, + ts+10515, 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+10683, + ts+10697, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9654, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9668, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62759,7 +63214,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -62822,12 +63277,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10814, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10828, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -62867,8 +63322,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10839, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10853, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62885,7 +63340,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62907,7 +63362,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10847, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10861, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62947,12 +63402,12 @@ 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+10853, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10867, 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 + 10837 + return ts + 10851 } - return ts + 1527 + return ts + 1547 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63126,8 +63581,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63210,15 +63665,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63246,7 +63701,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63279,13 +63734,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63298,7 +63753,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63313,7 +63768,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -63369,8 +63824,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -63418,7 +63873,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -63438,7 +63893,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -63486,8 +63941,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63529,11 +63984,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -63603,7 +64058,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1527, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1547, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -63626,8 +64081,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63645,16 +64100,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63669,31 +64124,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63711,8 +64166,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63738,9 +64193,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63768,8 +64223,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -63806,7 +64261,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -63830,7 +64285,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10858, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10872, 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) @@ -63911,19 +64366,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10480, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pName)) goto exit_drop_column __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+10865, + Xsqlite3ErrorMsg(tls, pParse, ts+10879, 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 + 10893 + return ts + 10907 } - return ts + 6106 + return ts + 6120 }(), zCol)) goto exit_drop_column @@ -63932,7 +64387,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10905, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10919, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63946,13 +64401,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1527, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10953, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10967, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11074, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11088, 1) 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 @@ -64070,11 +64525,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11092}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11133}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11152}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11171}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11106}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11127}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11147}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11166}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11185}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64108,7 +64563,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11194, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11208, 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) } @@ -64117,10 +64572,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+11217, + ts+11231, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11247, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11261, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64138,9 +64593,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11265, FzCols: ts + 11278}, - {FzName: ts + 11291, FzCols: ts + 11304}, - {FzName: ts + 11332}, + {FzName: ts + 11279, FzCols: ts + 11292}, + {FzName: ts + 11305, FzCols: ts + 11318}, + {FzName: ts + 11346}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64331,7 +64786,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11345} + FzName: ts + 11359} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -64582,7 +65037,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11355} + FzName: ts + 11369} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -64596,7 +65051,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11365, + Xsqlite3_str_appendf(tls, bp+24, ts+11379, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -64609,7 +65064,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11370, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11384, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64651,7 +65106,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11376, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11390, 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)).FnChar-- @@ -64665,7 +65120,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11382} + FzName: ts + 11396} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64709,7 +65164,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11391, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11405, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64726,7 +65181,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+11265, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11279, 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, -6) @@ -64882,7 +65337,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64939,7 +65394,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+11401, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11415, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64986,9 +65441,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+11405) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11419) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11409) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11423) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65071,7 +65526,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1527 + z = ts + 1547 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65093,15 +65548,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+11413, z) == 0 { + if Xsqlite3_strglob(tls, ts+11427, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11424, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11438, 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+11434, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11448, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -65377,11 +65832,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11291, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11305, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11446, - ts+11500, + ts+11460, + ts+11514, zDb) } return rc @@ -65428,10 +65883,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11265, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11279, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11552, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11566, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65489,7 +65944,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6360, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6374, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -65519,20 +65974,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1527 + zFile = ts + 1547 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1527 + zName = ts + 1547 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3814) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3828) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -65548,13 +66003,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11593, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11607, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11596, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11610, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -65568,7 +66023,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11633, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11647, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -65579,7 +66034,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -65632,7 +66087,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11663, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11677, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65649,7 +66104,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11692, 0) + ts+11706, 0) rc = SQLITE_ERROR __23: ; @@ -65715,13 +66170,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1463, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11760, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11774, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65768,7 +66223,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1527 + zName = ts + 1547 __1: ; i = 0 @@ -65799,14 +66254,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11788, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11802, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11809, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11823, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65814,7 +66269,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11835, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11849, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65925,7 +66380,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11857} + FzName: ts + 11871} // Called by the parser to compile an ATTACH statement. // @@ -65938,7 +66393,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11871} + FzName: ts + 11885} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65952,7 +66407,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11885, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11899, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65984,7 +66439,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+11909, + ts+11923, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66159,7 +66614,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11955, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11969, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66185,11 +66640,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+11978, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11984, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11998, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11990, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12004, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66236,7 +66691,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7632 + zCol = ts + 7646 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66260,7 +66715,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+12017, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12031, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66354,6 +66809,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66381,9 +66838,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -66402,62 +66858,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -66504,13 +66952,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66535,25 +66983,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6360) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6374) == 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+8051, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12065) + ts+12079) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5872) + ts+5886) } } } @@ -66574,12 +67022,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12051+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5872) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12032+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5886) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12065) + ts+12079) } } } @@ -66608,9 +67056,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12084, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12098, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -66621,21 +67069,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12092 + zMsg = ts + 12106 } else { - zMsg = ts + 12105 + zMsg = ts + 12119 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6564, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6574, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66665,12 +67113,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8051, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5872+7) == 0 { - return ts + 12051 + if Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { + return ts + 12065 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { - return ts + 12032 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12079+7) == 0 { + return ts + 12046 } } return zName @@ -66775,10 +67223,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -66934,11 +67382,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66955,7 +67403,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -66984,7 +67432,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67028,7 +67476,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5872) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5886) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67054,7 +67502,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6360, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6374, zName) { goto __3 } @@ -67107,13 +67555,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+12119, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12133, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12136, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12150, libc.VaList(bp, pName1)) return -1 } } else { @@ -67151,13 +67599,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8051, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8065, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12156, + Xsqlite3ErrorMsg(tls, pParse, ts+12170, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67317,9 +67765,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67335,7 +67783,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12212, 0) return __4: ; @@ -67363,9 +67811,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), zName) != 0) { goto __8 } @@ -67381,9 +67829,9 @@ __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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67414,12 +67862,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12239, + Xsqlite3ErrorMsg(tls, pParse, ts+12253, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10408 + return ts + 10422 } - return ts + 8793 + return ts + 8807 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67434,7 +67882,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12274, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67469,8 +67917,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -67491,7 +67939,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -67521,7 +67969,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12295, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12309, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67545,7 +67993,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12326, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67554,7 +68002,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -67565,7 +68013,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12295 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12309 (*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) @@ -67577,7 +68025,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12295, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12309, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -67611,7 +68059,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -67619,13 +68067,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12369, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12383, 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)).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+12376, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12390, 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)).Fn-- @@ -67662,7 +68110,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+12386, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67826,10 +68274,10 @@ 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+12412, + Xsqlite3ErrorMsg(tls, pParse, ts+12426, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12471, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -67860,7 +68308,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12498, 0) + ts+12512, 0) } } @@ -67905,7 +68353,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12550, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12564, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67994,7 +68442,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12591, 0) + ts+12605, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68020,7 +68468,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -68089,7 +68537,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12647, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12661, 0) goto generated_done __2: ; @@ -68102,13 +68550,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12690, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12704, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12698, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12712, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68141,7 +68589,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12705, + Xsqlite3ErrorMsg(tls, pParse, ts+12719, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68262,13 +68710,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1527 - zSep2 = ts + 12736 - zEnd = ts + 4936 + zSep = ts + 1547 + zSep2 = ts + 12750 + zEnd = ts + 4950 } else { - zSep = ts + 12738 - zSep2 = ts + 12742 - zEnd = ts + 12747 + zSep = ts + 12752 + zSep2 = ts + 12756 + zEnd = ts + 12761 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68276,7 +68724,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12750, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12764, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -68310,16 +68758,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3642, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3656, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1527, - ts + 12764, - ts + 12770, - ts + 12775, - ts + 12780, + ts + 1547, + ts + 12778, + ts + 12784, + ts + 12789, + ts + 12794, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -68458,8 +68906,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -68586,7 +69034,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -68610,7 +69058,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -68709,7 +69157,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1527, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1547, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -68726,10 +69174,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+12786, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) + ts+12800, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12819, + Xsqlite3ErrorMsg(tls, pParse, ts+12833, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68748,11 +69196,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+12846, 0) + ts+12860, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12896, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12910, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68786,7 +69234,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12928, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12942, 0) return } } @@ -68811,11 +69259,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8793 - zType2 = ts + 12972 + zType = ts + 8807 + zType2 = ts + 12986 } else { - zType = ts + 10408 - zType2 = ts + 12978 + zType = ts + 10422 + zType2 = ts + 12992 } if pSelect != 0 { @@ -68877,7 +69325,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -68886,11 +69334,11 @@ 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+12983, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12997, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12998, + ts+13012, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68906,13 +69354,13 @@ 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+13096, + ts+13110, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13138, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13152, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68927,7 +69375,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9315) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9329) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68957,7 +69405,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+13172, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13186, 0) goto create_view_fail __1: ; @@ -68973,7 +69421,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10408, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10422, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69036,10 +69484,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69057,12 +69502,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13208, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69122,6 +69563,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69181,13 +69629,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13238, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13252, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13253, + ts+13267, 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) } @@ -69228,10 +69676,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13320, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13334, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11217, + ts+11231, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69263,12 +69711,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13334, + ts+13348, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13379, + ts+13393, 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) @@ -69296,11 +69744,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3265, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7052, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7066, 10) == 0 { return 0 } return 1 @@ -69378,9 +69826,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -69439,21 +69887,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13446, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13460, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13474, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13488, 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+13508, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13522, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69465,7 +69913,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11409, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11423, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69529,7 +69977,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13540, + ts+13554, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -69541,7 +69989,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13603, 0) + ts+13617, 0) goto fk_end goto __7 __6: @@ -69626,7 +70074,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13697, + ts+13711, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -69853,12 +70301,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13743, + Xsqlite3ErrorMsg(tls, pParse, ts+13757, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13771 + return ts + 13785 } - return ts + 13777 + return ts + 13791 }())) return 1 } @@ -69979,7 +70427,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13782, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13796, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -69998,7 +70446,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13788, + ts+13802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70024,26 +70472,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13838, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13852, 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+13866, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13880, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13891, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13905, 0) goto exit_create_index __17: ; @@ -70057,7 +70505,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13782, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13796, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70069,10 +70517,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13925, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13939, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70084,7 +70532,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13959, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13973, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70113,7 +70561,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13983, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13997, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70134,9 +70582,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70175,7 +70623,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13782) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13796) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70276,7 +70724,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14006, 0) + ts+14020, 0) goto exit_create_index __56: ; @@ -70290,6 +70738,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -70310,6 +70759,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -70491,7 +70941,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14067, libc.VaList(bp+48, 0)) + ts+14081, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70543,8 +70993,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14109, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14123, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -70590,12 +71040,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14126, + zStmt = Xsqlite3MPrintf(tls, db, ts+14140, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1527 + return ts + 1547 } - return ts + 14146 + return ts + 14160 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70603,7 +71053,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14154, + ts+14168, 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, @@ -70617,7 +71067,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14213, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14227, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70778,7 +71228,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14240, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14254, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70793,7 +71243,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14258, libc.VaList(bp+8, 0)) + ts+14272, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70804,9 +71254,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70832,9 +71282,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14331, + ts+14345, 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+11405, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11419, (*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) @@ -70915,6 +71365,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70922,7 +71373,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70968,7 +71419,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+14391, + Xsqlite3ErrorMsg(tls, pParse, ts+14405, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71103,6 +71554,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71114,11 +71566,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -71145,7 +71599,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71173,12 +71627,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14427, + Xsqlite3ErrorMsg(tls, pParse, ts+14441, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14463 + return ts + 14477 } - return ts + 14466 + return ts + 14480 }())) goto append_from_error __1: @@ -71347,7 +71801,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14472, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14486, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71383,9 +71837,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14478 + return ts + 14492 } - return ts + 14487 + return ts + 14501 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71410,7 +71864,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14472, ts + 14494, ts + 14478} +var az = [3]uintptr{ts + 14486, ts + 14508, ts + 14492} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71425,7 +71879,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14502, 0) + ts+14516, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71443,7 +71897,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11992, 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+14586, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14600, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71729,7 +72183,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14595, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71825,7 +72279,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+14641, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, zName)) } } } @@ -71925,7 +72379,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71939,7 +72393,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72018,7 +72472,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14671, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14685, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72145,7 +72599,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72179,7 +72633,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72202,26 +72656,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -72287,10 +72742,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14716, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -72303,19 +72774,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14702, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14749, 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+14731, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14778, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -72542,17 +73015,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -72565,10 +73040,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -72577,15 +73052,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -72594,98 +73069,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72693,138 +73168,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14816) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72927,7 +73407,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+11265) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11279) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73157,7 +73637,7 @@ 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 + 6170, ts + 6165, ts + 7924, ts + 7919, ts + 6160} +var azType2 = [5]uintptr{ts + 6184, ts + 6179, ts + 7938, ts + 7933, ts + 6174} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73216,7 +73696,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) return } iVal = -iVal @@ -73520,7 +74000,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14799, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14846, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73710,7 +74190,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73823,13 +74303,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73852,7 +74346,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14804, -1) + Xsqlite3_result_error(tls, context, ts+14851, -1) return } if argc == 3 { @@ -73862,7 +74356,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14837, -1) + ts+14884, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73915,7 +74409,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3642, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3656, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73955,13 +74449,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4904, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4918, 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+14882, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14929, libc.VaList(bp+8, r1)) } } break @@ -73969,7 +74463,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1307, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1327, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -73998,13 +74492,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14889, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1528, 4) + Xsqlite3_str_append(tls, pStr, ts+1548, 4) break } @@ -74314,7 +74808,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10837} +var azOne = [1]uintptr{ts + 10851} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74326,7 +74820,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1527 + zIn = ts + 1547 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -74350,7 +74844,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14892, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14939, 4, uintptr(0)) } } @@ -74375,7 +74869,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12017, -1) + Xsqlite3_result_error(tls, context, ts+12031, -1) return } @@ -74453,7 +74947,7 @@ func sumFinalize(tls *libc.TLS, context 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+14782, -1) + Xsqlite3_result_error(tls, context, ts+14829, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74715,7 +75209,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14897, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14944, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74735,14 +75229,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14903, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14950, 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+14903, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14903, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74982,107 +75476,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14908}, - {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 + 14928}, - {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 + 14941}, - {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 + 14959}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14968}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14976}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14991}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15017}, - {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 + 15042}, - {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 + 15051}, - {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 + 15062}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15069}, - {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 + 15083}, - {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 + 15083}, - {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 + 15089}, - {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 + 15089}, - {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 + 15095}, - {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 + 15095}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15100}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15100}, - {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 + 15100}, - {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 + 15104}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15104}, - {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 + 15104}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15108}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15136}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15179}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15185}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15189}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15236}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15253}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15296}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15310}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {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 + 15344}, - {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 + 15348}, - {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 + 15354}, - {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 + 15358}, - {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 + 15358}, - {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 + 15364}, - {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 + 15364}, - {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 + 15377}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14903}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6505}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15387}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, - {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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15407}, - {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 + 15410}, - {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 + 15414}, - {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 + 15420}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15429}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(2), 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 + 15443}, + {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 + 14955}, + {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 + 14975}, + {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 + 14988}, + {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 + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15015}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15038}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15064}, + {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 + 15089}, + {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 + 15098}, + {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 + 15109}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15116}, + {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 + 15130}, + {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 + 15130}, + {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 + 15136}, + {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 + 15136}, + {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 + 15142}, + {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 + 15142}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15147}, + {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 + 15147}, + {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 + 15151}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15151}, + {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 + 15151}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15155}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15170}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15183}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(1), 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 + 15205}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, + {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 + 15220}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15226}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15236}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15243}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15283}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15300}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15311}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15335}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15343}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15357}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {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 + 15391}, + {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 + 15395}, + {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 + 15401}, + {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 + 15405}, + {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 + 15405}, + {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 + 15411}, + {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 + 15411}, + {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 + 15424}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, + {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 + 15442}, {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(2), 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 + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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(1)), FxSFunc: 0, FzName: ts + 15457}, + {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 + 15461}, + {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 + 15467}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15457}, {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 + 15476}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15481}, - {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}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15503}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15509}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, - {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 + 15533}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6505}, - {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 + 15538}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(2), 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 + 15490}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15495}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15511}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15515}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15523}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15528}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15533}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15544}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15550}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15556}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15561}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15569}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15580}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6519}, + {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 + 15585}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75203,7 +75697,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+15542, + ts+15589, 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) @@ -75863,8 +76357,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6371, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6367, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6385, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6381, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75943,7 +76437,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5115) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5129) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -76045,7 +76539,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76153,6 +76647,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76193,13 +76708,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76211,21 +76725,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -76296,7 +76800,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -76354,7 +76858,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7889, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76657,6 +77161,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76820,7 +77326,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15587, + ts+15634, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -76845,7 +77351,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15628, + Xsqlite3ErrorMsg(tls, pParse, ts+15675, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76994,7 +77500,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15660, + ts+15707, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77004,7 +77510,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15712, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15759, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77056,7 +77562,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15737, + Xsqlite3ErrorMsg(tls, pParse, ts+15784, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77064,7 +77570,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15830, 0) goto insert_cleanup __57: ; @@ -77246,7 +77752,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77261,137 +77780,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -77403,64 +77922,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15804) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15851) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -77468,7 +77991,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77771,7 +78298,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11992, 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) @@ -78861,13 +79388,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1527 + zSql = ts + 1547 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -79306,6 +79833,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79344,7 +79872,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12017, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12031, 0) __3: ; return SQLITE_ERROR @@ -79353,7 +79881,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15818 + zEntry = ts + 15865 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79368,7 +79896,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11978, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79404,7 +79932,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15841, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15888, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79418,7 +79946,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15850, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15897, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79442,7 +79970,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15854, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15901, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79460,7 +79988,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15860, libc.VaList(bp+16, zEntry, zFile)) + ts+15907, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -79487,7 +80015,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15903, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15950, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -79525,7 +80053,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15935, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15982, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -79535,7 +80063,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15972, + ts + 16019, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79691,7 +80219,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15975, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16022, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79699,63 +80227,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5036, - ts + 16014, - ts + 8793, - ts + 16018, - ts + 16023, - ts + 16026, - ts + 16036, - ts + 16046, - ts + 16052, - ts + 16056, - ts + 16061, - ts + 16066, - ts + 16074, - ts + 16085, - ts + 16088, - ts + 16095, - ts + 16056, + ts + 5050, ts + 16061, - ts + 16102, - ts + 16107, - ts + 16110, - ts + 16117, - ts + 16052, - ts + 16056, - ts + 16123, - ts + 16128, - ts + 16133, - ts + 16056, - ts + 16137, - ts + 16061, - ts + 16145, + ts + 8807, + ts + 16065, + ts + 16070, + ts + 16073, + ts + 16083, + ts + 16093, + ts + 16099, + ts + 16103, + ts + 16108, + ts + 16113, + ts + 16121, + ts + 16132, + ts + 16135, + ts + 16142, + ts + 16103, + ts + 16108, ts + 16149, ts + 16154, - ts + 11409, - ts + 11405, - ts + 16160, - ts + 16165, + ts + 16157, + ts + 16164, + ts + 16099, + ts + 16103, ts + 16170, - ts + 16014, - ts + 16056, ts + 16175, - ts + 16182, - ts + 16189, - ts + 8793, - ts + 16197, - ts + 5039, - ts + 16203, - ts + 16014, - ts + 16056, - ts + 16208, - ts + 16213, - ts + 15410, - ts + 16218, - ts + 16231, - ts + 16240, - ts + 16247, - ts + 16258, + ts + 16180, + ts + 16103, + ts + 16184, + ts + 16108, + ts + 16192, + ts + 16196, + ts + 16201, + ts + 11423, + ts + 11419, + ts + 16207, + ts + 16212, + ts + 16217, + ts + 16061, + ts + 16103, + ts + 16222, + ts + 16229, + ts + 16236, + ts + 8807, + ts + 16244, + ts + 5053, + ts + 16250, + ts + 16061, + ts + 16103, + ts + 16255, + ts + 16260, + ts + 15457, + ts + 16265, + ts + 16278, + ts + 16287, + ts + 16294, + ts + 16305, } // Definitions of all built-in pragmas @@ -79773,238 +80301,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16266, + {FzName: ts + 16313, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16281, + {FzName: ts + 16328, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16296, + {FzName: ts + 16343, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16308, + {FzName: ts + 16355, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16324, + {FzName: ts + 16371, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16247, + {FzName: ts + 16294, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16337, + {FzName: ts + 16384, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16349, + {FzName: ts + 16396, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16369, + {FzName: ts + 16416, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16385, + {FzName: ts + 16432, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16406, + {FzName: ts + 16453, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16421, + {FzName: ts + 16468, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16437, + {FzName: ts + 16484, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16451, + {FzName: ts + 16498, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16464, + {FzName: ts + 16511, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16478, + {FzName: ts + 16525, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16497, + {FzName: ts + 16544, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16516, + {FzName: ts + 16563, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16539, + {FzName: ts + 16586, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16548, + {FzName: ts + 16595, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16566, + {FzName: ts + 16613, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16583, + {FzName: ts + 16630, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16596, + {FzName: ts + 16643, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16611, + {FzName: ts + 16658, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16629, + {FzName: ts + 16676, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16639, + {FzName: ts + 16686, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16653, + {FzName: ts + 16700, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16669, + {FzName: ts + 16716, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16694, + {FzName: ts + 16741, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16713, + {FzName: ts + 16760, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16724, + {FzName: ts + 16771, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16735, + {FzName: ts + 16782, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16747, + {FzName: ts + 16794, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16763, + {FzName: ts + 16810, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16776, + {FzName: ts + 16823, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16795, + {FzName: ts + 16842, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16814, + {FzName: ts + 16861, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16827, + {FzName: ts + 16874, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16842, + {FzName: ts + 16889, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16852, + {FzName: ts + 16899, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16873, + {FzName: ts + 16920, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16884, + {FzName: ts + 16931, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16894, + {FzName: ts + 16941, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16906, + {FzName: ts + 16953, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16917, + {FzName: ts + 16964, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16929, + {FzName: ts + 16976, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16946, + {FzName: ts + 16993, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16965, + {FzName: ts + 17012, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16991, + {FzName: ts + 17038, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17006, + {FzName: ts + 17053, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17020, + {FzName: ts + 17067, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17039, + {FzName: ts + 17086, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17053, + {FzName: ts + 17100, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17069, + {FzName: ts + 17116, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17081, + {FzName: ts + 17128, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17092, + {FzName: ts + 17139, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17103, + {FzName: ts + 17150, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17115, + {FzName: ts + 17162, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17126, + {FzName: ts + 17173, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17147, + {FzName: ts + 17194, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17155, + {FzName: ts + 17202, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17170, + {FzName: ts + 17217, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17183, + {FzName: ts + 17230, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17202, + {FzName: ts + 17249, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17217, + {FzName: ts + 17264, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80026,7 +80554,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17233)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17280)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80038,10 +80566,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17258) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17305) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17268) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17315) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80050,13 +80578,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7937) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7951) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17280) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17327) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80071,9 +80599,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16208) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16255) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17292) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17339) == 0 { return 2 } else { return 0 @@ -80087,7 +80615,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17299, 0) + ts+17346, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80178,19 +80706,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17361 + zName = ts + 17408 break case OE_SetDflt: - zName = ts + 17370 + zName = ts + 17417 break case OE_Cascade: - zName = ts + 17382 + zName = ts + 17429 break case OE_Restrict: - zName = ts + 17390 + zName = ts + 17437 break default: - zName = ts + 17399 + zName = ts + 17446 break } return zName @@ -80207,7 +80735,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17409, ts + 17416, ts + 17424, ts + 17428, ts + 17292, ts + 17437, + ts + 17456, ts + 17463, ts + 17471, ts + 17475, ts + 17339, ts + 17484, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80254,13 +80782,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17441 + zType = ts + 17488 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17443 + zType = ts + 17490 } else { - zType = ts + 7447 + zType = ts + 7461 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17445, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17492, 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), @@ -80268,7 +80796,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17452, ts + 17457, ts + 17465} +var azEnc = [4]uintptr{uintptr(0), ts + 17499, ts + 17504, ts + 17512} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80293,8 +80821,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -80401,13 +80929,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -80427,6 +80964,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -80477,7 +81016,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -80492,7 +81031,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -80502,7 +81041,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17473, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17520, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -80519,30 +81058,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80763,7 +81302,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17477) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17524) == 0) { goto __64 } b = 2 @@ -80797,7 +81336,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -80806,36 +81345,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17268 + zRet = ts + 17315 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80873,7 +81412,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17258 + zRet = ts + 17305 __83: ; returnSingleText(tls, v, zRet) @@ -80954,21 +81493,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81010,15 +81549,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81055,14 +81594,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81081,17 +81620,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81102,7 +81641,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81114,12 +81653,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81156,11 +81695,11 @@ __123: if !(*(*int8)(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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17482, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17529, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81179,7 +81718,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81201,7 +81740,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17507, 0) + ts+17554, 0) goto __133 __132: if !(iDb != 1) { @@ -81255,7 +81794,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17560) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17607) == 0) { goto __142 } @@ -81352,13 +81891,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17566 + return ts + 17613 } - return ts + 17574 + return ts + 17621 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1527), + Xsqlite3ColumnType(tls, pCol, ts+1547), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -81423,20 +81962,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17581, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17628, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1463, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1483, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -81469,29 +82008,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10408 + zType = ts + 10422 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12690 + zType = ts + 12704 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17597 + zType = ts + 17644 goto __183 __182: - zType = ts + 8793 + zType = ts + 8807 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17651, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -81557,7 +82096,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -81567,7 +82106,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17616, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17663, 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)))) @@ -81604,12 +82143,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17621, ts + 17623, ts + 16085} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17625, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17668, ts + 17670, ts + 16132} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17672, 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)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -81638,7 +82177,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17631, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17678, 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))) @@ -81654,13 +82193,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17635, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17682, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81699,7 +82238,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -81718,13 +82257,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81740,7 +82279,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7447, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -81775,7 +82314,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81783,7 +82322,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17647)) + ts+17694)) goto __227 __227: j2++ @@ -81856,20 +82395,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -81907,12 +82446,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -81929,8 +82468,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -81943,11 +82482,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -81972,10 +82511,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17652, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17699, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82013,17 +82552,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82039,7 +82578,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82189,7 +82728,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+17656, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17703, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82216,178 +82755,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17727, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17763, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17783, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17805, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17828, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17830, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17722, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17850, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17752) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17880) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17757) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17885) 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) @@ -82395,87 +83063,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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 __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17778) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17906) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17805) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17933) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -82493,14 +83167,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17834 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17962 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -82508,27 +83182,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -82537,25 +83211,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17837, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17965, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -82563,50 +83237,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -82621,31 +83302,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17275) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17322) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17862) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17990) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17428) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17475) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -82655,10 +83336,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -82678,19 +83359,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82699,86 +83380,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17870, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17998, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82786,60 +83467,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82847,10 +83528,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82883,6 +83564,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82894,14 +83583,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17888, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17893, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17899, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17908, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17917, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17925, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17933}, - {FzName: ts + 17940}, + {FzName: ts + 18016, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18021, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18045, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18053, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18061}, + {FzName: ts + 18068}, {}, } var setCookie = [2]VdbeOpList{ @@ -82953,7 +83642,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+17946) + Xsqlite3_str_appendall(tls, bp+32, ts+18074) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82961,7 +83650,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17961, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18089, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -82974,19 +83663,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, 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+17974) + Xsqlite3_str_appendall(tls, bp+32, ts+18102) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17986) + Xsqlite3_str_appendall(tls, bp+32, ts+18114) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4936, 1) + Xsqlite3_str_append(tls, bp+32, ts+4950, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83002,7 +83691,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83150,7 +83839,7 @@ __1: 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+3642, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83166,13 +83855,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+18001) + Xsqlite3_str_appendall(tls, bp+32, ts+18129) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18009, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18137, 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+18013, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18141, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83181,7 +83870,7 @@ __3: 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+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83249,33 +83938,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18017, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18145, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4987 + zObj = ts + 5001 } - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18173, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18076, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18204, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18084, - ts + 18091, - ts + 18103, + ts + 18212, + ts + 18219, + ts + 18231, } // Check to see if any sibling index (another index on the same table) @@ -83335,7 +84024,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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -83367,13 +84056,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+18114) + corruptSchema(tls, pData, argv, ts+18242) } 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+14109) + corruptSchema(tls, pData, argv, ts+14123) } } } @@ -83406,16 +84095,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8793 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8807 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7857 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18127 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7871 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18255 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -83500,7 +84189,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11692) + ts+11706) rc = SQLITE_ERROR goto initone_error_out __13: @@ -83535,7 +84224,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+18199) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18327) rc = SQLITE_ERROR goto initone_error_out __17: @@ -83549,7 +84238,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18223, + ts+18351, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83732,16 +84421,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83809,20 +84502,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -83834,8 +84527,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83844,7 +84537,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1463, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1483, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -83855,7 +84548,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83875,7 +84568,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18257, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18385, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83891,100 +84584,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18287, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18415, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3642, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3656, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83997,7 +84694,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84096,7 +84793,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84239,7 +84936,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -84414,8 +85111,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10837 - var zSp2 uintptr = ts + 10837 + var zSp1 uintptr = ts + 10851 + var zSp2 uintptr = ts + 10851 if pB == uintptr(0) { zSp1++ } @@ -84423,13 +85120,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18306, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18434, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18336)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18464)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -84604,7 +85301,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18370, libc.VaList(bp, 0)) + ts+18498, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -84649,7 +85346,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18420, libc.VaList(bp+8, zName)) + ts+18548, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -84660,7 +85357,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18484, + Xsqlite3ErrorMsg(tls, pParse, ts+18612, libc.VaList(bp+16, zName)) break } @@ -84704,7 +85401,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6505, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6519, Fn: uint32(8)} // 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. @@ -85051,6 +85748,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85226,7 +85926,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -85288,16 +85988,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18521 + z = ts + 18649 break case TK_INTERSECT: - z = ts + 18531 + z = ts + 18659 break case TK_EXCEPT: - z = ts + 18541 + z = ts + 18669 break default: - z = ts + 18548 + z = ts + 18676 break } return z @@ -85307,7 +86007,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18554, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18682, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -85513,8 +86213,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1092 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16197 + zType = ts + 1112 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16244 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -85653,13 +86353,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16197 + zCol = ts + 16244 } 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+11978, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11992, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85667,7 +86367,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+18577, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85757,7 +86457,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16197 + zName = ts + 16244 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85767,7 +86467,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18577, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -85783,7 +86483,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18586, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18714, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86070,7 +86770,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18594, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18722, 0) return __1: ; @@ -86161,7 +86861,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18643, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18771, 0) goto end_of_recursive_query __15: ; @@ -86181,7 +86881,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18685, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86218,7 +86918,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18691, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18819, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86252,11 +86952,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+18706, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18834, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1527 + return ts + 1547 } - return ts + 18729 + return ts + 18857 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86357,8 +87057,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18731, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18746, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18859, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18874, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -86405,7 +87105,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18521, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18649, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -86472,7 +87172,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -86534,7 +87234,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18765, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -86687,10 +87387,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18786, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18914, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18832, + ts+18960, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86944,8 +87644,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7153) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7153) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7167) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7167) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86972,13 +87672,13 @@ 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+18914, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19042, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18925, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19053, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86990,7 +87690,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+18930, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19058, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87091,7 +87791,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87117,6 +87817,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87133,7 +87834,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87170,7 +87871,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87181,6 +87883,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87205,15 +87908,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1072 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1092 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -87390,9 +88098,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -87461,7 +88176,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -87477,17 +88191,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -87508,7 +88213,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -87520,6 +88224,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87675,6 +88390,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87698,8 +88414,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87875,8 +88591,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -87893,6 +88609,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87922,6 +88643,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87955,12 +88677,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15100) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15147) == 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+15104) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15151) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88026,7 +88748,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+18936, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19064, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88109,7 +88831,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18954, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19082, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88238,7 +88960,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+18977, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19105, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -88264,7 +88986,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18997, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19125, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88280,7 +89002,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19040 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19168 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -88306,7 +89028,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+19063, + Xsqlite3ErrorMsg(tls, pParse, ts+19191, 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 @@ -88317,9 +89039,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 + 19101 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19229 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19135 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19263 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88346,9 +89068,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -88366,7 +89088,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+19173, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19301, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -88478,7 +89200,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19177, + Xsqlite3ErrorMsg(tls, pParse, ts+19305, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -88497,7 +89219,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+19216, + Xsqlite3ErrorMsg(tls, pParse, ts+19344, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -88505,7 +89227,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19247, + Xsqlite3ErrorMsg(tls, pParse, ts+14716, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -88606,7 +89328,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6365 + zSchemaName = ts + 6379 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -88621,7 +89343,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19280, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19375, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -88686,7 +89408,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19285, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19380, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88698,7 +89420,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11978, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88717,9 +89439,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19294, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19389, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19312, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19407, 0) } } } @@ -88729,7 +89451,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+19332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19427, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88879,13 +89601,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19363, 0) + ts+19458, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19414, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19509, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89066,19 +89788,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19447, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19542, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19459 + return ts + 19554 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1527 + return ts + 1547 }())) } } @@ -89091,7 +89813,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7857) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89249,7 +89971,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -89348,7 +90069,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19482, + ts+19577, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -89409,7 +90130,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19536, + Xsqlite3ErrorMsg(tls, pParse, ts+19631, 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 __15: @@ -89513,7 +90234,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1527, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1547, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -89523,7 +90244,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -89555,7 +90276,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19576, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19671, 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), 5, 0x20) @@ -89613,8 +90334,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19591, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19686, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -89648,7 +90372,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89741,16 +90465,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89759,13 +90488,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89777,52 +90506,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89840,111 +90569,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -89963,33 +90692,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -89997,28 +90726,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90029,7 +90758,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90040,7 +90769,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90066,7 +90795,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90079,27 +90808,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19607 + return ts + 19702 } - return ts + 19616 + return ts + 19711 }()) groupBySort = 1 @@ -90107,49 +90836,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90163,45 +90892,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90220,16 +90949,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90260,16 +90989,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90282,98 +91011,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -90382,79 +91111,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19607) -__147: + explainTempTable(tls, pParse, ts+19702) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19625 + return ts + 19720 } - return ts + 19648 + return ts + 19743 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -90529,7 +91258,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -90551,7 +91280,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19657, 0) + ts+19752, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -90647,7 +91376,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3642, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90739,7 +91468,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -90784,7 +91513,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+19722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19817, 0) goto trigger_cleanup __3: ; @@ -90828,7 +91557,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19768, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19863, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -90846,7 +91575,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19776, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19871, 0) goto trigger_orphan_error __11: ; @@ -90858,7 +91587,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19768, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19863, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90873,7 +91602,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19817, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90885,22 +91614,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8051, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19938, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19881, + Xsqlite3ErrorMsg(tls, pParse, ts+19976, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19918 + return ts + 20013 } - return ts + 19925 + return ts + 20020 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90909,7 +91638,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19931, libc.VaList(bp+24, pTableName+8)) + ts+20026, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90938,9 +91667,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91058,7 +91787,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19768, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19863, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91091,7 +91820,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19977, + ts+20072, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91116,13 +91845,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20025, + ts+20120, libc.VaList(bp+16, (*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+20100, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20195, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -91378,7 +92107,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20129, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20224, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -91417,9 +92146,9 @@ 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 + 12065 + return ts + 12079 } - return ts + 5872 + return ts + 5886 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -91431,7 +92160,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20149, + ts+20244, 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) @@ -91545,12 +92274,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20211, + ts+20306, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20259 + return ts + 20354 } - return ts + 20266 + return ts + 20361 }())) __15: ; @@ -91664,7 +92393,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20273, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20368, 0) return 1 } @@ -91715,7 +92444,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -91784,7 +92513,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6059, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6073, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91847,8 +92576,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91881,26 +92610,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20315, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20410, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91917,7 +92646,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92110,10 +92839,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92122,7 +92853,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -92484,7 +93215,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20329, + ts+20424, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -92516,7 +93247,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20365, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20460, 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: @@ -92526,7 +93257,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7632 + return ts + 7646 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -93396,7 +94127,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20384) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20479) __169: ; update_cleanup: @@ -93702,10 +94433,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+20397, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20492, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20401, libc.VaList(bp+8, bp+216)) + ts+20496, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -93796,7 +94527,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+12119, -1) + ts+12133, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93828,7 +94559,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20474, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20478, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20569, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20573, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93965,23 +94696,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20482) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20577) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20522) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) return SQLITE_ERROR __2: ; @@ -93992,7 +94725,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20565) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20660) return SQLITE_ERROR __5: ; @@ -94001,7 +94734,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1527 + zOut = ts + 1547 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94020,7 +94753,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20583, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20678, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94040,20 +94773,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20606) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20701) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14472) + rc = execSql(tls, db, pzErrMsg, ts+14486) if !(rc != SQLITE_OK) { goto __9 } @@ -94098,7 +94833,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20633, + ts+20728, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94107,7 +94842,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20741, + ts+20836, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94118,7 +94853,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20795, + ts+20890, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94129,7 +94864,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20946, + ts+21041, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94251,7 +94986,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -94293,7 +95028,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -94450,7 +95185,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -94474,7 +95209,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+12346, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -94558,11 +95293,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21076, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21171, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21100, + ts+21195, 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, @@ -94572,7 +95307,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21199, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21294, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -94606,7 +95341,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -94633,7 +95368,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+21218, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21313, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94671,9 +95406,9 @@ 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+21260, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3642, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94683,7 +95418,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 + 21290 + var zFormat uintptr = ts + 21385 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94695,12 +95430,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1527) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1547) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16088, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16135, 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 @@ -94753,17 +95488,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21336, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21431, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3642, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94812,10 +95547,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21336, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21431, 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) @@ -94835,8 +95570,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94849,7 +95584,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94891,7 +95626,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95259,7 +95994,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -95302,7 +96037,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -95329,7 +96064,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -95557,31 +96292,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21355 + return ts + 21450 } if i == -1 { - return ts + 16197 + return ts + 16244 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -95590,35 +96307,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21368, 1) + Xsqlite3_str_append(tls, pStr, ts+21463, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12736, 1) + Xsqlite3_str_append(tls, pStr, ts+12750, 1) } - Xsqlite3_str_append(tls, pStr, ts+4987, 1) + Xsqlite3_str_append(tls, pStr, ts+5001, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } } @@ -95635,29 +96352,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21370, 2) + Xsqlite3_str_append(tls, pStr, ts+21465, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21362, 5) + Xsqlite3_str_append(tls, pStr, ts+21457, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21373 + return ts + 21468 } - return ts + 21378 + return ts + 21473 }(), 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))), j, i, ts+21386) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21481) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21388) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21483) } - Xsqlite3_str_append(tls, pStr, ts+4936, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95698,11 +96415,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21390, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21485, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21396 + return ts + 21491 } - return ts + 21403 + return ts + 21498 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95712,43 +96429,43 @@ 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 + 10893 + zFmt = ts + 10907 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21408 + zFmt = ts + 21503 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21441 + zFmt = ts + 21536 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21466 + zFmt = ts + 21561 } else { - zFmt = ts + 21484 + zFmt = ts + 21579 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21493, 7) + Xsqlite3_str_append(tls, bp+64, ts+21588, 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 + 16197 - Xsqlite3_str_appendf(tls, bp+64, ts+21501, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16244 + Xsqlite3_str_appendf(tls, bp+64, ts+21596, 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+21532, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21627, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21542, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21637, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21547, + Xsqlite3_str_appendf(tls, bp+64, ts+21642, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21574, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21669, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95780,25 +96497,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21680, 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+21373, 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+21468, 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+21701, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21362, 5) + Xsqlite3_str_append(tls, bp+24, ts+21457, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21373, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21468, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4936, 1) + Xsqlite3_str_append(tls, bp+24, ts+4950, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96159,7 +96876,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96212,104 +96929,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -96348,7 +96967,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -96368,6 +96987,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -96518,12 +97139,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -96542,13 +97163,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -96561,7 +97182,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -96623,7 +97244,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96770,6 +97391,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97112,13 +97735,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97126,104 +97756,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97232,92 +97871,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -97327,24 +97960,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -97364,152 +97997,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21709, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -97518,121 +98152,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -97641,36 +98275,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97688,219 +98322,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97910,24 +98544,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97938,41 +98572,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98006,7 +98640,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98014,13 +98648,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21638, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21733, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -98299,7 +98933,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -98312,7 +98946,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -98336,11 +98970,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -98372,10 +99006,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16046, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15377, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14903, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21652, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16093, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15424, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14950, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21747, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -98517,7 +99151,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -98534,10 +99168,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -98594,7 +99228,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98780,6 +99414,7 @@ __3: 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 @@ -98835,7 +99470,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98872,12 +99507,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98956,7 +99591,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99050,7 +99685,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21700 + return ts + 21795 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99244,7 +99879,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -99423,7 +100058,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21707, + Xsqlite3ErrorMsg(tls, pParse, ts+21802, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -99493,6 +100128,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -99519,10 +100157,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -99542,14 +100180,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -99586,14 +100224,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100036,6 +100674,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100045,11 +100695,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100144,7 +100792,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21743, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21838, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100215,7 +100863,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21769 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21864 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -100449,7 +101097,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -100511,11 +101159,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -100583,7 +101229,7 @@ __3: 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+1463, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1483, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -100705,9 +101351,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3642, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3642, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3656, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100775,7 +101421,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101124,9 +101770,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101150,7 +101799,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101166,32 +101816,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -101337,7 +101977,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -101580,13 +102220,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -101597,7 +102234,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -101652,31 +102290,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -101879,6 +102519,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102010,6 +102708,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102024,6 +102725,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102054,7 +102758,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -102210,7 +102914,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+21780, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102268,7 +102972,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21780, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102626,7 +103330,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -102638,7 +103342,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -102653,7 +103357,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102666,7 +103370,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21806, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21901, 0) rc = SQLITE_OK } else { goto __3 @@ -102767,7 +103471,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102941,7 +103645,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102993,7 +103697,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103021,7 +103725,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103042,7 +103745,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103064,7 +103766,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103126,9 +103828,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103144,7 +103845,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103164,6 +103867,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103260,8 +103968,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21841, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21936, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103273,7 +103981,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -103288,7 +103996,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -103308,7 +104016,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -103316,7 +104024,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -103326,7 +104034,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -103334,7 +104042,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -103366,7 +104074,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -103423,10 +104131,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -103470,16 +104178,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -103512,7 +104220,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -103524,9 +104232,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -103544,6 +104252,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -103630,7 +104390,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -103687,7 +104447,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21859, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21954, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -103710,31 +104470,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103752,13 +104511,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21887, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21982, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103769,169 +104528,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103940,26 +104704,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -103967,37 +104731,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104005,92 +104769,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104100,24 +104870,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104127,96 +104897,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104224,30 +104994,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104267,7 +105035,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -104403,11 +105171,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -104446,6 +105211,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -104618,7 +105393,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21905, -1) + pCtx, ts+22000, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104751,7 +105526,7 @@ 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+21961, -1) + pCtx, ts+22056, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104841,17 +105616,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22006)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22017)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22028)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22033)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22046)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22056)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22062)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22073)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22083)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22095)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22100)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22101)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22112)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22123)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22128)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22141)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22151)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22157)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22168)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22178)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22190)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22195)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104897,7 +105672,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22104, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22199, libc.VaList(bp, zName)) } return p } @@ -104941,12 +105716,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+22123, 0) + ts+22218, 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+22194, 0) + ts+22289, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104969,7 +105744,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7857) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) } break } @@ -105137,7 +105912,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105174,7 +105948,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22257, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22352, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105290,7 +106064,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7449)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463)) } pSub = Xsqlite3SelectNew(tls, @@ -105404,7 +106178,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22283, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22378, 0) goto windowAllocErr __2: ; @@ -105469,15 +106243,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22315 + zErr = ts + 22410 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22332 + zErr = ts + 22427 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22348 + zErr = ts + 22443 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22368, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22463, 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 { @@ -105498,7 +106272,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+22401, 0) + ts+22496, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -105636,7 +106410,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -105654,11 +106428,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22448, - ts + 22501, - ts + 21905, - ts + 22552, - ts + 22604, + ts + 22543, + ts + 22596, + ts + 22000, + ts + 22647, + ts + 22699, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106139,13 +106913,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1527, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1547, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107053,19 +107831,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22654, + Xsqlite3ErrorMsg(tls, pParse, ts+22749, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19648 + return ts + 19743 } - return ts + 22696 + return ts + 22791 }(), 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+22702, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22797, 0) } } @@ -107133,7 +107911,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22736, + Xsqlite3ErrorMsg(tls, pParse, ts+22831, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108230,7 +109008,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22869, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109205,21 +109983,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16197, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16244, 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+22796, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16110, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16157, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22796, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22891, 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)) @@ -109962,7 +110740,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22823) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22918) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110126,7 +110904,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -110343,9 +111121,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6683 + return ts + 6697 } - return ts + 6688 + return ts + 6702 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -110624,19 +111402,19 @@ 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+22856, 0) + ts+22951, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22951, 0) + ts+23046, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23035, 0) + ts+23130, 0) } break case uint32(273): @@ -111015,9 +111793,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22832, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23120, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23215, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111785,7 +112563,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23137, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, bp+2464)) break } } @@ -111806,9 +112584,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3642, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23162, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23257, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111821,7 +112599,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111981,7 +112759,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23173, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23268, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111994,11 +112772,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19768, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19863, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23280, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112011,9 +112789,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23195, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23290, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23199, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23294, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112123,36 +112901,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112269,7 +113025,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -112540,16 +113296,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -112613,6 +113370,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -112663,6 +113421,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112811,7 +113570,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -112841,7 +113600,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112856,7 +113615,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23207, 0) + ts+23302, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112952,7 +113711,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112963,8 +113722,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112974,13 +113733,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113047,23 +113806,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23275 + var zErr uintptr = ts + 23370 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23289 + zErr = ts + 23384 break } case SQLITE_ROW: { - zErr = ts + 23311 + zErr = ts + 23406 break } case SQLITE_DONE: { - zErr = ts + 23333 + zErr = ts + 23428 break } @@ -113081,35 +113840,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23356, - ts + 23369, + ts + 23451, + ts + 23464, uintptr(0), - ts + 23385, - ts + 23410, - ts + 23424, - ts + 23443, - ts + 1463, - ts + 23468, + ts + 23480, ts + 23505, - ts + 23517, - ts + 23532, - ts + 23565, - ts + 23583, - ts + 23608, - ts + 23637, + ts + 23519, + ts + 23538, + ts + 1483, + ts + 23563, + ts + 23600, + ts + 23612, + ts + 23627, + ts + 23660, + ts + 23678, + ts + 23703, + ts + 23732, uintptr(0), - ts + 5827, - ts + 5313, - ts + 23654, - ts + 23672, - ts + 23690, + ts + 5841, + ts + 5327, + ts + 23749, + ts + 23767, + ts + 23785, uintptr(0), - ts + 23724, + ts + 23819, uintptr(0), - ts + 23745, - ts + 23771, - ts + 23794, - ts + 23815, + ts + 23840, + ts + 23866, + ts + 23889, + ts + 23910, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113224,7 +113983,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113269,7 +114028,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+23831, 0) + ts+23926, 0) return SQLITE_BUSY } else { @@ -113386,7 +114145,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23894, libc.VaList(bp, zName)) + ts+23989, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113402,6 +114161,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -113411,7 +114173,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -113619,7 +114381,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+23945, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24040, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113712,7 +114474,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113782,7 +114544,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113792,7 +114554,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113824,20 +114586,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23966, 0) + ts+24061, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -113961,7 +114723,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+24034, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24129, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114006,10 +114768,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24040, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24135, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24050, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24145, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114114,7 +114876,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24078, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24173, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114125,17 +114887,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24082, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24177, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24082 + zModeType = ts + 24177 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24088, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24183, zOpt, uint64(4)) == 0) { goto __32 } @@ -114143,7 +114905,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3251 + zModeType = ts + 3265 __32: ; if !(aMode != 0) { @@ -114173,7 +114935,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24093, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24188, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114181,7 +114943,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24113, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24208, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114221,7 +114983,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24137, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24232, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114245,15 +115007,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24153, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24248, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24168, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24171, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24174, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17292, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24263, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24266, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24269, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17339, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114368,7 +115130,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -114387,8 +115149,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -114399,10 +115161,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+21700, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21795, 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+24178, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24273, 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) { @@ -114416,7 +115178,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -114433,7 +115195,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114467,9 +115229,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6360 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6374 (*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 + 23180 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23275 (*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) @@ -114574,7 +115336,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24184 + zFilename = ts + 24279 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114677,21 +115439,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24187, + Xsqlite3_log(tls, iErr, ts+24282, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24212) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24307) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24232) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24327) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24334) } // This is a convenience routine that makes sure that all thread-specific @@ -114802,7 +115564,7 @@ __4: 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 + 1092 + zDataType = ts + 1112 primarykey = 1 __13: ; @@ -114849,14 +115611,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24256, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24351, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3642 + return ts + 3656 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114926,6 +115688,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -115502,7 +116267,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24284, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24379, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -115535,7 +116300,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -115546,7 +116311,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -115620,7 +116385,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 + 24292 + return ts + 24387 } return uintptr(0) }(), 0) @@ -115715,7 +116480,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -115798,7 +116563,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6160, ts + 6683, ts + 6688, ts + 6170, ts + 6165, ts + 7924, ts + 24315, ts + 24321, + ts + 6174, ts + 6697, ts + 6702, ts + 6184, ts + 6179, ts + 7938, ts + 24410, ts + 24416, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115951,7 +116716,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 + 24328 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24423 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -115977,7 +116742,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6160, uint32(4)) + jsonAppendRaw(tls, p, ts+6174, uint32(4)) break } @@ -116006,7 +116771,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24345, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24440, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116064,19 +116829,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6160, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6174, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6683, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6697, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6688, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6702, uint32(5)) break } @@ -116621,17 +117386,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6160, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6174, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6683, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6697, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6688, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6702, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116732,7 +117497,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+24374, -1) + Xsqlite3_result_error(tls, pCtx, ts+24469, -1) } } jsonParseReset(tls, pParse) @@ -117038,7 +117803,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+24389, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24484, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117053,7 +117818,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24393, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24488, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117107,7 +117872,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24419, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24514, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117212,11 +117977,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24462, uint32(2)) + jsonAppendRaw(tls, bp, ts+24557, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4977, uint32(2)) + jsonAppendRaw(tls, bp, ts+4991, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24465, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24560, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -117257,7 +118022,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6160, uint32(4)) + jsonAppendRaw(tls, bp, ts+6174, uint32(4)) } } if i == argc { @@ -117373,14 +118138,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24468, -1) + ts+24563, -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+24519, -1) + Xsqlite3_result_error(tls, ctx, ts+24614, -1) jsonReset(tls, bp) return } @@ -117475,7 +118240,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117550,9 +118315,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24553 + return ts + 24648 } - return ts + 24557 + return ts + 24652 }()) return __2: @@ -117685,7 +118450,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24564, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24659, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117782,7 +118547,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24567, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24662, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117826,7 +118591,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24570) + ts+24665) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117957,7 +118722,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24653, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24748, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117976,7 +118741,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24659, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24754, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118072,7 +118837,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24659, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24754, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118096,7 +118861,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 + 24664 + zRoot = ts + 24759 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118212,7 +118977,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+24374, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24469, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118307,25 +119072,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24666}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24671}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24682}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24713}, - {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 + 24716}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24720}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24732}, - {FnArg: int8(2), 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 + 24755}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24766}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24800}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24810}, - {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 + 24821}, - {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 + 24838}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24777}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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 + 24795}, + {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 + 24808}, + {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 + 24811}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24815}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24827}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24839}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24850}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24861}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24873}, + {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 + 24886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24905}, + {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 + 24916}, + {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 + 24933}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118344,8 +119109,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24856, FpModule: 0}, - {FzName: ts + 24866, FpModule: 0}, + {FzName: ts + 24951, FpModule: 0}, + {FzName: ts + 24961, FpModule: 0}, } type Rtree1 = struct { @@ -118605,11 +119370,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+24876, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24971, 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+24884, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24979, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -118820,7 +119585,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24889, + ts+24984, 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)) @@ -119523,7 +120288,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24971) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25066) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119735,7 +120500,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3642, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120864,7 +121629,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24985, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25080, 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 { @@ -120876,12 +121641,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25005, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25100, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25037, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25132, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120922,7 +121687,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121107,7 +121872,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25074, 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+25169, 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)) @@ -121130,14 +121895,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25219 + var zFmt uintptr = ts + 25314 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11265, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11279, 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 { @@ -121178,7 +121943,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25275, ts + 5039, ts + 16197, + ts + 25370, ts + 5053, ts + 16244, } var rtreeModule = Sqlite3_module{ @@ -121221,19 +121986,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+25280, + ts+25375, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25342, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25437, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25347, + ts+25442, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25411, + ts+25506, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25481, + ts+25576, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121262,7 +122027,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25530 + zFormat = ts + 25625 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121274,7 +122039,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+25638, + ts+25733, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121282,18 +122047,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+25683, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25778, 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+12736, 1) + Xsqlite3_str_append(tls, p, ts+12750, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25710, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25805, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25732, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25827, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25740, 0) + Xsqlite3_str_appendf(tls, p, ts+25835, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121308,14 +122073,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25756, - ts + 25809, - ts + 25854, - ts + 25906, - ts + 25960, - ts + 26005, - ts + 26063, - ts + 26118, + ts + 25851, + ts + 25904, + ts + 25949, + ts + 26001, + ts + 26055, + ts + 26100, + ts + 26158, + ts + 26213, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121344,7 +122109,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26165, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26260, 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 @@ -121352,19 +122117,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26185, + ts+26280, 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+3642, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, 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+26242, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26337, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121406,16 +122171,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26277, - ts + 26320, - ts + 26355, - ts + 26391, + ts + 26372, + ts + 26415, + ts + 26450, + ts + 26486, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -121440,7 +122205,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26428, + Xsqlite3_str_appendf(tls, pSql, ts+26523, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -121452,7 +122217,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26452, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26547, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -121475,7 +122240,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -121486,14 +122251,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, 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+3642, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -121536,7 +122301,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -121553,7 +122318,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -121571,7 +122336,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26461, ts + 26472} +var azFormat = [2]uintptr{ts + 26556, ts + 26567} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -121609,13 +122374,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10837, 1) + Xsqlite3_str_append(tls, pOut, ts+10851, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26577, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26488, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26583, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26492, 1) + Xsqlite3_str_append(tls, pOut, ts+26587, 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}))) @@ -121626,7 +122391,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26494, -1) + Xsqlite3_result_error(tls, ctx, ts+26589, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121704,12 +122469,12 @@ 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+26527, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26622, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4041 + return ts + 4055 } - return ts + 1527 + return ts + 1547 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -121728,7 +122493,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+26534, + ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121747,7 +122512,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+26579, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26674, libc.VaList(bp+16, iNode)) } } @@ -121761,8 +122526,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26611, - ts + 26665, + ts + 26706, + ts + 26760, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -121777,23 +122542,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+26713, + rtreeCheckAppendMsg(tls, pCheck, ts+26808, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26775, + ts+26870, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26758 + return ts + 26853 } - return ts + 26766 + return ts + 26861 }(), iKey, iVal)) } } @@ -121817,7 +122582,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+26833, libc.VaList(bp, i, iCell, iNode)) + ts+26928, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121837,7 +122602,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+26881, libc.VaList(bp+24, i, iCell, iNode)) + ts+26976, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121854,14 +122619,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+26948, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27043, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26982, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27077, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121869,7 +122634,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+27012, + ts+27107, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121898,14 +122663,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27067, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27162, 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+27098, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27193, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121927,12 +122692,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14472, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14486, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27165, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27260, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121941,12 +122706,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24985, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25080, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27193, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27288, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121960,8 +122725,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+27224, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27319, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121969,7 +122734,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27239, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27334, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121984,7 +122749,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27243, -1) + ts+27338, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121992,7 +122757,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6360 + zDb = ts + 6374 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122002,7 +122767,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17834 + return ts + 17962 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122371,11 +123136,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+27294, 1) + Xsqlite3_str_append(tls, x, ts+27389, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27296, 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+27391, 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+27307, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27402, 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) } @@ -122395,19 +123160,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+27318, 0) + Xsqlite3_str_appendf(tls, x, ts+27413, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27336, 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+27431, 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+27344, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27439, 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+27352, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27447, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27356, 0) + Xsqlite3_str_appendf(tls, x, ts+27451, 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) } @@ -123313,7 +124078,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27369, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27464, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123322,7 +124087,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27391, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27486, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -123330,7 +124095,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26458, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123341,7 +124106,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -123366,7 +124131,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -123555,7 +124320,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16197 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16244 (*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 @@ -123565,7 +124330,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27490 (*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 @@ -123573,7 +124338,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27401 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27496 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123685,7 +124450,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27410, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27505, 0) __4: ; goto geopoly_update_end @@ -123815,14 +124580,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27450) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27545) == 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+27466) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27561) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123887,7 +124652,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27481, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27576, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123899,25 +124664,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27489}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27502}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27515}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27528}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27466}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27540}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27450}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27563}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27577}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27590}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27604}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27620}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27597}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27610}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27623}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27561}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27635}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27545}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27658}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27672}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27685}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27699}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27715}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27632}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27727}, } // Register the r-tree module with database handle db. This creates the @@ -123927,26 +124692,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27651, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27746, 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+27661, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27756, 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+27672, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27767, -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+27395, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27490, 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+27683, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124000,7 +124765,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24971, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25066, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124067,6 +124832,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124325,7 +125092,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) return } @@ -124336,7 +125103,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+27693, -1) + Xsqlite3_result_error(tls, context, ts+27788, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124349,7 +125116,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -124361,7 +125128,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -124437,7 +125204,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27714, uintptr(0), uintptr(0), p+64) + ts+27809, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -124501,7 +125268,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+24884, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24979, 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++ { } @@ -124522,16 +125289,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27885, libc.VaList(bp, func() uintptr { + ts+27980, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28035 + return ts + 28130 } - return ts + 1527 + return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28076) + ts+28171) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -124629,7 +125396,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -124647,7 +125414,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+28201, libc.VaList(bp, zTab))) + ts+28296, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124665,7 +125432,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+28320, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28415, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124683,7 +125450,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28341, libc.VaList(bp+16, zIdx))) + ts+28436, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124706,7 +125473,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28487, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124752,7 +125519,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124767,7 +125534,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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)), 1) if iCid >= 0 { @@ -124807,7 +125574,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+19294, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19389, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124817,18 +125584,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28470, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28565, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28489, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28584, 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+28494, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28589, zName) { bRbuRowid = 1 } } @@ -124840,18 +125607,18 @@ 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+28504, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28599, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28533 + return ts + 28628 } - return ts + 28546 + return ts + 28641 }())) } 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+28555, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28650, 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)), 1) @@ -124865,7 +125632,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+28577, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28672, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -124908,12 +125675,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+28604, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14583 + zList = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14597 } return zList } @@ -124924,13 +125691,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+28613, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28708, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124952,25 +125719,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+28626, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28721, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28658, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28753, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+28681) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28687, ts+28694, ts+4936) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+28776) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28782, ts+28789, ts+4950) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) 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+28702, + ts+28797, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28744, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28839, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125007,12 +125774,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1527 + zSep = ts + 1547 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, 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 @@ -125047,7 +125814,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28764 + zCol = ts + 28859 __7: ; goto __5 @@ -125055,13 +125822,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28772, + zLhs = rbuMPrintf(tls, p, ts+28867, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28793, + zOrder = rbuMPrintf(tls, p, ts+28888, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28829, + zSelect = rbuMPrintf(tls, p, ts+28924, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14583 + zSep = ts + 14597 iCol++ goto __1 __2: @@ -125079,12 +125846,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28856, + Xsqlite3_mprintf(tls, ts+28951, 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 + 1527 + zSep = ts + 1547 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125106,8 +125873,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28904, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14583 + zVector = rbuMPrintf(tls, p, ts+28999, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14597 goto __15 __15: iCol++ @@ -125118,7 +125885,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125145,13 +125912,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1527 - var zAnd uintptr = ts + 1527 + var zCom uintptr = ts + 1547 + var zAnd uintptr = ts + 1547 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125163,9 +125930,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28923, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29018, 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 + zType = ts + 1547 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125175,37 +125942,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 + 28764 + zCol = ts + 28859 } else { - zCol = ts + 28494 + zCol = ts + 28589 } - zType = ts + 1092 + zType = ts + 1112 } 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+28945, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29040, 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 + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28965, + zImpPK = Xsqlite3_mprintf(tls, ts+29060, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28986, + zImpCols = Xsqlite3_mprintf(tls, ts+29081, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29019, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29114, 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 + 14583 - zAnd = ts + 21362 + zCom = ts + 14597 + zAnd = ts + 21457 nBind++ } @@ -125239,16 +126006,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1527 + var zS uintptr = ts + 1547 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+29043, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29138, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29055, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29150, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14583 + zS = ts + 14597 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125256,7 +126023,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29064, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29159, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125268,27 +126035,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29079, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29174, 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 zSep uintptr = ts + 1547 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+29093, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21457 } } zList = rbuMPrintf(tls, p, - ts+29105, libc.VaList(bp+40, zList)) + ts+29200, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29155, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21362 + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21457 } } } @@ -125297,7 +126064,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29168, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29263, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125311,21 +126078,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+29155, + zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14583 + zSep = ts + 14597 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29194, + zList = rbuMPrintf(tls, p, ts+29289, 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 + 14583 + zSep = ts + 14597 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29224, + zList = rbuMPrintf(tls, p, ts+29319, 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 + 14583 + zSep = ts + 14597 } } } @@ -125360,19 +126127,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29261 + var zSep uintptr = ts + 29356 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28413, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28508, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16085) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16132) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp+8, zIdx))) } break } @@ -125384,15 +126151,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28681 + zDesc = ts + 28776 } else { - zDesc = ts + 1527 + zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29274, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14583 + z = rbuMPrintf(tls, p, ts+29369, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14597 } } - z = rbuMPrintf(tls, p, ts+29285, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29380, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -125407,12 +126174,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1527 + var zComma uintptr = ts + 1547 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29289) + ts+29384) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -125421,7 +126188,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28441, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125431,25 +126198,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29339, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29434, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29361, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28681 + return ts + 28776 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } } - zCols = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29466, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29386, + ts+29481, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125459,50 +126226,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1527 + var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1527 + var zPk uintptr = ts + 1547 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, (*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 { - zPk = ts + 29448 + zPk = ts + 29543 } - zSql = rbuMPrintf(tls, p, ts+29461, + zSql = rbuMPrintf(tls, p, ts+29556, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29488 + return ts + 29583 } - return ts + 1527 + return ts + 1547 }())) - zComma = ts + 14583 + zComma = ts + 14597 } 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+29498, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29593, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29505, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29600, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) } } @@ -125515,7 +126282,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29552, + ts+29647, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -125552,7 +126319,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29609) + ts+29704) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -125657,7 +126424,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+29675, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29770, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125677,24 +126444,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29695, + ts+29790, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29760, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29855, libc.VaList(bp+128, zTbl, zBind))) } 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+29796, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125710,7 +126477,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29830, + ts+29925, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125718,31 +126485,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }() } - return ts + 1527 + return ts + 1547 }(), 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+29901, + ts+29996, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29962, + ts+30057, 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 + 29891 + return ts + 29986 } - return ts + 29895 + return ts + 29990 }(), zCollist, zLimit)) } @@ -125767,8 +126534,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6371) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6367) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6385) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6381) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125777,52 +126544,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1527 + return ts + 1547 } - return ts + 30121 + return ts + 30216 }() 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+30130, + ts+30225, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30166 + return ts + 30261 } - return ts + 1527 + return ts + 1547 }(), zBindings))) } 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+30176, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30271, 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 + var zRbuRowid uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30204 + zRbuRowid = ts + 30299 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30216, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30311, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30292 + return ts + 30387 } - return ts + 1527 + return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30309, + ts+30404, 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+30608, + ts+30703, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125830,14 +126597,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1527 + var zRbuRowid uintptr = ts + 1547 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30707 + zRbuRowid = ts + 30802 } else { - zRbuRowid = ts + 30717 + zRbuRowid = ts + 30812 } } @@ -125850,35 +126617,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28764, 0) + zOrder = rbuMPrintf(tls, p, ts+28859, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14583, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) } } 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+30728, + ts+30823, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30776 + return ts + 30871 } - return ts + 1527 + return ts + 1547 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zOrder != 0 { - return ts + 19648 + return ts + 19743 } - return ts + 1527 + return ts + 1547 }(), zOrder, zLimit))) } @@ -125941,12 +126708,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1527 + var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30121 + zPrefix = ts + 30216 } - zUpdate = Xsqlite3_mprintf(tls, ts+30782, + zUpdate = Xsqlite3_mprintf(tls, ts+30877, 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) @@ -125973,7 +126740,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126005,7 +126772,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30812, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30907, 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)), 0) { case RBU_STATE_STAGE: @@ -126075,28 +126842,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6360, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, 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+6360) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30842, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30937, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30869, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3265, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30965, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3279, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6360, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6374, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30887, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30983, 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+6360, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126129,11 +126896,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+30953, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31049, 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+24034, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24129, (*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)))) == '?' { @@ -126145,16 +126912,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30985, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360), + zTarget = Xsqlite3_mprintf(tls, ts+31081, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } - return ts + 31017 + return ts + 31113 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1527 + return ts + 1547 } return zExtra }())) @@ -126170,37 +126937,37 @@ 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+31019, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31115, -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+31034, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31130, 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+31051, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31147, -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+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31067, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 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+31095, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31191, 0) } } @@ -126229,14 +126996,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31067, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, uintptr(0), uintptr(0), uintptr(0)) } } 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+31113, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126345,7 +127112,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126362,23 +127129,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31148, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31244, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6360) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6360) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374) } - zOal = Xsqlite3_mprintf(tls, ts+31173, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126399,12 +127166,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -126498,7 +127262,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23672, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23767, 0) return } @@ -126591,7 +127355,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31187) + ts+31283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -126599,7 +127363,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31209, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31305, libc.VaList(bp, iCookie+1)) } } } @@ -126620,7 +127384,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31236, + ts+31332, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -126650,9 +127414,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31394, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31490, 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+31409, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31505, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126666,10 +127430,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31429, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31525, 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+31454) + ts+31550) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126683,12 +127447,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31562) + ts+31658) } 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+31627) + ts+31723) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126700,7 +127464,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31671, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31767, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126720,15 +127484,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17170) - rbuCopyPragma(tls, p, ts+16281) + rbuCopyPragma(tls, p, ts+17217) + rbuCopyPragma(tls, p, ts+16328) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31696, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31792, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126752,10 +127516,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126850,7 +127614,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31724, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31820, 0) } if rc == SQLITE_OK { @@ -126866,7 +127630,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31173, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31269, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126882,7 +127646,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31749, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31845, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126916,7 +127680,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31760, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31856, 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)), -1) } else { @@ -126946,13 +127710,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31832, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31928, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31846) + ts+31942) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126963,7 +127727,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31903) + ts+31999) 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)), 0) @@ -126993,10 +127757,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127007,7 +127772,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3642, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3656, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127036,7 +127801,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+31977, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32073, 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 @@ -127054,12 +127819,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32009, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32105, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32041 + return ts + 32137 } - return ts + 32048 + return ts + 32144 }())) } } @@ -127067,7 +127832,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+14472, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14486, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127078,19 +127843,19 @@ 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+16884) - rbuCopyPragma(tls, p, ts+16296) + rbuCopyPragma(tls, p, ts+16931) + rbuCopyPragma(tls, p, ts+16343) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32055, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32151, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6360, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32071, uintptr(0), uintptr(0), p+64) + db, ts+32167, uintptr(0), uintptr(0), p+64) } } @@ -127144,7 +127909,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32095, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32191, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127171,7 +127936,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30121, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30216, 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++ @@ -127188,7 +127953,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127201,13 +127966,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14487, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32103, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32199, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127302,7 +128067,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127319,19 +128084,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14487, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14472 + zBegin = ts + 14486 } else { - zBegin = ts + 32055 + zBegin = ts + 32151 } 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+32055, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32151, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127339,6 +128104,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -127357,7 +128144,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -127652,7 +128439,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32130, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32226, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127677,7 +128464,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+32153, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32249, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127722,7 +128509,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -130533,7 +131320,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -130575,7 +131362,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -130636,7 +131423,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -130710,13 +131497,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -130778,7 +131565,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -130790,6 +131577,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131142,7 +131938,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -131310,45 +132106,45 @@ 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+11265) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11279) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 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+32740, bp+16) + sessionAppendStr(tls, bp, ts+32836, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32753, bp+16) + sessionAppendStr(tls, bp, ts+32849, bp+16) 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+32759, bp+16) + sessionAppendStr(tls, bp, ts+32855, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14583 + zSep = ts + 14597 } } - zSep = ts + 1527 - sessionAppendStr(tls, bp, ts+32688, bp+16) + zSep = ts + 1547 + sessionAppendStr(tls, bp, ts+32784, 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+32764, bp+16) + ts+32860, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32696, bp+16) + sessionAppendStr(tls, bp, ts+32792, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21362 + zSep = ts + 21457 } } @@ -131395,42 +132191,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1527 + var zSep uintptr = ts + 1547 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32839, bp+16) + sessionAppendStr(tls, bp, ts+32935, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32688, bp+16) + sessionAppendStr(tls, bp, ts+32784, 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+32759, bp+16) + sessionAppendStr(tls, bp, ts+32855, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21362 + zSep = ts + 21457 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32857, bp+16) + sessionAppendStr(tls, bp, ts+32953, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32400, bp+16) + sessionAppendStr(tls, bp, ts+32496, bp+16) - zSep = ts + 1527 + zSep = ts + 1547 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+32696, bp+16) + sessionAppendStr(tls, bp, ts+32792, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32865 + zSep = ts + 32961 } } - sessionAppendStr(tls, bp, ts+4936, bp+16) + sessionAppendStr(tls, bp, ts+4950, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -131443,7 +132239,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6360, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6374, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -131454,21 +132250,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32870, bp+16) + sessionAppendStr(tls, bp, ts+32966, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21368, bp+16) + sessionAppendStr(tls, bp, ts+21463, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14583, bp+16) + sessionAppendStr(tls, bp, ts+14597, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32888, bp+16) + sessionAppendStr(tls, bp, ts+32984, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32899, bp+16) + sessionAppendStr(tls, bp, ts+32995, bp+16) } - sessionAppendStr(tls, bp, ts+4936, bp+16) + sessionAppendStr(tls, bp, ts+4950, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -131482,14 +132278,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11265, p) + var rc int32 = sessionSelectRow(tls, db, ts+11279, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32903) + ts+32999) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33016) + ts+33112) } return rc } @@ -131517,7 +132313,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131770,7 +132566,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33160, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33256, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131786,7 +132582,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+33181, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33277, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131859,10 +132655,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33200, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33296, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33226, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33322, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -131895,7 +132691,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3642, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131908,7 +132704,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6360, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6374, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -131921,19 +132717,19 @@ 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+33256, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33352, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33300, + ts+33396, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33371, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33467, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11265) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11279) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131984,14 +132780,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33431, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33527, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33485, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33461, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33581, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132505,7 +133301,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -133239,7 +134035,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33513, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33609, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133527,7 +134323,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33637, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133714,7 +134510,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+33572, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33668, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133782,7 +134578,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33579 + var zErr uintptr = ts + 33675 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133941,7 +134737,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1527 + return ts + 1547 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -133964,7 +134760,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33629 + var zErr uintptr = ts + 33725 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134288,13 +135084,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33677, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33773, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33685, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33781, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33695, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33791, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134705,7 +135501,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6160, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6174, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134845,7 +135641,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33700, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33796, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134872,14 +135668,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+33707, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33738, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33834, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134890,7 +135686,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33771, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33867, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134903,7 +135699,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33808, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33904, 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))) @@ -134912,7 +135708,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+33817, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33913, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134931,7 +135727,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33850, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33946, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134946,14 +135742,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33884, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33980, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33892, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33988, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33924, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34020, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134961,9 +135757,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33930, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34026, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33944, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34040, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134971,9 +135767,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33982, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34078, 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+33993, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -134981,21 +135777,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5054, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5068, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7937, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17275}, - {FzName: ts + 34028, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7951, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17322}, + {FzName: ts + 34124, 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+34036, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34132, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34067, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34163, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135042,15 +135838,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22028) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16197) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34095, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22123) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16244) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34191, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34125) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34221) { *(*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+34135, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34231, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135067,13 +135863,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34166, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34262, 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+34171, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34267, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34178, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+16, i)) } } } @@ -135111,8 +135907,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+22028) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34186, 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+22123) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34282, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135144,7 +135940,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+34215, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34311, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135153,13 +135949,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1527 + return ts + 1547 }(), pzErr) } else { @@ -135181,19 +135977,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 + 33884 + zTail = ts + 33980 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34235 + zTail = ts + 34331 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34243, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34339, 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+16197, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16244, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135237,18 +136033,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34254, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34350, 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 + 1547 } - return ts + 14583 + return ts + 14597 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34270, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34366, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22028)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22123)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135358,7 +136154,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34399) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135368,7 +136164,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+34308) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34404) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135378,7 +136174,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+34317) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34413) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135391,7 +136187,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+34327) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34423) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135401,7 +136197,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+34337) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34433) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135417,7 +136213,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+22028) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22123) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -135440,7 +136236,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34349 + var zSelect uintptr = ts + 34445 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -135462,7 +136258,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34381) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34477) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -135476,7 +136272,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34389, + ts+34485, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -135574,7 +136370,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34454, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34550, 0) return FTS5_EOF } } @@ -135587,20 +136383,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+34474, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34570, 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+34505, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34601, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34508, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34604, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29891, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29986, uint64(3)) == 0 { tok = FTS5_AND } break @@ -137367,9 +138163,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34512, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34608, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33541, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33637, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137385,7 +138181,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+34517, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34613, 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') @@ -137472,7 +138268,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20365, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20460, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -137553,7 +138349,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34546, 0) + ts+34642, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137723,12 +138519,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+34599, + ts+34695, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34649 + return ts + 34745 } - return ts + 34512 + return ts + 34608 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138671,7 +139467,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34656, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34752, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -138750,7 +139546,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+34662, + ts+34758, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138775,7 +139571,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34713, + ts+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -138798,7 +139594,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34762, + ts+34858, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139037,7 +139833,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139110,13 +139906,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140236,7 +141032,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34825, + ts+34921, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141429,7 +142225,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1527 + return ts + 1547 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -141595,10 +142391,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -141626,7 +142422,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141702,7 +142498,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+34909, + ts+35005, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141745,7 +142541,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -141757,7 +142553,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -141877,7 +142673,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142276,12 +143072,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -142292,7 +143088,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -142473,7 +143269,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -142597,7 +143393,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -142606,7 +143402,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -142638,8 +143434,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -142692,8 +143488,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -142763,7 +143559,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1527, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1547, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -142779,13 +143575,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+34966, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35062, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24884, ts+34974, 0, pzErr) + pConfig, ts+24979, ts+35070, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11405, - ts+35009, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11419, + ts+35105, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143038,7 +143834,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+34656, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34752, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143152,7 +143948,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35053, + ts+35149, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -143311,6 +144107,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -143318,7 +144118,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35139) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35235) 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)) @@ -143589,7 +144389,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR } @@ -143620,7 +144420,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -143635,7 +144435,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4954, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4968, 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) @@ -143949,7 +144749,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143981,7 +144781,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144013,25 +144813,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35183, + ts+35279, 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 + 14583 + return ts + 14597 } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1527 + return ts + 1547 }(), func() uintptr { if bDesc != 0 { - return ts + 35238 + return ts + 35334 } - return ts + 35243 + return ts + 35339 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144077,12 +144877,12 @@ 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+35247, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35343, 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+5036, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5050, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35253, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35349, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144113,7 +144913,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35281, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35377, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144144,7 +144944,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35291, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35387, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144176,14 +144976,14 @@ 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+35312, libc.VaList(bp, z)) + ts+35408, 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 + 33695 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33791 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144239,7 +145039,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+35144, 0) + ts+35240, 0) return SQLITE_ERROR __1: ; @@ -144282,7 +145082,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144456,7 +145256,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35345, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35441, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -144577,7 +145377,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3642, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3656, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -144601,28 +145401,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35381, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35477, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35392, 0) + ts+35488, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35472, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35568, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35480, 0) + ts+35576, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16864, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16911, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35632, 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+35542, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35638, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144680,7 +145480,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17409, z) { + 0 == Xsqlite3_stricmp(tls, ts+17456, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -144693,12 +145493,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35558, + ts+35654, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20266 + return ts + 20361 } - return ts + 35595 + return ts + 35691 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145328,7 +146128,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+35607, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35703, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -145572,7 +146372,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+35628, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35724, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -145591,7 +146391,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+35650, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35746, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -145638,7 +146438,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35681) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35777) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -145647,7 +146447,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35694, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35790, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145661,7 +146461,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35785, ts + 33884, ts + 24884, ts + 34235, ts + 11405, + ts + 35881, ts + 33980, ts + 24979, ts + 34331, ts + 11419, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145685,7 +146485,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35792, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35888, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145703,13 +146503,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35792, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35888, 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+35797, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35893, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145764,17 +146564,17 @@ 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)) = [11]uintptr{ - ts + 35812, - ts + 35880, - ts + 35949, - ts + 35982, - ts + 36021, - ts + 36061, - ts + 36100, - ts + 36141, - ts + 36180, - ts + 36222, - ts + 36262, + ts + 35908, + ts + 35976, + ts + 36045, + ts + 36078, + ts + 36117, + ts + 36157, + ts + 36196, + ts + 36237, + ts + 36276, + ts + 36318, + ts + 36358, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145841,7 +146641,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3642, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3656, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145876,18 +146676,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36285, + ts+36381, 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+36389, + ts+36485, 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+36427, + ts+36523, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145899,7 +146699,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36465, + ts+36561, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145911,14 +146711,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24884, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11405, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35785, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24979, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11419, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35881, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34235, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34331, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33884, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33980, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145930,17 +146730,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36507, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36603, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29537 + return ts + 29632 } - return ts + 1527 + return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36537, + ts+36633, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145977,27 +146777,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36581, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36677, 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+36604, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36700, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33884, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33980, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34235, ts+36610, 0, pzErr) + pConfig, ts+34331, ts+36706, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35785, ts+36642, 1, pzErr) + pConfig, ts+35881, ts+36738, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146203,12 +147003,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36659, + ts+36755, 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+36709, + ts+36805, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146216,7 +147016,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34381, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146392,7 +147192,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36738, + zSql = Xsqlite3_mprintf(tls, ts+36834, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -146574,14 +147374,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33884, bp+48) + rc = fts5StorageCount(tls, p, ts+33980, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34235, bp+56) + rc = fts5StorageCount(tls, p, ts+34331, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146776,9 +147576,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+36770) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36866) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36877) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146993,7 +147793,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 + 36792 + var zCat uintptr = ts + 36888 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147005,7 +147805,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36801) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36897) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147016,18 +147816,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+36812) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36908) { 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+36770) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36866) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36781) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36877) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36801) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36897) { } else { rc = SQLITE_ERROR } @@ -147303,7 +148103,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)) = uintptr(0) - var zBase uintptr = ts + 36830 + var zBase uintptr = ts + 36926 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147445,7 +148245,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36840, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147453,11 +148253,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, 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+36848, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147465,7 +148265,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147473,7 +148273,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36856, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147481,11 +148281,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, 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+36864, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147493,19 +148293,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36869, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36965, 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+36873, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36879, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36975, 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+36884, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147513,11 +148313,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36888, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36984, 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+36892, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147525,7 +148325,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147533,11 +148333,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36899, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36995, 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+36903, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147545,7 +148345,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36907, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147553,7 +148353,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147561,7 +148361,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147577,24 +148377,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36919, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36899, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36925, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37021, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36915, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37011, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -147609,137 +148409,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36932, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36947, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37043, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37048, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36848, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36944, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36957, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37053, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36843, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36939, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36915, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37011, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15410, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15457, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36925, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37021, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36976, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36884, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36980, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36991, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37087, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } 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+37089, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36907, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37003, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37095, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36915, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37011, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37013, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36995, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37114, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37024, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37120, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37007, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37040, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37136, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37140, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36907, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37003, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37148, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37154, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37007, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37064, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37160, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36925, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37021, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147754,16 +148554,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37071, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36856, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36952, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37076, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37172, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147771,21 +148571,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37177, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37183, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36856, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37040, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37136, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147793,7 +148593,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37189, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147801,9 +148601,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37195, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36840, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147818,12 +148618,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37105, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37201, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37109, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37205, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37112, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147832,7 +148632,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37115, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37211, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147988,7 +148788,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+37119) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37215) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148168,22 +148968,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36830, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36926, 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 + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37230, 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 + 37140, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37236, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 @@ -149326,14 +150126,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+37155) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37251) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37159) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37255) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37163) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37259) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37172, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37268, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149359,19 +150159,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37206, - ts + 37246, - ts + 37281, + ts + 37302, + ts + 37342, + ts + 37377, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23180, *(*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+23275, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37324, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37420, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -149504,11 +150304,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+37357, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37453, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37388, + ts+37484, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -149532,7 +150332,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37439, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37535, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149816,7 +150616,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1527 + zCopy = ts + 1547 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -149927,7 +150727,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37465, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37561, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149949,7 +150749,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37475 + return ts + 37571 } func init() { @@ -150490,7 +151290,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -150800,16 +151600,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -150866,12 +151666,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -150886,6 +151686,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -150907,5 +151708,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 31a42aa4f9..77fd9810db 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1020,7 +1019,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1033,49 +1032,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1084,21 +1083,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1110,8 +1109,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1123,22 +1122,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1146,13 +1145,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1167,13 +1166,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1717,7 +1716,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1813,6 +1812,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1948,6 +1948,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1978,6 +1979,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2079,6 +2081,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2152,7 +2156,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2260,8 +2264,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2767,6 +2771,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3807,7 +3812,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4138,6 +4152,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4148,6 +4163,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6040,6 +6073,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6077,6 +6121,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6125,7 +6170,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6139,6 +6184,7 @@ type Parse1 = struct { FnLabelAlloc int32 FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6494,8 +6540,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6512,7 +6557,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6768,8 +6812,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7090,17 +7134,6 @@ type IdxCover = struct { FiCur int32 } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7130,7 +7163,13 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7139,49 +7178,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7283,7 +7323,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7331,10 +7370,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7346,10 +7385,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -7359,21 +7394,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7669,7 +7696,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7806,6 +7833,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FpSchema if pSchema != uintptr(0) { @@ -7829,6 +7858,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7843,9 +7873,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8088,7 +8121,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8114,13 +8147,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8196,7 +8229,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -8218,7 +8251,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8275,7 +8308,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8408,7 +8441,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 92)) = Time_t((*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000)) } if osLocaltime(tls, bp+92, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8432,12 +8465,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8449,7 +8482,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8471,7 +8504,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8485,7 +8518,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8493,7 +8526,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8505,7 +8538,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8539,9 +8572,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -8560,7 +8593,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8574,14 +8607,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8907,7 +8940,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8917,13 +8950,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8941,41 +8974,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8988,7 +9021,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9038,15 +9071,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9197,7 +9230,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9461,7 +9494,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9494,7 +9527,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9904,7 +9937,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(4) defer tls.Free(4) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9940,7 +9973,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9960,7 +9993,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10009,24 +10042,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10342,7 +10402,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10415,8 +10475,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10628,7 +10688,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11185,7 +11245,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11245,7 +11305,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint32(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint32(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11586,7 +11646,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11710,9 +11770,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11860,7 +11920,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11877,10 +11937,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11935,7 +11995,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12100,7 +12160,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12332,20 +12392,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint32(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12358,46 +12524,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint32(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint32(44)) } 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(*(*int8)(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 + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - sqlite3Prng.FisInit = uint8(1) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint32(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint32(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13698,7 +13864,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -14249,7 +14415,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14268,13 +14434,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14287,7 +14453,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14760,193 +14926,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15312,35 +15478,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15433,11 +15599,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*12 + 4)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15516,13 +15685,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15530,7 +15699,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15551,7 +15720,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15653,19 +15822,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32) if rc != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, 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+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, 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+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16028,7 +16197,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16301,7 +16470,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16319,7 +16488,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16336,14 +16505,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16363,7 +16532,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16418,7 +16587,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16431,7 +16600,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16499,7 +16668,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16658,7 +16827,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16686,7 +16855,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16749,7 +16918,7 @@ __4: ; libc.Xmemset(tls, pShmNode, 0, uint32(unsafe.Sizeof(unixShmNode{}))+uint32(nShmFilename)) zShm = libc.AssignPtrUintptr(pShmNode+8, pShmNode+1*68) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16770,7 +16939,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0400000, @@ -16785,7 +16954,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -16911,11 +17080,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 96)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+96) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+96) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -16961,7 +17130,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17162,7 +17331,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17178,7 +17347,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } pNew = (*(*func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*12 + 4)))(tls, pOrig, uint32(nReuse), uint32(nNew), MREMAP_MAYMOVE, 0) - zErr = ts + 3417 + zErr = ts + 3431 if pNew == libc.UintptrFromInt32(-1) || pNew == uintptr(0) { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*12 + 4)))(tls, pOrig, uint32(nReuse)) @@ -17192,7 +17361,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17307,10 +17476,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_EXCL) } @@ -17326,7 +17495,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+8) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17339,7 +17508,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17347,7 +17516,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17360,15 +17529,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17413,7 +17582,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17498,7 +17667,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17546,10 +17715,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17663,7 +17832,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17754,7 +17923,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17762,9 +17931,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17831,18 +18000,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, bp+96, uint32(unsafe.Sizeof([4098]int8{}))-uint32(2)) if got <= 0 || got >= Ssize_t(unsafe.Sizeof([4098]int8{}))-2 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 96 + uintptr(got))) = int8(0) @@ -17882,14 +18051,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4100)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, bp, uint32(unsafe.Sizeof([4098]int8{}))-uint32(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4100, bp) } appendAllPathElements(tls, bp+4100, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4100)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+4100)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4100)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4100)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17945,7 +18114,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17973,11 +18142,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint32(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint32(unsafe.Sizeof(Time_t(0)))) @@ -17988,7 +18157,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18065,10 +18234,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18120,7 +18289,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18287,40 +18456,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18331,7 +18545,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18387,7 +18601,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint32(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18463,7 +18677,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18584,7 +18798,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18657,7 +18871,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18720,6 +18934,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19403,6 +19622,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19435,6 +19655,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 28)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21862,7 +22083,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -22999,7 +23220,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23060,7 +23281,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint32(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint32(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23073,7 +23294,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint32(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint32(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23125,9 +23346,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23391,7 +23612,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23515,7 +23736,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23554,7 +23775,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23631,7 +23852,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23758,6 +23979,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24631,7 +24853,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24816,7 +25038,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25385,7 +25607,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25484,7 +25706,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25652,7 +25874,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26069,7 +26291,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+12) @@ -26214,7 +26436,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26344,7 +26566,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26817,7 +27039,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27322,7 +27544,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27712,7 +27934,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27977,7 +28199,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28114,7 +28336,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28131,7 +28353,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28139,7 +28361,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28182,7 +28404,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28192,7 +28414,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28442,7 +28664,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28474,8 +28696,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28490,7 +28711,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28500,7 +28721,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28513,7 +28734,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28522,14 +28743,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -28539,7 +28760,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28586,63 +28807,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint32(usableSize-iCellStart)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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), uint32(usableSize-iCellStart)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint32(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28674,10 +28889,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint32(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28688,15 +28902,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28721,7 +28935,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28732,7 +28946,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28780,26 +28994,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28809,7 +29023,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28817,7 +29031,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28825,10 +29039,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28897,7 +29111,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -28927,11 +29141,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -28942,15 +29156,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28978,14 +29192,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -28999,7 +29213,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29011,7 +29225,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29114,7 +29328,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29142,7 +29356,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29181,7 +29395,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29205,7 +29419,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+452) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+456) } // Open a database file. @@ -29254,7 +29468,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30026,7 +30240,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint32(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint32(3)) != 0) { goto __14 } goto page1_init_failed @@ -30064,7 +30278,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30479,7 +30693,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30505,7 +30719,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30513,6 +30727,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30522,7 +30739,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30538,7 +30755,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30599,7 +30816,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30634,7 +30851,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) if *(*Pgno)(unsafe.Pointer(bp + 24)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30694,7 +30911,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30733,7 +30950,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30764,7 +30981,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31105,7 +31322,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31349,14 +31566,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } getCellInfo(tls, pCur) aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload if Uptr((int32(aPayload)-int32((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > (*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31401,7 +31618,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31450,7 +31667,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31529,10 +31746,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31540,7 +31755,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*uintptr)(unsafe.Pointer(pCur + 112 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*4)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ - return getAndInitPage(tls, pBt, newPgno, pCur+108, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+108, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31602,7 +31818,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+108, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+108, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31622,7 +31838,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31642,7 +31858,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31854,7 +32070,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32058,7 +32274,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32123,7 +32339,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32171,7 +32387,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32290,7 +32506,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32450,7 +32666,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32515,7 +32731,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -32551,7 +32767,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32595,7 +32811,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32707,7 +32923,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32865,7 +33081,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -32922,7 +33138,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -32938,7 +33154,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33012,7 +33228,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33024,7 +33240,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 4)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -33035,7 +33251,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33200,7 +33416,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33471,12 +33687,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33484,7 +33700,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -33544,7 +33760,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -33633,7 +33849,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -33749,7 +33965,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 80)) = allocateBtreePage(tls, pBt, bp, bp+4, uint32(0), uint8(0)) @@ -34067,7 +34283,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34078,7 +34294,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34236,7 +34452,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34310,7 +34526,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34372,7 +34588,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34400,7 +34616,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -34661,7 +34877,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34853,7 +35069,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34890,6 +35106,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } else { var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 112 + uintptr(iPage-1)*4)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 64 + uintptr(iPage-1)*2))) @@ -34980,7 +35198,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35003,7 +35221,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35083,7 +35301,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35196,7 +35414,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 84)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 84)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 84)) = btreeComputeFreeSpace(tls, pPage) @@ -35257,7 +35475,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 84)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35295,13 +35513,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 88))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 88)))) @@ -35408,7 +35626,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35431,7 +35649,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35532,7 +35750,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 20)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35540,11 +35758,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35619,7 +35837,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35688,7 +35906,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35717,7 +35935,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12))) @@ -35793,7 +36011,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 24)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35807,7 +36025,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -35941,7 +36159,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36129,7 +36347,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+40, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+40, ts+4062, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+40, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -36154,11 +36372,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+304, 0) != 0 { @@ -36179,13 +36397,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36204,7 +36422,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36215,7 +36433,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36238,12 +36456,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36350,13 +36568,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36367,7 +36585,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36375,14 +36593,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36399,7 +36617,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36424,7 +36642,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36437,7 +36655,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+108)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36453,7 +36671,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+108)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+108)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 100)) = (*CellInfo)(unsafe.Pointer(bp + 108)).FnKey @@ -36491,7 +36709,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36564,7 +36782,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 128))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 128))>>16, iPage)) goto __30 goto __32 __31: @@ -36581,7 +36799,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36701,7 +36919,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36737,7 +36955,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36747,7 +36965,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36794,13 +37012,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37035,6 +37253,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37048,8 +37275,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37057,7 +37284,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37068,7 +37295,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37083,7 +37310,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37103,7 +37330,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37552,7 +37779,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37969,6 +38196,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37984,7 +38224,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38044,6 +38284,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 12)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38126,7 +38369,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38358,7 +38601,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38589,7 +38832,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38651,7 +38894,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38692,7 +38935,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38711,7 +38954,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39015,7 +39258,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39030,14 +39273,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39096,6 +39339,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39120,10 +39366,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+100, 0, uint32(unsafe.Sizeof(Vdbe{}))-uint32(uintptr(0)+100)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 8 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 4 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39161,21 +39407,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39524,85 +39778,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 + } + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 20 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39702,6 +39988,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39729,7 +40025,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39737,12 +40033,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39761,7 +40057,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39812,7 +40110,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 20 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -39941,8 +40239,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -39953,10 +40251,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39967,6 +40261,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39982,34 +40281,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 20 + uintptr(j)*4)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { - zColl = ts + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40017,7 +40316,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40025,32 +40324,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40060,13 +40359,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40074,7 +40373,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40085,20 +40384,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40123,7 +40422,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40225,7 +40524,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40574,8 +40873,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40784,7 +41083,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40792,16 +41091,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -40947,7 +41246,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41227,7 +41526,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41237,14 +41536,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41255,16 +41556,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41281,7 +41578,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41832,16 +42129,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(7) { @@ -41859,7 +42160,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else { @@ -41889,7 +42194,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41923,7 +42228,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41946,7 +42251,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 48)) != U32(10)) } if rc != 0 { @@ -41968,7 +42273,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 40 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 48))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 48))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42112,7 +42424,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42283,7 +42595,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42309,7 +42621,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42352,7 +42664,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+144, Bft(iCode+1), 0, 0x3) } } @@ -42420,13 +42732,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42457,7 +42769,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42512,7 +42824,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*40) } - Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42531,7 +42843,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42541,7 +42853,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42583,14 +42895,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42802,6 +43115,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -42998,7 +43315,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43189,7 +43506,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43264,7 +43581,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43693,35 +44010,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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)*40 Xsqlite3VdbeMemRelease(tls, pVar) (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43736,7 +44052,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*40 @@ -43768,7 +44084,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, rValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43783,7 +44099,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, iValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43794,7 +44110,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43804,7 +44120,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, pPtr, zPTtype, xDestructor) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43880,7 +44196,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, n) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -44024,7 +44340,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44042,8 +44358,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 156 + uintptr(op)*4)) @@ -44107,7 +44426,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44251,7 +44570,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44423,7 +44742,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, (int32(zRawSql)-int32(zStart))/1) } @@ -44459,11 +44778,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 76))-1)*40 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { - Xsqlite3_str_append(tls, bp+48, ts+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44478,21 +44797,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 80 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+80) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44548,7 +44867,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44652,12 +44972,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44709,11 +45028,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44751,7 +45070,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44780,11 +45098,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44854,42 +45175,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44897,52 +45219,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44984,19 +45306,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45005,7 +45327,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45013,11 +45335,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45253,7 +45575,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45748,20 +46070,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = (int32(pOp) - int32(aOp)) / 20 - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46151,14 +46473,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) if !(int32(type1)&int32(type2)&MEM_Int != 0) { goto __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46236,72 +46558,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46318,10 +46648,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, int64(0)) -__275: +__276: ; goto __8 @@ -46333,33 +46663,33 @@ __43: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46368,43 +46698,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint32(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46420,26 +46750,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46447,12 +46777,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46467,17 +46797,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46492,163 +46822,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46657,20 +46987,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46680,15 +47010,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46696,9 +47026,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46710,52 +47040,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*40, aMem+uintptr(U32(p21)+idx)*40, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&KEYINFO_ORDER_BIGNULL != 0 && (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*40)).Fflags)&MEM_Null != 0)) { - goto __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*20 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*20 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46764,24 +47094,24 @@ __59: v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { - goto __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46795,13 +47125,13 @@ __61: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46810,38 +47140,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } iAddr = U32((int32(pOp) - int32((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 20) 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46850,10 +47180,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46861,10 +47191,10 @@ __65: c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) if !(c1 != 0) { - goto __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46872,35 +47202,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 80 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fflags)&MEM_Null != 0) { - goto __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, int64(0)) -__353: +__362: ; goto __8 @@ -46908,372 +47276,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { - goto __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*40 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*40 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272)) - *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) + *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 272)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 272)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 272))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 116))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 272))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 272)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 272))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 116))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 272)), pDest) *(*U16)(unsafe.Pointer(pDest + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47281,15 +47650,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47298,124 +47667,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 40 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 40 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47425,40 +47794,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 40 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47476,339 +47845,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 40 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 40 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 16)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+276, pRec, uint32(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 276)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 276)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 276)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 40 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47817,20 +48186,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 284)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 284)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+284) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 284)) @@ -47841,244 +48210,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*24 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48087,172 +48456,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 292)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+292) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 144))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; 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(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48272,36 +48641,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48309,22 +48678,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 144))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48335,24 +48704,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*40 @@ -48360,30 +48729,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48399,10 +48768,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48411,10 +48780,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -48434,83 +48803,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48519,31 +48888,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48551,10 +48920,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48575,105 +48944,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) eqOnly = 0 - (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+300) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+300) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+300) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), int64(U64(iKey)), 0, bp+300) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 304)).Fdefault_rc = func() int8 { @@ -48685,231 +49054,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 304)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304, bp+300) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+304, bp+300) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+304)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 300)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 20 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*20 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 332)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 332)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 360)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+332, bp+360) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+332, bp+360) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 360)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 360)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 360)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 360)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+364)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 364)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 364)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), bp+364, pC7+28) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+364, pC9+28) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48919,85 +49290,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, pC7+28) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), pIdxKey, pC9+28) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+364)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+364)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49005,59 +49376,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 392)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+392, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+392)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 392))) goto notExistsWithKey -__669: +__678: ; __104: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) notExistsWithKey: - pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 36)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 36)) *(*int32)(unsafe.Pointer(bp + 432)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+432) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 432)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 432)) if !(*(*int32)(unsafe.Pointer(bp + 432)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49072,121 +49443,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 436)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+436) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), bp+436) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 436)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 440)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 440)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) + *(*I64)(unsafe.Pointer(bp + 440)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 440)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 440))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 440)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 440)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 440)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+440) *(*I64)(unsafe.Pointer(bp + 440)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 440))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 440)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 440)))), 0, bp+436)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 436)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 436)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 440)) goto __8 @@ -49194,93 +49565,93 @@ __689: __107: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 448)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+448)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+448)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 448)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 448)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 448)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 448)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 448)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 448)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+448, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 36)), bp+448, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49293,7 +49664,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+448)).FnKey) -__706: +__715: ; goto __8 @@ -49308,81 +49679,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) - (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49392,38 +49763,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 480)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+480) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+480) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49431,205 +49802,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 36)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 36)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 484)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 484)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 36)))).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 + 36)), bp+484) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36)), bp+484) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 484)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 36))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 36)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) *(*int32)(unsafe.Pointer(bp + 492)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+492) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 492))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 492))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 492)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 36)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+496) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 496)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 496)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 496)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49639,90 +50010,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+500) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+500) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+500) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) if !(*(*int32)(unsafe.Pointer(bp + 500)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 156 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49731,36 +50102,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 504)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 504)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 504)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 504)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 36)), bp+504, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 36)), bp+504, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 @@ -49771,88 +50142,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) - (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 536)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+536, bp+564) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 568)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+568) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+568) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -49864,35 +50235,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 568)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -49901,63 +50272,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 616)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 616)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 616)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 36)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 36)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+576, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+576) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+576) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+576)).Fn, (*Mem)(unsafe.Pointer(bp+576)).Fz, bp+616, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+576) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49966,13 +50337,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 644)) = 0 @@ -49980,20 +50351,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 644))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 644)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 644))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50003,45 +50374,45 @@ __136: 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+648) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 40)) += *(*I64)(unsafe.Pointer(bp + 648)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 648)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50054,10 +50425,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+656, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 656))) goto __8 @@ -50068,10 +50439,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50079,30 +50450,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+120, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 660)).Fdb = db (*InitData)(unsafe.Pointer(bp + 660)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 660)).FpzErrMsg = p + 120 (*InitData)(unsafe.Pointer(bp + 660)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 660)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 660)).Frc = SQLITE_OK @@ -50112,36 +50483,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+660, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 660)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+660)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50149,10 +50520,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50184,22 +50555,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+688) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 688)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 688)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50209,15 +50580,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50227,17 +50598,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+692) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 692))) -__803: +__812: ; goto check_for_interrupt @@ -50247,34 +50618,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50283,48 +50654,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 116 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -50332,10 +50703,10 @@ __817: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50357,24 +50728,24 @@ __818: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem1 = pFrame2 + 88 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 40 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50406,78 +50777,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 524)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 528)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 516)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 520)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 60)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50485,11 +50856,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50505,14 +50876,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 700)) -__838: +__847: ; goto __8 @@ -50520,16 +50891,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50537,16 +50908,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50557,10 +50928,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -50583,73 +50954,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50659,22 +51030,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50687,32 +51058,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+708+1*4, bp+708+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 708)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 708 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 40 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50724,70 +51095,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50795,17 +51166,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50815,10 +51186,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50832,10 +51203,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50845,69 +51216,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+144, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 36))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 36))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 36))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -50915,16 +51286,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -50937,17 +51308,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+720) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+120) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+720) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -50957,24 +51328,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 760)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50982,52 +51353,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+760) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 760)) + *(*uintptr)(unsafe.Pointer(pCur3 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 760)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 760))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pArgc = pQuery + 1*40 - pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 36)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 36)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51036,54 +51407,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+764, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) @@ -51091,69 +51462,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 764)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+764, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36)), bp+764, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+764)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 764)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule rc = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51165,27 +51536,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 28)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51193,42 +51564,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 796)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51237,41 +51608,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 796)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51285,16 +51656,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51306,25 +51677,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51333,24 +51704,24 @@ __924: })(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+28) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+220, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51375,16 +51746,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 156 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 156 + 7*4))++ -__932: +__941: ; goto __8 @@ -51399,66 +51770,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 156 + 6*4))++ @@ -51479,73 +51850,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 28)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 156 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51553,13 +51924,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51570,10 +51941,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51622,16 +51997,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51651,10 +52026,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51664,8 +52039,8 @@ 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 { - bp := tls.Alloc(324) - defer tls.Free(324) + bp := tls.Alloc(328) + defer tls.Free(328) var nAttempt int32 var iCol int32 @@ -51685,7 +52060,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51705,8 +52080,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51714,21 +52089,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51737,8 +52112,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51771,8 +52146,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51799,7 +52174,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+36+uintptr(j)*8)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51832,7 +52207,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -51852,8 +52227,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51922,7 +52297,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+320) + rc = blobSeekToRow(tls, pBlob, iRow, bp+324) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51950,12 +52325,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 320)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 324)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 320)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 324)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51999,7 +52374,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52082,7 +52457,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52095,7 +52470,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54525,11 +54900,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54689,7 +55060,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54810,7 +55181,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -54966,14 +55337,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -54990,7 +55361,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 8)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55084,7 +55455,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 140)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55093,7 +55464,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 148)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55148,7 +55519,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55156,14 +55527,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55215,7 +55586,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+44, 0, uint32(unsafe.Sizeof(struct { FpTab uintptr @@ -55255,7 +55626,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 20)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55268,23 +55639,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55387,15 +55758,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55474,10 +55845,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55524,7 +55895,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55588,7 +55959,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*20)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55604,7 +55975,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55618,7 +55989,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55641,30 +56012,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55736,7 +56107,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20))) } @@ -55752,7 +56123,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55808,7 +56179,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55883,7 +56254,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55903,7 +56274,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55938,7 +56309,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55995,7 +56366,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 8 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56023,7 +56394,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56237,7 +56608,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56277,7 +56648,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56288,7 +56659,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56300,7 +56671,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56400,12 +56771,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg @@ -56441,12 +56812,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*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)) @@ -56565,9 +56936,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) } if op == TK_COLUMN || op == TK_AGG_COLUMN { - if *(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0 { - return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) } if op == TK_SELECT { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList+8)).FpExpr) @@ -56655,14 +57024,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { - if *(*uintptr)(unsafe.Pointer(p + 44)) != uintptr(0) { - var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) - if j >= 0 { - var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) - pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) - } - break + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { + var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) + 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 @@ -56990,7 +57358,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57065,7 +57433,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57233,12 +57601,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57309,12 +57682,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57353,7 +57726,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57379,7 +57752,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 20)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57407,7 +57780,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57454,7 +57827,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 116 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 116 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57479,7 +57852,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 116 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57500,11 +57873,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57533,7 +57903,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57629,7 +58003,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58053,7 +58427,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58176,7 +58550,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58186,10 +58560,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 20 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58230,10 +58606,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58663,13 +59039,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -58873,7 +59249,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58951,7 +59327,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { - goto __56 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - goto __60 -__59: - ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { - goto __61 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0) { - goto __63 - } aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) - goto __64 -__63: - aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) -__64: - ; if !(aff > SQLITE_AFF_BLOB) { - goto __65 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*16 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __70 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, (*Expr)(unsafe.Pointer(pExpr)).Fop2) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { - goto __76 - } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) -__76: - ; return iReg -__6: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60345,7 +60760,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60359,10 +60774,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60375,8 +60790,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60384,12 +60799,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60415,10 +60830,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60429,14 +60842,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60466,27 +60881,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60495,9 +60910,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60505,15 +60920,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, libc.VaList(bp+8, pExpr)) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem __88: ; - goto __3 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60544,8 +60959,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60667,8 +61082,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60689,9 +61104,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60704,13 +61119,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60721,11 +61136,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60747,12 +61162,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60767,14 +61182,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60782,9 +61221,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60794,15 +61233,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60812,22 +61251,22 @@ __125: pTest = bp + 100 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 100)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60836,51 +61275,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*20)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*20)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60889,18 +61328,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61112,7 +61551,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61349,6 +61788,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61573,6 +62013,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61718,7 +62159,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62245,7 +62690,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) } - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+28)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+28)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+28)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62263,8 +62710,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*20)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62332,6 +62778,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 8)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62355,7 +62803,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62378,7 +62828,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62391,7 +62841,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62411,7 +62863,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62551,7 +63005,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } - return *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62559,7 +63013,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62610,11 +63064,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62626,13 +63080,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62642,10 +63096,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62709,7 +63163,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62719,7 +63173,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62728,7 +63182,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62769,19 +63223,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62789,7 +63243,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62801,7 +63255,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62813,7 +63267,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62859,12 +63313,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62874,11 +63328,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 44 + 4)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -62891,12 +63345,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62907,7 +63361,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 44)), zCol, *(*int32)(unsafe.Pointer(pNew + 44)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62929,7 +63383,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -62977,14 +63431,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63012,7 +63466,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nAlloc))) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63052,18 +63506,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63147,11 +63601,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63164,17 +63618,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63369,7 +63823,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 268; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { + for pp = pParse + 272; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { @@ -63432,12 +63886,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63477,8 +63931,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63495,7 +63949,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63517,7 +63971,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63557,12 +64011,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63736,8 +64190,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr @@ -63820,15 +64274,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+20, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp + 20 - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + 20 + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63856,7 +64310,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63889,13 +64343,13 @@ __15: renameTokenFind(tls, bp+20, bp, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) __16: ; - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 20)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63908,7 +64362,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63923,7 +64377,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FaCol+uintptr(i)*16) - Xsqlite3WalkExpr(tls, bp+292, pExpr) + Xsqlite3WalkExpr(tls, bp+296, pExpr) goto __24 __24: i++ @@ -63979,8 +64433,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+20) @@ -64028,7 +64482,7 @@ __39: renameColumnIdlistNames(tls, bp+20, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) __35: ; __8: @@ -64048,7 +64502,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+20)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64096,8 +64550,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(352) - defer tls.Free(352) + bp := tls.Alloc(356) + defer tls.Free(356) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64139,11 +64593,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 44)) - libc.Xmemset(tls, bp+320, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 320)).FpParse = bp + 48 + libc.Xmemset(tls, bp+324, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 324)).FpParse = bp + 48 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+320) + Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+324) if (*Parse)(unsafe.Pointer(bp+48)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 48)).Frc } else { @@ -64213,7 +64667,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*4))) } else if (*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0 { - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64236,8 +64690,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64255,16 +64709,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + 272 + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp + 276 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64279,31 +64733,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+292, + Xsqlite3WalkExpr(tls, bp+296, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*16)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+272, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+276, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+272)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+276)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64321,8 +64775,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(304) - defer tls.Free(304) + bp := tls.Alloc(308) + defer tls.Free(308) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64348,9 +64802,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*U64)(unsafe.Pointer(db + 28)) |= 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 { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 272)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+272) + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 276)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+276) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64378,8 +64832,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(296) - defer tls.Free(296) + bp := tls.Alloc(300) + defer tls.Free(300) var db uintptr var iSchema int32 @@ -64416,7 +64870,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64440,7 +64894,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64521,19 +64975,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64542,7 +64996,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64556,13 +65010,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 @@ -64680,11 +65134,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64718,7 +65172,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64727,10 +65181,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64748,9 +65202,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64940,7 +65394,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65191,7 +65645,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(72) @@ -65205,7 +65659,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65218,7 +65672,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65260,7 +65714,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11397, 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)).FnChar-- @@ -65274,7 +65728,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65318,7 +65772,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65335,7 +65789,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+11272, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65491,7 +65945,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65548,7 +66002,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65595,9 +66049,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65680,7 +66134,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65702,15 +66156,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -65986,11 +66440,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66037,10 +66491,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66098,7 +66552,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66128,20 +66582,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 168 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0)) { goto __5 } @@ -66157,13 +66611,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11600, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11614, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 116 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 116 + 7*4)))) goto attach_error __7: @@ -66177,7 +66631,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66188,7 +66642,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+464) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+468) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Db{}))*uint32(3))) @@ -66241,7 +66695,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66258,7 +66712,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66324,13 +66778,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66377,7 +66831,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66408,14 +66862,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66423,7 +66877,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66534,7 +66988,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66547,7 +67001,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66561,7 +67015,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66593,7 +67047,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66768,7 +67222,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66794,11 +67248,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66845,7 +67299,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName } else { - zCol = ts + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66869,7 +67323,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66963,6 +67417,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66990,9 +67446,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67011,62 +67466,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) - } - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*20 + 16)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) } + } - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) } - - Xsqlite3VdbeGoto(tls, v, 1) } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67113,13 +67560,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+196)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+200)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+196)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+200)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67144,25 +67591,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 0 { i = 0 } else { return uintptr(0) } } 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67183,12 +67630,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67217,9 +67664,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+396, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67230,21 +67677,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67274,12 +67721,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67384,10 +67831,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+464 { - libc.Xmemcpy(tls, db+464, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+468 { + libc.Xmemcpy(tls, db+468, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 464 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 468 } } @@ -67543,11 +67990,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 8))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67564,7 +68011,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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+24, zName, uintptr(0)) @@ -67593,7 +68040,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67637,7 +68084,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67663,7 +68110,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67716,13 +68163,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67760,13 +68207,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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*4))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*4))) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67926,9 +68373,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67944,7 +68391,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -67972,9 +68419,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -67990,9 +68437,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68023,12 +68470,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68043,7 +68490,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68078,8 +68525,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - reg1 = libc.AssignPtrInt32(pParse+88, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) - reg2 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg1 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+96, 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) @@ -68100,7 +68547,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 132)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 136)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68130,7 +68577,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68154,7 +68601,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68163,7 +68610,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 132)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 136)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68174,7 +68621,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68186,7 +68633,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -68220,7 +68667,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68228,13 +68675,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12390, 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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12397, 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)).Fn-- @@ -68271,7 +68718,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68435,10 +68882,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Expr{}))) @@ -68469,7 +68916,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68514,7 +68961,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68603,7 +69050,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68629,7 +69076,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*16)).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+72, 1) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+76, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -68698,7 +69145,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68711,13 +69158,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68750,7 +69197,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68871,13 +69318,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68885,7 +69332,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -68919,16 +69366,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69067,8 +69514,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 132)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 132)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 136)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 136)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69195,7 +69642,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+392, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+396, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return 0 } @@ -69219,7 +69666,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+392, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+396, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return } @@ -69318,7 +69765,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69335,10 +69782,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69357,11 +69804,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69395,7 +69842,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69420,11 +69867,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69486,7 +69933,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 196 + pEnd2 = pParse + 200 } else { pEnd2 = pEnd } @@ -69495,11 +69942,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69515,13 +69962,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69536,7 +69983,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69566,7 +70013,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69582,7 +70029,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+4, pSelect) != 0) { goto __3 } @@ -69645,10 +70092,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69666,12 +70110,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69731,6 +70171,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69790,13 +70237,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -69837,10 +70284,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69872,12 +70319,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -69905,11 +70352,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -69987,9 +70434,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zArg2 = uintptr(0) @@ -70048,21 +70495,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70074,7 +70521,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70138,7 +70585,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -70150,7 +70597,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70235,7 +70682,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -70462,12 +70909,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 8 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70588,7 +71035,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -70607,7 +71054,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70633,26 +71080,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70666,7 +71113,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70678,10 +71125,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70693,7 +71140,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70722,7 +71169,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70743,9 +71190,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70784,7 +71231,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70885,7 +71332,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -70899,6 +71346,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -70919,6 +71367,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) __61: ; __59: @@ -71100,7 +71549,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71152,8 +71601,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71199,12 +71648,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71212,7 +71661,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71226,7 +71675,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71387,7 +71836,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71402,7 +71851,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71413,9 +71862,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71441,9 +71890,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71524,6 +71973,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71531,7 +71981,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*8)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71577,7 +72027,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71712,6 +72162,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71723,11 +72174,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 36 + 4))&0x2>>1)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 60))) @@ -71754,7 +72207,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71782,12 +72235,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -71956,7 +72409,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71992,9 +72445,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72019,7 +72472,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72034,7 +72487,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72052,7 +72505,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72338,7 +72791,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72434,7 +72887,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72534,7 +72987,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+436, zName) + pColl = Xsqlite3HashFind(tls, db+440, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72548,7 +73001,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*20)).FzName = pColl + 3*20 (*CollSeq)(unsafe.Pointer(pColl + 2*20)).Fenc = U8(SQLITE_UTF16BE) libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint32(nName)) - pDel = Xsqlite3HashInsert(tls, db+436, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+440, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72627,7 +73080,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72754,7 +73207,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+420, zName) + p = Xsqlite3HashFind(tls, db+424, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72788,7 +73241,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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+420, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) + pOther = Xsqlite3HashInsert(tls, db+424, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72811,26 +73264,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(592) + defer tls.Free(592) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 16)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 576)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 560)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash Xsqlite3HashInit(tls, pSchema+40) Xsqlite3HashClear(tls, pSchema+24) - for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { - Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) + for pElem = (*Hash)(unsafe.Pointer(bp + 560)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+560) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 16)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 576)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+16) + Xsqlite3HashClear(tls, bp+576) Xsqlite3HashClear(tls, pSchema+56) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -72896,10 +73350,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -72912,19 +73382,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73151,17 +73623,19 @@ __18: goto __20 } - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } - Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73174,10 +73648,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+8)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73186,15 +73660,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73203,98 +73677,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+40) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.Xmemset(tls, aToOpen, 1, uint32(nIdx+1)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 40)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73302,138 +73776,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+48, bp+52) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 48))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 48)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 48)), *(*int32)(unsafe.Pointer(bp + 52)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 40 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73536,7 +74015,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73766,7 +74245,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73825,7 +74304,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74129,7 +74608,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74319,7 +74798,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 8)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74432,13 +74911,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74461,7 +74954,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 116 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74471,7 +74964,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74524,7 +75017,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74564,13 +75057,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74578,7 +75071,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74607,13 +75100,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -74923,7 +75416,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74935,7 +75428,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -74959,7 +75452,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -74984,7 +75477,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75062,7 +75555,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75324,7 +75817,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75344,14 +75837,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75591,107 +76084,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15076}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15421}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15123}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15143}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15143}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15149}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15464}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75812,7 +76305,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+15549, + ts+15596, 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) @@ -76472,8 +76965,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76552,7 +77045,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 40)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName (*Token)(unsafe.Pointer(bp + 40)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+40)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -76655,7 +77148,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 44 + 4)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76763,6 +77256,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).Faffinity + } + } + for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76803,13 +77317,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76821,21 +77334,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).Faffinity - } - } - for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -76906,7 +77409,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -76964,7 +77467,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77267,6 +77770,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77430,7 +77935,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -77455,7 +77960,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77604,7 +78109,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77614,7 +78119,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77666,7 +78171,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77674,7 +78179,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -77856,7 +78361,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*20)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*20)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77871,137 +78389,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*20)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { - goto __107 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78013,64 +78531,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 144)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+144, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 144)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78078,7 +78600,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78380,7 +78906,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79471,13 +79997,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -79916,6 +80442,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79954,7 +80481,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -79963,7 +80490,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79978,7 +80505,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80014,7 +80541,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80028,7 +80555,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80052,7 +80579,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80070,7 +80597,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80097,7 +80624,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80135,7 +80662,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80145,7 +80672,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80300,7 +80827,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80308,63 +80835,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, - ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80381,238 +80908,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80634,7 +81161,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80646,10 +81173,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80658,13 +81185,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80679,9 +81206,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80695,7 +81222,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -80786,19 +81313,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80815,7 +81342,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80862,13 +81389,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -80876,7 +81403,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80901,8 +81428,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(568) - defer tls.Free(568) + bp := tls.Alloc(612) + defer tls.Free(612) var zLeft uintptr var zRight uintptr @@ -81009,13 +81536,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81035,6 +81571,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81085,7 +81623,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81100,7 +81638,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81110,7 +81648,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81127,30 +81665,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 444)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 444 + 1*4)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 444 + 2*4)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 444 + 3*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484 + 1*4)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 484 + 2*4)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 484 + 3*4)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+444) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+484) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 444)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 444))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 484)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 484))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 444)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 484)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 444)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 484)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81371,7 +81909,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81405,7 +81943,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -81414,36 +81952,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+460) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+500) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 460)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 500)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 460)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 500)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 460)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 500)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 460)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 500)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81481,7 +82019,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81562,21 +82100,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 468)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 508)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+468) - if !(*(*I64)(unsafe.Pointer(bp + 468)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+508) + if !(*(*I64)(unsafe.Pointer(bp + 508)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 468)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 508)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 468)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 468))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 468))) + *(*I64)(unsafe.Pointer(bp + 508)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 508))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 508))) goto __15 __23: @@ -81618,15 +82156,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 476)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+476) != 0) || *(*int32)(unsafe.Pointer(bp + 476)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 516)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+516) != 0) || *(*int32)(unsafe.Pointer(bp + 516)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 476)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 516)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 476)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 516)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81663,14 +82201,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 480)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+480) != 0) { + *(*int32)(unsafe.Pointer(bp + 520)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+520) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 480))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 520))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 480)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 520)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 28)) |= uint64(SQLITE_CacheSpill) @@ -81689,17 +82227,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+484) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+524) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81710,7 +82248,7 @@ __114: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).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)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 484))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 524))) __117: ; goto __115 @@ -81722,12 +82260,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+484) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 524)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+524) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 484))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 524))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81764,11 +82302,11 @@ __123: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+492) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 492)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+532) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 532)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81787,7 +82325,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81809,7 +82347,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -81863,7 +82401,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -81960,13 +82498,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 { return 1 @@ -82031,20 +82569,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 496)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+496, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 496))) + *(*uintptr)(unsafe.Pointer(bp + 536)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+536, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 536))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82077,29 +82615,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82165,7 +82703,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82175,7 +82713,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82212,12 +82750,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 500)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 540)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 500 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), + *(*uintptr)(unsafe.Pointer(bp + 540 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82246,7 +82784,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82262,13 +82800,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 436)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 440)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82307,7 +82845,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 420)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 424)).Ffirst __212: if !(j != 0) { goto __214 @@ -82326,13 +82864,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 392)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 396)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82348,7 +82886,7 @@ __218: if !(i6 < int32(uint32(unsafe.Sizeof(aPragmaName))/uint32(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82383,7 +82921,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82391,7 +82929,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82464,20 +83002,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 552)) = 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+512, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 512)) == uintptr(0)) { + 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 + 512)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 512))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) __242: ; goto __240 @@ -82515,12 +83053,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 516)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 556)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+512, bp+516) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+556) __248: ; @@ -82537,8 +83075,8 @@ __250: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __252 } - if *(*uintptr)(unsafe.Pointer(bp + 516)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 516)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 556)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 556)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 36 + uintptr(j3)*8)).FiFrom } @@ -82551,11 +83089,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 512)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 512))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82580,10 +83118,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 556))) goto __246 __246: i8++ @@ -82621,17 +83159,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 520)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+520) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+560) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 520)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 560)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 520)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82647,7 +83185,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 520))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 560))-1, 1) i9 = 0 __264: @@ -82797,7 +83335,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82824,178 +83362,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+524, bp+528) + 1, uintptr(0), bp+564, bp+568) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 524)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 564)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 564)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 524)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 564)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*16 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 524)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 572)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+572) + if !(*(*uintptr)(unsafe.Pointer(bp + 572)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 572))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 572))) +__318: + ; +__317: ; + p11 = *(*int32)(unsafe.Pointer(bp + 564)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + libc.VaList(bp+392, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 524)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 564)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*20)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 524)), 0, 0, bp+532, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 564)), 0, 0, bp+576, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 528))+j4, ckUniq, r1, + 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+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83003,87 +83670,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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)*16 + 4))&0xf>>0)) != 0) { - goto __323 + goto __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 528))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 528))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 532))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 576))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 524)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 564)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 528))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 568))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83101,14 +83774,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(endCode))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 520)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 560)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83116,27 +83789,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83145,25 +83818,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 8 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83171,50 +83844,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(setCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp2 = iCookie (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp5 = U16(1) - goto __340 -__339: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(readCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) -__340: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83229,31 +83909,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83263,10 +83943,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83286,19 +83966,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83307,86 +83987,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__359: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 56))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83394,60 +84074,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+536) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+580) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 536))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 580))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+544) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+588) == SQLITE_OK) { + goto __395 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)))) { - goto __373 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 588)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 588)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 588))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+552) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+596) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 596)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 552))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 596))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+560) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 560)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+604) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 604)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 560)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 604)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83455,10 +84135,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83491,6 +84171,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83502,14 +84190,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83561,7 +84249,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83569,7 +84257,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -83582,19 +84270,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+56) @@ -83610,7 +84298,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83758,7 +84446,7 @@ __1: var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) == uintptr(0) { return SQLITE_NOMEM } @@ -83774,13 +84462,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83789,7 +84477,7 @@ __3: rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+4, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83857,33 +84545,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*4)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*4)) } else { - zObj = ts + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -83943,7 +84631,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+168+8, uint32(0), 0, 0x1) @@ -83975,13 +84663,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84014,16 +84702,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40)).FiDb = iDb @@ -84108,7 +84796,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84143,7 +84831,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84157,7 +84845,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84340,16 +85028,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84417,20 +85109,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var rc int32 var i int32 @@ -84442,8 +85134,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84452,7 +85144,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84463,7 +85155,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84483,7 +85175,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84499,100 +85191,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 116 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr((int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) - goto __13 -__12: - (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84605,7 +85301,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84704,7 +85400,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84847,7 +85543,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85022,8 +85718,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85031,13 +85727,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85212,7 +85908,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 48)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85257,7 +85953,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85268,7 +85964,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*68 + 36 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*68 + 48)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85312,7 +86008,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85659,6 +86355,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85834,7 +86533,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -85896,16 +86595,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -85915,7 +86614,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86121,8 +86820,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 40)) = (*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)) @@ -86261,13 +86960,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86275,7 +86974,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86365,7 +87064,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86375,7 +87074,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 48)) = U32(0) @@ -86391,7 +87090,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -86678,7 +87377,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86769,7 +87468,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86789,7 +87488,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86826,7 +87525,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86860,11 +87559,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86965,8 +87664,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87013,7 +87712,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87080,7 +87779,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -87142,7 +87841,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -87295,10 +87994,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87552,8 +88251,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87580,13 +88279,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87598,7 +88297,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87699,7 +88398,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87724,6 +88423,7 @@ type SubstContext1 = struct { FiNewTable int32 FisOuterJoin int32 FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87740,7 +88440,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87777,7 +88477,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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)*20)).FpExpr + var iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*20)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87788,6 +88489,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87812,15 +88514,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*20)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -87997,9 +88704,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(52) + defer tls.Free(52) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88068,7 +88782,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88084,17 +88797,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*68)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 48)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88115,7 +88819,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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)*20 + 16))) == 0 { return 0 @@ -88127,6 +88830,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*20)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*20)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88282,6 +88996,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88305,8 +89020,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+20, pParse) - Xsqlite3WalkSelect(tls, bp+20, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+24, pParse) + Xsqlite3WalkSelect(tls, bp+24, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88482,8 +89197,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(24) + defer tls.Free(24) var pNew uintptr var nChng int32 = 0 @@ -88500,6 +89215,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88529,6 +89249,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88562,12 +89283,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88633,7 +89354,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88716,7 +89437,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88845,7 +89566,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 60)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 60)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 8, 0x100) @@ -88871,7 +89592,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88887,7 +89608,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -88913,7 +89634,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -88924,9 +89645,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88953,9 +89674,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -88973,7 +89694,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89085,7 +89806,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89104,7 +89825,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -89112,7 +89833,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x80>>7)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89213,7 +89934,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89228,7 +89949,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*20 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 7, 0x80) } @@ -89293,7 +90014,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89305,7 +90026,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89324,9 +90045,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89336,7 +90057,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89486,13 +90207,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89673,19 +90394,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89698,7 +90419,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89856,7 +90577,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -89955,7 +90675,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90016,7 +90736,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90120,7 +90840,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90130,7 +90850,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 216)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 36 + 4))&0x100>>8) == 0 || @@ -90162,7 +90882,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 5, 0x20) @@ -90220,8 +90940,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+88) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+88)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90255,7 +90978,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 216)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90348,16 +91071,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 32)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90366,13 +91094,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90384,52 +91112,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90447,111 +91175,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+116, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 20 - goto __76 goto __78 __78: + k-- + pItem2 += 20 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 20 - goto __79 goto __81 __81: + k-- + pItem2 += 20 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*20)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*20)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+128, 0, uint32(unsafe.Sizeof(NameContext{}))) @@ -90570,33 +91298,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+128, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+128, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+128, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+160) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*20)).FpFExpr @@ -90604,28 +91332,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+128, *(*uintptr)(unsafe.Pointer(pExpr + 20))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+128, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 128 + 24)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90636,7 +91364,7 @@ __98: (*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 + 20)) != uintptr(0)) { - goto __101 + goto __102 } pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) + 8)).FpExpr pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) @@ -90647,7 +91375,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90673,7 +91401,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90686,27 +91414,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90714,49 +91442,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*20)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*20 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90770,45 +91498,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*20)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90827,16 +91555,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90867,16 +91595,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90889,98 +91617,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) @@ -90989,79 +91717,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 160)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91135,7 +91863,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) if !(z == uintptr(0)) { goto __10 } @@ -91157,7 +91885,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91253,7 +91981,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91345,7 +92073,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91390,7 +92118,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91434,7 +92162,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -91452,7 +92180,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91464,7 +92192,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91479,7 +92207,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91491,22 +92219,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91515,7 +92243,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91544,9 +92272,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91664,7 +92392,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91697,7 +92425,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91722,13 +92450,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -91984,7 +92712,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92023,9 +92751,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92037,7 +92765,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92151,12 +92879,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92270,7 +92998,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92321,7 +93049,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 132)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 136)) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+76, 0, uint32(unsafe.Sizeof(SrcList{}))) @@ -92390,7 +93118,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92453,8 +93181,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(312) - defer tls.Free(312) + bp := tls.Alloc(316) + defer tls.Free(316) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92487,26 +93215,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 16 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+280, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 280)).FpParse = bp + 8 + libc.Xmemset(tls, bp+284, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 284)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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+280, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+284, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92523,7 +93251,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt transferParseError(tls, pParse, bp+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+96) + (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+100) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92716,10 +93444,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(4) defer tls.Free(4) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) var enc U8 = (*Sqlite3)(unsafe.Pointer(Xsqlite3VdbeDb(tls, v))).Fenc - var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), Xsqlite3ColumnExpr(tls, pTab, pCol), enc, @@ -92728,7 +93458,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93090,7 +93820,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -93122,7 +93852,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93132,7 +93862,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16)).FzCnName }(), @@ -94002,7 +94732,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94308,10 +95038,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+152)) + ts+20503, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -94402,7 +95132,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94434,7 +95164,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94571,23 +95301,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94598,7 +95330,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94607,7 +95339,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 56)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94626,7 +95358,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94646,20 +95378,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __7: ; nRes = Xsqlite3BtreeGetRequestedReserve(tls, pMain) Xsqlite3BtreeSetCacheSize(tls, pTemp, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema)).Fcache_size) Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) - Xsqlite3BtreeSetPagerFlags(tls, pTemp, uint32(PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94704,7 +95438,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94713,7 +95447,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94724,7 +95458,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94735,7 +95469,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94857,7 +95591,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+392, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+396, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -94899,7 +95633,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 396)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95056,7 +95790,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 44 + 4)) != 0 { @@ -95080,7 +95814,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95164,11 +95898,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+192)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95178,7 +95912,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95212,7 +95946,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 252 + var pArg uintptr = pParse + 256 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 @@ -95239,7 +95973,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95277,9 +96011,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95289,7 +96023,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95301,12 +96035,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) = pVTable for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { - var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95359,17 +96093,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+392, zMod) + pMod = Xsqlite3HashFind(tls, db+396, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95418,10 +96152,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+392, zMod) + pMod = Xsqlite3HashFind(tls, db+396, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95441,8 +96175,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(280) - defer tls.Free(280) + bp := tls.Alloc(284) + defer tls.Free(284) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95455,7 +96189,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95497,7 +96231,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95865,7 +96599,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -95908,7 +96642,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -95935,7 +96669,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96158,31 +96892,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -96191,35 +96907,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96236,29 +96952,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96299,11 +97015,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96313,43 +97029,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96381,25 +97097,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96760,7 +97476,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96813,104 +97529,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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+8, pExpr, uint32(unsafe.Sizeof(Expr{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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 + 44)) = uintptr(0) - return WRC_Prune - } else { - return WRC_Continue - } - return int32(0) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - preserveExpr(tls, pX, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), 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 + 44)) = uintptr(0) - } - } - return WRC_Continue -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(56) - defer tls.Free(56) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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 + 28)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer(aColExpr + 8 + uintptr(iIdxCol)*20)).FpExpr - if Xsqlite3ExprIsConstant(tls, (*IdxExprTrans)(unsafe.Pointer(bp+28)).FpIdxExpr) != 0 { - continue - } - (*Walker)(unsafe.Pointer(bp)).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)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16)).FcolFlags)&COLFLAG_HASCOLL == 0 || - Xsqlite3StrICmp(tls, Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16), - uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) == 0) { - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -96949,7 +97567,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(4) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 760 + uintptr(iLevel)*84 + var pLevel uintptr = pWInfo + 752 + uintptr(iLevel)*84 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -96969,6 +97587,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97119,12 +97739,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 84 + pWC = pWInfo + 76 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)*68 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+496, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+488, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97143,13 +97763,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*84)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(j)*84)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*84)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(j)*84)).FpRJ != 0) { goto __6 } goto __4 @@ -97162,7 +97782,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(j)*84)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(j)*84)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x20>>5)) != 0) { goto __7 @@ -97224,7 +97844,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97371,6 +97991,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97713,13 +98335,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97727,104 +98356,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97833,92 +98471,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -97928,24 +98560,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -97965,152 +98597,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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, uint32(unsafe.Sizeof(SrcItem{}))) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*68, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*84)).FiFrom)*68, uint32(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*48)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+760, uint16(0)) + pParse, pOrTab, pSubWInfo+752, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98119,121 +98752,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 52))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 48))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 760)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 752)).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)) + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 64)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98242,36 +98875,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98289,219 +98922,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+488, *(*int32)(unsafe.Pointer(pE + 36))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 48 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr pAlt = Xsqlite3WhereFindTerm(tls, pWC, iCur, *(*int32)(unsafe.Pointer(pTerm + 24)), notReady, uint32(WO_EQ|WO_IN|WO_IS), uintptr(0)) if !(pAlt == uintptr(0)) { - goto __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 + 20)))).FpEList)).FnExpr > 1) { - goto __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 20)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 20)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+20, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 10)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 48 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98511,24 +99144,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98539,41 +99172,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 48 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98607,7 +99240,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 84 + var pWC uintptr = pWInfo + 76 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 @@ -98615,13 +99248,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*84)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*84)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(k)*84)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(k)*84)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+752+uintptr(k)*84)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(k)*84)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -98900,7 +99533,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*20)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { for i = 0; i < int32(uint32(unsafe.Sizeof(aOp))/uint32(unsafe.Sizeof(Op2{}))); i++ { if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), aOp[i].FzOp) == 0 { *(*uint8)(unsafe.Pointer(peOp2)) = aOp[i].FeOp2 @@ -98913,7 +99546,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -98937,11 +99570,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { res++ } - if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -98973,10 +99606,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99118,7 +99751,7 @@ __1: { 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+496, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+488, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99135,10 +99768,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+488, (*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)*48 - b = b | Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+488, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99195,7 +99828,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+496, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+488, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99381,6 +100014,7 @@ __3: 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)*20)).FpExpr, iCur) == 0 { *(*int32)(unsafe.Pointer(aiCurCol)) = iCur *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 @@ -99436,7 +100070,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*48 - pMaskSet = pWInfo + 496 + pMaskSet = pWInfo + 488 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99473,12 +100107,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99557,7 +100191,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99651,7 +100285,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99845,7 +100479,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100024,7 +100658,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100093,6 +100727,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100119,10 +100756,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 760 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*84 + pInner = pWInfo + 752 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*84 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100142,14 +100779,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&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 + 760 + uintptr(i)*84 + pInner = pWInfo + 752 + uintptr(i)*84 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 @@ -100186,14 +100823,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+20, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100636,6 +101273,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100645,11 +101294,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100744,7 +101391,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -100815,7 +101462,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101049,7 +101696,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 760 + uintptr(iLevel)*84 + pLevel = pWInfo + 752 + uintptr(iLevel)*84 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101111,11 +101758,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_OK) @@ -101183,7 +101828,7 @@ __3: uint32(unsafe.Sizeof(sqlite3_index_orderby{}))*uint32(nOrderBy)+uint32(unsafe.Sizeof(HiddenIndexInfo1{}))+ uint32(unsafe.Sizeof(uintptr(0)))*uint32(nTerm))) if pIdxInfo == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*64 @@ -101305,9 +101950,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101375,7 +102020,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanLt + uintptr(iCol)*4)) } @@ -101724,9 +102369,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 64 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint32(unsafe.Sizeof([3]uintptr{})) / uint32(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101750,7 +102398,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) return SQLITE_NOMEM } @@ -101766,32 +102415,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+84) + Xsqlite3WhereClauseClear(tls, pWInfo+76) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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+8, uint32(unsafe.Sizeof(Expr{}))) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -101937,7 +102576,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+64, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+60, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102180,13 +102819,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 + 24)) |= uint8(SQLITE_BLDF1_UNIQUE) } else { @@ -102197,7 +102833,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTerm @@ -102252,31 +102889,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } else if int32(eOp)&WO_ISNULL != 0 { *(*U32)(unsafe.Pointer(pNew + 44)) |= 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 + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = 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 { - pTop = pTerm + 1*48 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)*4)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*48 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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)*4)) + } else { + pBtm = uintptr(0) + } } } @@ -102479,6 +103118,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(36) + defer tls.Free(36) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(98) defer tls.Free(98) @@ -102610,6 +103307,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102624,6 +103324,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102654,7 +103357,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 84 + var pWC2 uintptr = pWInfo + 76 for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC2)).FnTerm; ii++ { var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC2)).Fa + uintptr(ii)*48 if !(Xsqlite3ExprCoveredByIndex(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iCur, pProbe) != 0) { @@ -102809,7 +103512,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102867,7 +103570,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103225,7 +103928,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103237,7 +103940,7 @@ __1: var mUnusable Bitmask = uint64(0) (*WhereLoop)(unsafe.Pointer(pNew)).FiTab = U8(iTab) *(*uint32)(unsafe.Pointer(pBuilder + 28)) += uint32(SQLITE_QUERY_PLANNER_LIMIT_INCR) - (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+488, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103252,7 +103955,7 @@ __1: var p uintptr for p = pItem + 1*68; p < pEnd; p += 68 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+488, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103265,7 +103968,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103366,7 +104069,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+84, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+76, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103540,7 +104243,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+496, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+488, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103592,7 +104295,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103620,7 +104323,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103641,7 +104343,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103663,7 +104364,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { nSpace = int32((uint32(unsafe.Sizeof(WherePath{})) + uint32(unsafe.Sizeof(uintptr(0)))*uint32(nLoop)) * uint32(mxChoice) * uint32(2)) nSpace = int32(uint32(nSpace) + uint32(unsafe.Sizeof(LogEst(0)))*uint32(nOrderBy)) - pSpace = Xsqlite3DbMallocRawNN(tls, db, uint64(nSpace)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103725,9 +104426,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103743,7 +104443,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103763,6 +104465,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103859,8 +104566,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103872,7 +104579,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 760 + uintptr(iLoop)*84 + var pLevel uintptr = pWInfo + 752 + uintptr(iLoop)*84 (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop = libc.AssignUintptr(&pWLoop, *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(iLoop)*4))) (*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)*68)).FiCursor @@ -103887,7 +104594,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -103907,7 +104614,7 @@ __3: uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+16)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -103915,7 +104622,7 @@ __3: } 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+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -103925,7 +104632,7 @@ __3: pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+24)) if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 3, 0x8) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -103933,7 +104640,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -103965,7 +104672,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 84 + pWC = pWInfo + 76 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104022,10 +104729,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 752)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 752)).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) @@ -104069,16 +104776,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+488, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+488, (*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 + 760 + uintptr(i)*84)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(i)*84)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*68 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104111,7 +104818,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } if i != int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 { var nByte int32 = int32(uint32(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1-i) * uint32(unsafe.Sizeof(WhereLevel{}))) - libc.Xmemmove(tls, pWInfo+760+uintptr(i)*84, pWInfo+760+uintptr(i+1)*84, uint32(nByte)) + libc.Xmemmove(tls, pWInfo+752+uintptr(i)*84, pWInfo+752+uintptr(i+1)*84, uint32(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104123,9 +104830,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 752)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(i)*84)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 752 + uintptr(i)*84)).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) { @@ -104143,6 +104850,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*20)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104229,7 +104988,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(40) defer tls.Free(40) @@ -104286,7 +105045,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -104309,31 +105068,30 @@ __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 + 24)) = libc.AssignPtrInt32(pWInfo+24+1*4, -1) + *(*int32)(unsafe.Pointer(pWInfo + 20)) = libc.AssignPtrInt32(pWInfo+20+1*4, -1) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel = U8(nTabList) - (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+32, Xsqlite3VdbeMakeLabel(tls, pParse)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+28, 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+49, 0, - uint32(uintptr(0)+84)-uint32(uintptr(0)+49)) - libc.Xmemset(tls, pWInfo+760, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+45, 0, + uint32(uintptr(0)+76)-uint32(uintptr(0)+45)) + libc.Xmemset(tls, pWInfo+752, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 496 + pMaskSet = pWInfo + 488 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 84 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 76 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+84, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+84, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+76, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+76, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104351,13 +105109,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*68)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*68, pWInfo+84) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*68, pWInfo+76) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104368,169 +105126,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+84) - Xsqlite3WhereAddLimit(tls, pWInfo+84, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+76) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+76, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } pT = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).Fa + uintptr(ii)*48 if !(int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags)&TERM_VIRTUAL != 0) { - goto __15 + goto __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 10)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } wctrlFlags = libc.Uint16FromInt32(int32(wctrlFlags) & libc.CplInt32(WHERE_WANT_DISTINCT)) - *(*U16)(unsafe.Pointer(pWInfo + 44)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) - goto __19 -__18: - if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+84, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 40)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+76, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 44)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 40)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 752)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104539,26 +105302,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 752)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 760 -__40: + pLevel = pWInfo + 752 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 @@ -104566,37 +105329,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 20)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104604,92 +105367,98 @@ __51: int32((*Table)(unsafe.Pointer(pTab)).FnCol) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(n), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __57 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 20 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104699,24 +105468,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104726,96 +105495,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 20)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 44)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 84 - goto __40 goto __42 __42: + ii++ + pLevel += 84 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 760 + uintptr(ii)*84 + pLevel = pWInfo + 752 + uintptr(ii)*84 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+84, + constructAutomaticIndex(tls, pParse, pWInfo+76, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104823,30 +105592,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104866,7 +105633,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 760 + uintptr(i)*84 + pLevel = pWInfo + 752 + uintptr(i)*84 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105002,11 +105769,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 760 + pLevel = pWInfo + 752 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105045,6 +105809,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*20 @@ -105217,7 +105991,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105350,7 +106124,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105439,17 +106213,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105495,7 +106269,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105539,12 +106313,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105567,7 +106341,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105736,7 +106510,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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)*20)).FpExpr, 0) - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pDup) break @@ -105773,7 +106546,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105889,7 +106662,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106003,7 +106776,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106068,15 +106841,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106097,7 +106870,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106235,7 +107008,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106253,11 +107026,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106737,13 +107510,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107649,19 +108426,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107732,7 +108509,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108827,7 +109604,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109802,21 +110579,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110559,7 +111336,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110723,7 +111500,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 92)) = *(*Token)(unsafe.Pointer(yymsp + 4)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+92)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+92)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -110940,9 +111717,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) @@ -111221,19 +111998,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111612,9 +112389,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112382,7 +113159,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 1248)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+1248)) break } } @@ -112403,9 +113180,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112418,7 +113195,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112578,7 +113355,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112591,11 +113368,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112608,9 +113385,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112720,36 +113497,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112866,7 +113621,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113137,16 +113892,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113210,6 +113966,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113260,6 +114017,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113408,7 +114166,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 396)).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) @@ -113438,7 +114196,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113453,7 +114211,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113549,7 +114307,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 420)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 424)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113560,8 +114318,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+420) - for i = (*Hash)(unsafe.Pointer(db + 436)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+424) + for i = (*Hash)(unsafe.Pointer(db + 440)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113571,13 +114329,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+436) - for i = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+440) + for i = (*Hash)(unsafe.Pointer(db + 396)).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+392) + Xsqlite3HashClear(tls, db+396) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113644,23 +114402,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113678,35 +114436,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113821,7 +114579,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113866,7 +114624,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -113983,7 +114741,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113999,6 +114757,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114008,7 +114769,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114216,7 +114977,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114309,7 +115070,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114379,7 +115140,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114389,7 +115150,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114421,20 +115182,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+436, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+440, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*20 @@ -114558,7 +115319,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+24041, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint32(5)) == 0) { goto __1 } iOut = 0 @@ -114603,10 +115364,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114711,7 +115472,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -114722,17 +115483,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint32(4)) == 0) { goto __32 } @@ -114740,7 +115501,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114770,7 +115531,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114778,7 +115539,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114818,7 +115579,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114841,15 +115602,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114964,7 +115725,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 464 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 468 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -114983,8 +115744,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+436) - Xsqlite3HashInit(tls, db+392) + Xsqlite3HashInit(tls, db+440) + Xsqlite3HashInit(tls, db+396) 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 @@ -114995,10 +115756,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115012,7 +115773,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -115029,7 +115790,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16)))) @@ -115063,9 +115824,9 @@ __22: Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FpSchema = Xsqlite3SchemaGet(tls, db, uintptr(0)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23282 (*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) @@ -115170,7 +115931,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -115273,21 +116034,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115398,7 +116159,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115445,14 +116206,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115522,6 +116283,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116098,7 +116862,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116131,7 +116895,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 552 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 556 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -116142,7 +116906,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 556 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -116216,7 +116980,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116311,7 +117075,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 552 + pp = p + 556 } } @@ -116393,7 +117157,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116546,7 +117310,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 + 24335 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -116572,7 +117336,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116601,7 +117365,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116659,19 +117423,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117216,17 +117980,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6690, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6695, uint32(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint32(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -117327,7 +118091,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117633,7 +118397,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+24396, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117648,7 +118412,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117702,7 +118466,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117807,11 +118571,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -117852,7 +118616,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -117968,14 +118732,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118070,7 +118834,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118145,9 +118909,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118280,7 +119044,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118377,7 +119141,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118421,7 +119185,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118552,7 +119316,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118571,7 +119335,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*12 pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 @@ -118667,7 +119431,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118691,7 +119455,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118807,7 +119571,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118902,25 +119666,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118939,8 +119703,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119193,11 +119957,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+72) Xsqlite3_free(tls, zTab) } @@ -119408,7 +120172,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120106,7 +120870,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120318,7 +121082,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121447,7 +122211,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121459,12 +122223,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121505,7 +122269,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121690,7 +122454,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121713,14 +122477,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -121761,7 +122525,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -121804,19 +122568,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121845,7 +122609,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121857,7 +122621,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121865,18 +122629,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121891,14 +122655,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121927,7 +122691,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -121935,19 +122699,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121989,16 +122753,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) return SQLITE_ERROR __1: ; @@ -122023,7 +122787,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -122035,7 +122799,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122058,7 +122822,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122069,14 +122833,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122119,7 +122883,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) goto rtreeInit_fail __22: ; @@ -122136,7 +122900,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122154,7 +122918,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(592) @@ -122192,13 +122956,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+44, bp+16, ii, bp+544) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+44)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122209,7 +122973,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122285,12 +123049,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122309,7 +123073,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122328,7 +123092,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122342,8 +123106,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -122358,23 +123122,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122398,7 +123162,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122418,7 +123182,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122435,14 +123199,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122450,7 +123214,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122479,14 +123243,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122508,12 +123272,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122522,12 +123286,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122541,8 +123305,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122550,7 +123314,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 24 + 1*4))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122565,7 +123329,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122573,7 +123337,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4))) } @@ -122583,7 +123347,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122951,11 +123715,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -122975,19 +123739,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -123891,7 +124655,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123900,7 +124664,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -123908,7 +124672,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123919,7 +124683,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -123944,7 +124708,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124133,7 +124897,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124143,7 +124907,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124151,7 +124915,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124263,7 +125027,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124393,14 +125157,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124465,7 +125229,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124477,25 +125241,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124505,26 +125269,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124578,7 +125342,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124642,6 +125406,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124891,7 +125657,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -124902,7 +125668,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124915,7 +125681,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -124927,7 +125693,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125003,7 +125769,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+36) + ts+27816, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -125067,7 +125833,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+24891, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125088,16 +125854,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125195,7 +125961,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125213,7 +125979,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125231,7 +125997,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125249,7 +126015,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125272,7 +126038,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125318,7 +126084,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125333,7 +126099,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125373,7 +126139,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125383,18 +126149,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125406,18 +126172,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125431,7 +126197,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 5) @@ -125474,12 +126240,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125490,13 +126256,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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)*4)) - zRet = rbuMPrintf(tls, p, ts+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125518,25 +126284,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125573,12 +126339,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125613,7 +126379,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125621,13 +126387,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125645,12 +126411,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 } - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125672,8 +126438,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125684,7 +126450,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125711,13 +126477,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125729,9 +126495,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125741,37 +126507,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -125805,16 +126571,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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)*4)) - zList = Xsqlite3_mprintf(tls, ts+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125822,7 +126588,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125834,27 +126600,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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)*4)) - zList = rbuMPrintf(tls, p, ts+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -125863,7 +126629,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125877,21 +126643,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -125926,19 +126692,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -125950,15 +126716,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60))) } return z @@ -125973,12 +126739,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 172)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -125987,7 +126753,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125997,25 +126763,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126025,50 +126791,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*4)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126081,7 +126847,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126118,7 +126884,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -126223,7 +126989,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126243,24 +127009,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+604, bp+608, bp+612) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 612))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 604)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 612)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126276,7 +127042,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126284,31 +127050,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126333,8 +127099,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126343,52 +127109,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126396,14 +127162,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126416,35 +127182,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126507,12 +127273,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126539,7 +127305,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126571,7 +127337,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 12)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126641,28 +127407,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+24, ts+3272, uint32(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+24, ts+3286, uint32(4)) } else { - libc.Xmemcpy(tls, p+24, ts+6367, uint32(4)) + libc.Xmemcpy(tls, p+24, ts+6381, uint32(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126695,11 +127461,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126711,16 +127477,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126736,37 +127502,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -126795,14 +127561,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126911,7 +127677,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126928,23 +127694,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126965,12 +127731,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127064,7 +127827,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127157,7 +127920,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127165,7 +127928,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127186,7 +127949,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127216,9 +127979,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127232,10 +127995,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127249,12 +128012,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127266,7 +128029,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127286,15 +128049,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127318,10 +128081,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127416,7 +128179,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127432,7 +128195,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127448,7 +128211,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127482,7 +128245,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127512,13 +128275,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127529,7 +128292,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127559,10 +128322,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*244 + var pCsr uintptr = p + 1*252 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127573,7 +128337,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+Size_t(1)) pCsr += uintptr(nRbu + Size_t(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127602,7 +128366,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127620,12 +128384,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127633,7 +128397,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+14479, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+48) @@ -127644,19 +128408,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+36) + db, ts+32174, uintptr(0), uintptr(0), p+36) } } @@ -127710,7 +128474,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -127737,7 +128501,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -127754,7 +128518,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127767,13 +128531,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+36) } rbuObjIterFinalize(tls, p+48) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127868,7 +128632,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127885,19 +128649,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127905,6 +128669,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -127923,7 +128709,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 228)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128218,7 +129004,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128243,7 +129029,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128288,7 +129074,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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 + 188)) |= U32((int32(1)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131094,7 +131880,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131136,7 +131922,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131197,7 +131983,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131271,13 +132057,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131339,7 +132125,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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)*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, 215972)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -131351,6 +132137,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*4)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131703,7 +132498,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -131869,45 +132664,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) (*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+32747, bp+12) + sessionAppendStr(tls, bp, ts+32843, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32760, bp+12) + sessionAppendStr(tls, bp, ts+32856, bp+12) 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+32766, bp+12) + sessionAppendStr(tls, bp, ts+32862, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+12) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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) if bStat1 != 0 && ii == 1 { sessionAppendStr(tls, bp, - ts+32771, bp+12) + ts+32867, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32703, bp+12) + sessionAppendStr(tls, bp, ts+32799, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -131954,42 +132749,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(16) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+12) + sessionAppendStr(tls, bp, ts+32942, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32695, bp+12) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+12) + sessionAppendStr(tls, bp, ts+32862, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+12) + sessionAppendStr(tls, bp, ts+32960, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32407, bp+12) + sessionAppendStr(tls, bp, ts+32503, bp+12) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+12) + sessionAppendStr(tls, bp, ts+32799, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+12) + sessionAppendStr(tls, bp, ts+4957, bp+12) } if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { @@ -132002,7 +132797,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132013,21 +132808,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+12) + sessionAppendStr(tls, bp, ts+32973, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21375, bp+12) + sessionAppendStr(tls, bp, ts+21470, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+12) + sessionAppendStr(tls, bp, ts+14604, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32895, bp+12) + sessionAppendStr(tls, bp, ts+32991, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+12) + sessionAppendStr(tls, bp, ts+33002, bp+12) } - sessionAppendStr(tls, bp, ts+4943, bp+12) + sessionAppendStr(tls, bp, ts+4957, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+8, uintptr(0)) @@ -132041,14 +132836,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33023) + ts+33119) } return rc } @@ -132076,7 +132871,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132329,7 +133124,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132345,7 +133140,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132418,10 +133213,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+124, bp+128, bp+132, uintptr(0)) @@ -132454,7 +133249,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 124)))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) + *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) if *(*uintptr)(unsafe.Pointer(bp + 140)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132467,7 +133262,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+136, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) if rc != SQLITE_OK { break } @@ -132480,19 +133275,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 128)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 128)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132543,14 +133338,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133064,7 +133859,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint32(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint32(n2)) pOut += uintptr(n2) @@ -133782,7 +134577,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134070,7 +134865,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134255,7 +135050,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134323,7 +135118,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134481,7 +135276,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134504,7 +135299,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134827,13 +135622,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135244,7 +136039,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135383,7 +136178,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135410,14 +136205,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135428,7 +136223,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135441,7 +136236,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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) @@ -135450,7 +136245,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135469,7 +136264,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135484,14 +136279,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135499,9 +136294,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135509,9 +136304,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -135519,21 +136314,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135580,15 +136375,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135605,13 +136400,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135649,8 +136444,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135682,7 +136477,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135691,13 +136486,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 44)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 44)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 52)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 52)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -135719,19 +136514,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135775,18 +136570,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135896,7 +136691,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135906,7 +136701,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135916,7 +136711,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135929,7 +136724,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135939,7 +136734,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135955,7 +136750,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4) @@ -135978,7 +136773,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136000,7 +136795,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40)) = 0 @@ -136014,7 +136809,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136112,7 +136907,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136125,20 +136920,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint32(3)) == 0 { tok = FTS5_AND } break @@ -137904,9 +138699,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137922,7 +138717,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138009,7 +138804,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138090,7 +138885,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138260,12 +139055,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139205,7 +140000,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+36) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+36) } if rc == SQLITE_ERROR { @@ -139284,7 +140079,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139309,7 +140104,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+44, zSql) != 0 { return @@ -139332,7 +140127,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139571,7 +140366,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139644,13 +140439,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 var pLvl uintptr = pStruct + 20 + uintptr(iLvl)*12 - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ { - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140770,7 +141565,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141962,7 +142757,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142128,10 +142923,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+32, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+32, pPage+32, nTerm, pTerm) @@ -142159,7 +142954,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist != 0 || (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 { sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, iRowid) } else { - sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, iRowid-(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid) + sqlite3Fts5BufferAppendVarint(tls, p+32, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142235,7 +143030,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142278,7 +143073,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { sqlite3Fts5BufferSize(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn+(*Fts5Buffer)(unsafe.Pointer(bp)).Fn)) } sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32(unsafe.Sizeof([4]U8{})), bp+12) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -142290,7 +143085,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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+32, bp, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(4)) sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) } @@ -142410,7 +143205,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp+4+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp+4+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142809,12 +143604,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -142825,7 +143620,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu return sqlite3Fts5BufferSize(tls, p+32, pBuf, uint32(nByte+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) }() { { - *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iDelta)) + *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), iDelta) } { @@ -143005,7 +143800,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf for *(*uintptr)(unsafe.Pointer(bp + 704)) != 0 { { { - *(*int32)(unsafe.Pointer(bp + 708 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+708)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+708)).Fn), uint64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FiRowid-iLastRowid)) + *(*int32)(unsafe.Pointer(bp + 708 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+708)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+708)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FiRowid } @@ -143129,7 +143924,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143138,7 +143933,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143170,8 +143965,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 12)), pSeg) if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).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 + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } } @@ -143224,8 +144019,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) - })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } @@ -143295,7 +144090,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143311,13 +144106,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143570,7 +144365,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) @@ -143684,7 +144479,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -143843,6 +144638,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+4) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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 + 4))) @@ -143850,7 +144649,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35242) 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)) @@ -144118,7 +144917,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144149,7 +144948,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144164,7 +144963,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144478,7 +145277,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144510,7 +145309,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144542,25 +145341,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144606,12 +145405,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144642,7 +145441,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144673,7 +145472,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144705,14 +145504,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144768,7 +145567,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -144811,7 +145610,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -144985,7 +145784,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145106,7 +145905,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145130,28 +145929,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145209,7 +146008,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -145222,12 +146021,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145857,7 +146656,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146101,7 +146900,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146120,7 +146919,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146167,7 +146966,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146176,7 +146975,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146190,7 +146989,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146214,7 +147013,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146232,13 +147031,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146293,17 +147092,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146370,7 +147169,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146405,18 +147204,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146428,7 +147227,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146440,14 +147239,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146459,17 +147258,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146506,27 +147305,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146732,12 +147531,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146745,7 +147544,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146921,7 +147720,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147103,14 +147902,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 36)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+36) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+44) + rc = fts5StorageCount(tls, p, ts+34338, bp+44) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 44)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147305,9 +148104,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147521,7 +148320,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147533,7 +148332,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -147544,18 +148343,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -147831,7 +148630,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147971,7 +148770,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147979,11 +148778,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147991,7 +148790,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147999,7 +148798,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148007,11 +148806,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148019,19 +148818,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148039,11 +148838,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148051,7 +148850,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148059,11 +148858,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148071,7 +148870,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148079,7 +148878,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148087,7 +148886,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148103,24 +148902,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148135,137 +148934,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36983, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36891, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37090, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36998, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148280,16 +149079,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148297,21 +149096,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148319,7 +149118,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148327,9 +149126,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148344,12 +149143,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148358,7 +149157,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148514,7 +149313,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37222) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148694,22 +149493,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -149848,14 +150647,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149881,19 +150680,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else { var nByte int32 @@ -150026,11 +150825,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -150054,7 +150853,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 68)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150338,7 +151137,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150449,7 +151248,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150471,7 +151270,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151015,7 +151814,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch @@ -151325,16 +152124,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension @@ -151391,12 +152190,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 @@ -151411,6 +152210,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1052)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1060)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit @@ -151432,5 +152232,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 3d5932e59b..e4775c89c6 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1020,7 +1019,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1033,49 +1032,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1084,21 +1083,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1110,8 +1109,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1123,22 +1122,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1146,13 +1145,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1167,13 +1166,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1717,7 +1716,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1813,6 +1812,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1948,6 +1948,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1978,6 +1979,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2079,6 +2081,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2152,7 +2156,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2260,8 +2264,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2767,6 +2771,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3815,7 +3820,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4146,6 +4160,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4156,6 +4171,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6066,6 +6099,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6105,6 +6149,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6155,7 +6200,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6170,6 +6215,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6538,8 +6584,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6556,7 +6601,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6818,8 +6862,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7164,17 +7208,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7204,7 +7237,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7213,49 +7253,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7357,7 +7398,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7405,10 +7445,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7420,10 +7460,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -7433,21 +7469,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7746,7 +7774,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7883,6 +7911,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7906,6 +7936,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7920,9 +7951,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8169,7 +8203,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8195,13 +8229,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8277,7 +8311,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -8299,7 +8333,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8356,7 +8390,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8489,7 +8523,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8513,12 +8547,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8530,7 +8564,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8552,7 +8586,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8566,7 +8600,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8574,7 +8608,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8586,7 +8620,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8620,9 +8654,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -8641,7 +8675,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8655,14 +8689,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8988,7 +9022,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8998,13 +9032,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -9022,41 +9056,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -9069,7 +9103,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9119,15 +9153,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9278,7 +9312,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9542,7 +9576,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9575,7 +9609,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9986,7 +10020,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -10022,7 +10056,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -10042,7 +10076,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10091,24 +10125,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10424,7 +10485,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10497,8 +10558,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10710,7 +10771,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11267,7 +11328,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11327,7 +11388,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11668,7 +11729,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11792,9 +11853,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11942,7 +12003,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11959,10 +12020,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -12017,7 +12078,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12182,7 +12243,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12414,20 +12475,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12440,46 +12607,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13780,7 +13947,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -14331,7 +14498,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14350,13 +14517,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14369,7 +14536,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14842,193 +15009,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15398,35 +15565,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15519,11 +15686,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15602,13 +15772,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15616,7 +15786,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15637,7 +15807,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15739,19 +15909,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16114,7 +16284,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16387,7 +16557,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16405,7 +16575,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16422,14 +16592,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16449,7 +16619,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16504,7 +16674,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16517,7 +16687,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16585,7 +16755,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16744,7 +16914,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16772,7 +16942,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16835,7 +17005,7 @@ __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+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16856,7 +17026,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0400000, @@ -16871,7 +17041,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -16997,11 +17167,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 144)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+144) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+144) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -17047,7 +17217,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17248,7 +17418,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17264,7 +17434,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } 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 + 3417 + zErr = ts + 3431 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)) @@ -17278,7 +17448,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17393,10 +17563,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -17412,7 +17582,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17425,7 +17595,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17433,7 +17603,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17446,15 +17616,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17499,7 +17669,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17584,7 +17754,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17632,10 +17802,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17749,7 +17919,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17840,7 +18010,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17848,9 +18018,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17917,18 +18087,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+144, uint64(unsafe.Sizeof([4098]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([4098]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 144 + uintptr(got))) = int8(0) @@ -17968,14 +18138,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4104)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([4098]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4104, bp) } appendAllPathElements(tls, bp+4104, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4104)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+4104)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4104)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4104)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -18033,7 +18203,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -18061,11 +18231,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -18076,7 +18246,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18153,10 +18323,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18211,7 +18381,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18378,40 +18548,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18422,7 +18637,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18478,7 +18693,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18554,7 +18769,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18675,7 +18890,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18748,7 +18963,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18811,6 +19026,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19494,6 +19714,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19526,6 +19747,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21956,7 +22178,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23093,7 +23315,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23154,7 +23376,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23167,7 +23389,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23219,9 +23441,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23485,7 +23707,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23609,7 +23831,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23648,7 +23870,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23725,7 +23947,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23852,6 +24074,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24725,7 +24948,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24910,7 +25133,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25482,7 +25705,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25581,7 +25804,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25749,7 +25972,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26167,7 +26390,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26312,7 +26535,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26442,7 +26665,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26915,7 +27138,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27420,7 +27643,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27811,7 +28034,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -28076,7 +28299,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28213,7 +28436,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28230,7 +28453,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28238,7 +28461,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28281,7 +28504,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28291,7 +28514,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28541,7 +28764,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28573,8 +28796,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28589,7 +28811,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28599,7 +28821,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28612,7 +28834,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28621,14 +28843,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -28638,7 +28860,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28685,63 +28907,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28773,10 +28989,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28787,15 +29002,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28820,7 +29035,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28831,7 +29046,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28879,26 +29094,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28908,7 +29123,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28916,7 +29131,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28924,10 +29139,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28996,7 +29211,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -29026,11 +29241,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -29041,15 +29256,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -29077,14 +29292,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29098,7 +29313,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29110,7 +29325,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29213,7 +29428,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29241,7 +29456,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29280,7 +29495,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29304,7 +29519,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -29353,7 +29568,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30125,7 +30340,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -30163,7 +30378,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30578,7 +30793,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30604,7 +30819,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30612,6 +30827,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30621,7 +30839,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30637,7 +30855,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30698,7 +30916,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30733,7 +30951,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30793,7 +31011,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30832,7 +31050,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30863,7 +31081,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31204,7 +31422,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31448,14 +31666,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31500,7 +31718,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31549,7 +31767,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31628,10 +31846,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31639,7 +31855,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31701,7 +31918,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31721,7 +31938,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31741,7 +31958,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31953,7 +32170,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32157,7 +32374,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32222,7 +32439,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32270,7 +32487,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32389,7 +32606,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32549,7 +32766,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32614,7 +32831,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -32650,7 +32867,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32694,7 +32911,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32806,7 +33023,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32964,7 +33181,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -33021,7 +33238,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -33037,7 +33254,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33111,7 +33328,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33123,7 +33340,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -33134,7 +33351,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33299,7 +33516,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33571,12 +33788,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33584,7 +33801,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -33644,7 +33861,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33733,7 +33950,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33849,7 +34066,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -34167,7 +34384,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34178,7 +34395,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34336,7 +34553,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34410,7 +34627,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34472,7 +34689,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34500,7 +34717,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34761,7 +34978,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34953,7 +35170,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34990,6 +35207,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -35080,7 +35299,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35103,7 +35322,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35183,7 +35402,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35296,7 +35515,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -35357,7 +35576,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35395,13 +35614,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -35508,7 +35727,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35531,7 +35750,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35632,7 +35851,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35640,11 +35859,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35719,7 +35938,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35788,7 +36007,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35817,7 +36036,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35893,7 +36112,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35907,7 +36126,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -36041,7 +36260,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36229,7 +36448,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4062, 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)) @@ -36254,11 +36473,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -36279,13 +36498,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36304,7 +36523,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36315,7 +36534,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36338,12 +36557,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36450,13 +36669,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36467,7 +36686,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36475,14 +36694,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36499,7 +36718,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36524,7 +36743,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36537,7 +36756,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36553,7 +36772,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36591,7 +36810,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36664,7 +36883,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36681,7 +36900,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36801,7 +37020,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36837,7 +37056,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36847,7 +37066,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36894,13 +37113,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37135,6 +37354,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37148,8 +37376,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37157,7 +37385,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37168,7 +37396,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37183,7 +37411,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37203,7 +37431,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37652,7 +37880,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -38069,6 +38297,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -38084,7 +38325,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38144,6 +38385,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38226,7 +38470,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38458,7 +38702,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38690,7 +38934,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38752,7 +38996,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38793,7 +39037,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38812,7 +39056,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39116,7 +39360,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39131,14 +39375,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39197,6 +39441,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39221,10 +39468,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39262,21 +39509,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39625,85 +39880,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39803,6 +40090,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39830,7 +40127,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39838,12 +40135,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39862,7 +40159,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39913,7 +40212,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -40042,8 +40341,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -40054,10 +40353,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -40068,6 +40363,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -40083,34 +40383,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40118,7 +40418,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40126,32 +40426,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40161,13 +40461,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40175,7 +40475,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40186,20 +40486,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40224,7 +40524,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40326,7 +40626,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40675,8 +40975,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40885,7 +41185,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40893,16 +41193,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -41048,7 +41348,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41328,7 +41628,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41338,14 +41638,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41356,16 +41658,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41382,7 +41680,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41933,16 +42231,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41960,7 +42262,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -41990,7 +42296,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -42024,7 +42330,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -42047,7 +42353,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -42069,7 +42375,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42213,7 +42526,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42384,7 +42697,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42410,7 +42723,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42453,7 +42766,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -42521,13 +42834,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42558,7 +42871,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42613,7 +42926,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42632,7 +42945,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42642,7 +42955,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42684,14 +42997,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42903,6 +43217,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43099,7 +43417,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43290,7 +43608,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43365,7 +43683,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43794,35 +44112,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43837,7 +44154,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43869,7 +44186,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43884,7 +44201,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43895,7 +44212,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43905,7 +44222,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43981,7 +44298,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44125,7 +44442,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44143,8 +44460,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -44208,7 +44528,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44352,7 +44672,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44524,7 +44844,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -44560,11 +44880,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44579,21 +44899,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, 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+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44649,7 +44969,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44753,12 +45074,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44810,11 +45130,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44852,7 +45172,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44881,11 +45200,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44955,42 +45277,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44998,52 +45321,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -45085,19 +45408,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45106,7 +45429,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45114,11 +45437,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45354,7 +45677,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45849,20 +46172,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46252,14 +46575,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46337,72 +46660,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46419,10 +46750,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -46434,33 +46765,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46469,43 +46800,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46521,26 +46852,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46548,12 +46879,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46568,17 +46899,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46593,163 +46924,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46758,20 +47089,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46781,15 +47112,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46797,9 +47128,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46811,52 +47142,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46865,24 +47196,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46896,13 +47227,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46911,38 +47242,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46951,10 +47282,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46962,10 +47293,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46973,35 +47304,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -47009,372 +47378,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47382,15 +47752,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47399,124 +47769,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47526,40 +47896,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47577,339 +47947,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47918,20 +48288,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47942,244 +48312,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48188,172 +48558,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48373,36 +48743,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48410,22 +48780,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48436,24 +48806,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -48461,30 +48831,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48500,10 +48870,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48512,10 +48882,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -48535,83 +48905,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48620,31 +48990,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48652,10 +49022,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48676,105 +49046,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48786,231 +49156,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -49020,85 +49392,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49106,59 +49478,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49173,121 +49545,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -49295,93 +49667,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49394,7 +49766,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -49409,81 +49781,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49493,38 +49865,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49532,205 +49904,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49740,90 +50112,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49832,36 +50204,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49872,88 +50244,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -49965,35 +50337,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -50002,63 +50374,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -50067,13 +50439,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -50081,20 +50453,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50104,45 +50476,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50155,10 +50527,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -50169,10 +50541,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50180,30 +50552,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -50213,36 +50585,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50250,10 +50622,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50285,22 +50657,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50310,15 +50682,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50328,17 +50700,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -50348,34 +50720,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50384,48 +50756,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -50433,10 +50805,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50458,24 +50830,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50507,78 +50879,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50586,11 +50958,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50606,14 +50978,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -50621,16 +50993,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50638,16 +51010,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50658,10 +51030,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -50684,73 +51056,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50760,22 +51132,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50788,32 +51160,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50825,70 +51197,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50896,17 +51268,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50916,10 +51288,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50933,10 +51305,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50946,69 +51318,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -51016,16 +51388,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -51038,17 +51410,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -51058,24 +51430,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -51083,52 +51455,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51137,54 +51509,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -51192,69 +51564,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51266,27 +51638,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51294,42 +51666,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51338,41 +51710,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51386,16 +51758,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51407,25 +51779,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51434,24 +51806,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51476,16 +51848,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -51500,66 +51872,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -51580,73 +51952,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51654,13 +52026,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51671,10 +52043,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51723,16 +52099,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51752,10 +52128,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51765,8 +52141,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51786,7 +52162,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51806,8 +52182,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51815,21 +52191,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51838,8 +52214,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51872,8 +52248,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51900,7 +52276,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51933,7 +52309,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -51953,8 +52329,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -52023,7 +52399,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -52051,12 +52427,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52100,7 +52476,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52183,7 +52559,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52196,7 +52572,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54636,11 +55012,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54800,7 +55172,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54921,7 +55293,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -55077,14 +55449,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55101,7 +55473,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55195,7 +55567,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55204,7 +55576,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55259,7 +55631,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55267,14 +55639,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55326,7 +55698,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, 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 @@ -55363,7 +55735,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55376,23 +55748,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55495,15 +55867,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55582,10 +55954,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55632,7 +56004,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55696,7 +56068,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55712,7 +56084,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55726,7 +56098,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55749,30 +56121,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55844,7 +56216,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55860,7 +56232,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55916,7 +56288,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55991,7 +56363,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -56011,7 +56383,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -56046,7 +56418,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56103,7 +56475,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56131,7 +56503,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56345,7 +56717,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56385,7 +56757,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56396,7 +56768,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56408,7 +56780,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56508,12 +56880,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -56549,12 +56921,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -56673,9 +57045,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -56763,14 +57133,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -57098,7 +57467,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57173,7 +57542,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57341,12 +57710,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57417,12 +57791,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57461,7 +57835,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57487,7 +57861,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57515,7 +57889,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57562,7 +57936,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57587,7 +57961,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57608,11 +57982,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57641,7 +58012,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57737,7 +58112,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58161,7 +58536,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58284,7 +58659,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58294,10 +58669,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58338,10 +58715,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58771,13 +59148,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -58981,7 +59358,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -59059,7 +59436,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60453,7 +60869,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60467,10 +60883,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60483,8 +60899,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60492,12 +60908,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60523,10 +60939,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60537,14 +60951,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60574,27 +60990,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60603,9 +61019,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60613,15 +61029,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60652,8 +61068,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60775,8 +61191,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60797,9 +61213,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60812,13 +61228,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60829,11 +61245,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60855,12 +61271,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60875,14 +61291,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60890,9 +61330,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60902,15 +61342,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60920,22 +61360,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60944,51 +61384,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60997,18 +61437,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61220,7 +61660,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61457,6 +61897,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61681,6 +62122,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61826,7 +62268,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62353,7 +62799,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62371,8 +62819,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62440,6 +62887,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62463,7 +62912,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62486,7 +62937,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62499,7 +62950,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62519,7 +62972,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62659,7 +63114,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62667,7 +63122,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62718,11 +63173,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62734,13 +63189,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62750,10 +63205,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62817,7 +63272,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62827,7 +63282,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62836,7 +63291,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62877,19 +63332,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62897,7 +63352,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62909,7 +63364,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62921,7 +63376,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62967,12 +63422,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62982,11 +63437,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -62999,12 +63454,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -63015,7 +63470,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -63037,7 +63492,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -63085,14 +63540,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63120,7 +63575,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63160,18 +63615,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63255,11 +63710,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63272,17 +63727,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63477,7 +63932,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -63540,12 +63995,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63585,8 +64040,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63603,7 +64058,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63625,7 +64080,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63665,12 +64120,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63844,8 +64299,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63928,15 +64383,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63964,7 +64419,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63997,13 +64452,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64016,7 +64471,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64031,7 +64486,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -64087,8 +64542,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -64136,7 +64591,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -64156,7 +64611,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64204,8 +64659,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64247,11 +64702,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -64321,7 +64776,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64344,8 +64799,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64363,16 +64818,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64387,31 +64842,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64429,8 +64884,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64456,9 +64911,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64486,8 +64941,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -64524,7 +64979,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64548,7 +65003,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64629,19 +65084,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64650,7 +65105,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64664,13 +65119,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) 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 @@ -64788,11 +65243,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64826,7 +65281,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64835,10 +65290,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64856,9 +65311,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -65049,7 +65504,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65300,7 +65755,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -65314,7 +65769,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65327,7 +65782,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65369,7 +65824,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11397, 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)).FnChar-- @@ -65383,7 +65838,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65427,7 +65882,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65444,7 +65899,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+11272, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65600,7 +66055,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65657,7 +66112,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65704,9 +66159,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65789,7 +66244,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65811,15 +66266,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -66095,11 +66550,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66146,10 +66601,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66207,7 +66662,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66237,20 +66692,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -66266,13 +66721,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11600, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11614, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -66286,7 +66741,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66297,7 +66752,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -66350,7 +66805,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66367,7 +66822,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66433,13 +66888,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66486,7 +66941,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66517,14 +66972,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66532,7 +66987,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66643,7 +67098,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66656,7 +67111,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66670,7 +67125,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66702,7 +67157,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66877,7 +67332,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66903,11 +67358,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66954,7 +67409,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66978,7 +67433,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -67072,6 +67527,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67099,9 +67556,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67120,62 +67576,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67222,13 +67670,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67253,25 +67701,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67292,12 +67740,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67326,9 +67774,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67339,21 +67787,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67383,12 +67831,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67493,10 +67941,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -67652,11 +68100,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67673,7 +68121,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -67702,7 +68150,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67746,7 +68194,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67772,7 +68220,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67825,13 +68273,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67869,13 +68317,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -68035,9 +68483,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -68053,7 +68501,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -68081,9 +68529,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68099,9 +68547,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68132,12 +68580,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68152,7 +68600,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68187,8 +68635,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -68209,7 +68657,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68239,7 +68687,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68263,7 +68711,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68272,7 +68720,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68283,7 +68731,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68295,7 +68743,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -68329,7 +68777,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68337,13 +68785,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12390, 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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12397, 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)).Fn-- @@ -68380,7 +68828,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68544,10 +68992,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -68578,7 +69026,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68623,7 +69071,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68712,7 +69160,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68738,7 +69186,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -68807,7 +69255,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68820,13 +69268,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68859,7 +69307,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68980,13 +69428,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68994,7 +69442,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -69028,16 +69476,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69176,8 +69624,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69304,7 +69752,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -69328,7 +69776,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -69427,7 +69875,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69444,10 +69892,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69466,11 +69914,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69504,7 +69952,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69529,11 +69977,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69595,7 +70043,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -69604,11 +70052,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69624,13 +70072,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69645,7 +70093,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69675,7 +70123,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69691,7 +70139,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69754,10 +70202,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69775,12 +70220,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69840,6 +70281,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69899,13 +70347,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -69946,10 +70394,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69981,12 +70429,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -70014,11 +70462,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70096,9 +70544,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -70157,21 +70605,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70183,7 +70631,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70247,7 +70695,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -70259,7 +70707,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70344,7 +70792,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -70571,12 +71019,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70697,7 +71145,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -70716,7 +71164,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70742,26 +71190,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70775,7 +71223,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70787,10 +71235,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70802,7 +71250,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70831,7 +71279,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70852,9 +71300,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70893,7 +71341,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70994,7 +71442,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -71008,6 +71456,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -71028,6 +71477,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -71209,7 +71659,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71261,8 +71711,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71308,12 +71758,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71321,7 +71771,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71335,7 +71785,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71496,7 +71946,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71511,7 +71961,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71522,9 +71972,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71550,9 +72000,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71633,6 +72083,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71640,7 +72091,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71686,7 +72137,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71821,6 +72272,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71832,11 +72284,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -71863,7 +72317,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71891,12 +72345,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -72065,7 +72519,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72101,9 +72555,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72128,7 +72582,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72143,7 +72597,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72161,7 +72615,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72447,7 +72901,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72543,7 +72997,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72643,7 +73097,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72657,7 +73111,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72736,7 +73190,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72863,7 +73317,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72897,7 +73351,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72920,26 +73374,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -73005,10 +73460,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -73021,19 +73492,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73260,17 +73733,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73283,10 +73758,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73295,15 +73770,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73312,98 +73787,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73411,138 +73886,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73645,7 +74125,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73875,7 +74355,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73934,7 +74414,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74238,7 +74718,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74428,7 +74908,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74541,13 +75021,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74570,7 +75064,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74580,7 +75074,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74633,7 +75127,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74673,13 +75167,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74687,7 +75181,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74716,13 +75210,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -75032,7 +75526,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -75044,7 +75538,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -75068,7 +75562,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75093,7 +75587,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75171,7 +75665,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75433,7 +75927,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75453,14 +75947,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75700,107 +76194,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15076}, - {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 + 15090}, - {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 + 15090}, - {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 + 15096}, - {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 + 15096}, - {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 + 15102}, - {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 + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {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 + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {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 + 15417}, - {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 + 15421}, - {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 + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15123}, + {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 + 15137}, + {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 + 15137}, + {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 + 15143}, + {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 + 15143}, + {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 + 15149}, + {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 + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {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 + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {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 + 15464}, + {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 + 15468}, + {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 + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75921,7 +76415,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+15549, + ts+15596, 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) @@ -76581,8 +77075,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76661,7 +77155,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -76764,7 +77258,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76872,6 +77366,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76912,13 +77427,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76930,21 +77444,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -77015,7 +77519,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -77073,7 +77577,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77376,6 +77880,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77539,7 +78045,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -77564,7 +78070,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77713,7 +78219,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77723,7 +78229,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77775,7 +78281,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77783,7 +78289,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -77965,7 +78471,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77980,137 +78499,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78122,64 +78641,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78187,7 +78710,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78490,7 +79017,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79581,13 +80108,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -80026,6 +80553,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80064,7 +80592,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -80073,7 +80601,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -80088,7 +80616,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80124,7 +80652,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80138,7 +80666,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80162,7 +80690,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80180,7 +80708,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80207,7 +80735,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80245,7 +80773,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80255,7 +80783,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80411,7 +80939,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80419,63 +80947,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, - ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80493,238 +81021,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80746,7 +81274,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80758,10 +81286,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80770,13 +81298,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80791,9 +81319,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80807,7 +81335,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80898,19 +81426,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80927,7 +81455,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80974,13 +81502,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -80988,7 +81516,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -81013,8 +81541,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -81121,13 +81649,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81147,6 +81684,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81197,7 +81736,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81212,7 +81751,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81222,7 +81761,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81239,30 +81778,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81483,7 +82022,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81517,7 +82056,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -81526,36 +82065,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81593,7 +82132,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81674,21 +82213,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81730,15 +82269,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81775,14 +82314,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81801,17 +82340,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81822,7 +82361,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81834,12 +82373,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81876,11 +82415,11 @@ __123: if !(*(*int8)(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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81899,7 +82438,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81921,7 +82460,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -81975,7 +82514,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -82072,13 +82611,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -82143,20 +82682,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82189,29 +82728,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82277,7 +82816,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82287,7 +82826,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82324,12 +82863,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, 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)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82358,7 +82897,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82374,13 +82913,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82419,7 +82958,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -82438,13 +82977,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82460,7 +82999,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82495,7 +83034,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82503,7 +83042,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82576,20 +83115,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -82627,12 +83166,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -82649,8 +83188,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -82663,11 +83202,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82692,10 +83231,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82733,17 +83272,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82759,7 +83298,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82909,7 +83448,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82936,178 +83475,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83115,87 +83783,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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 __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83213,14 +83887,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83228,27 +83902,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83257,25 +83931,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83283,50 +83957,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83341,31 +84022,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83375,10 +84056,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83398,19 +84079,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83419,86 +84100,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83506,60 +84187,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83567,10 +84248,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83603,6 +84284,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83614,14 +84303,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83673,7 +84362,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83681,7 +84370,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -83694,19 +84383,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83722,7 +84411,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83870,7 +84559,7 @@ __1: 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+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83886,13 +84575,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83901,7 +84590,7 @@ __3: 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+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83969,33 +84658,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -84055,7 +84744,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -84087,13 +84776,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84126,16 +84815,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -84220,7 +84909,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84255,7 +84944,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84269,7 +84958,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84452,16 +85141,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84529,20 +85222,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -84554,8 +85247,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84564,7 +85257,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84575,7 +85268,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84595,7 +85288,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84611,100 +85304,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84717,7 +85414,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84816,7 +85513,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84959,7 +85656,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85134,8 +85831,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85143,13 +85840,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85324,7 +86021,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85369,7 +86066,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85380,7 +86077,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85424,7 +86121,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85771,6 +86468,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85946,7 +86646,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -86008,16 +86708,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -86027,7 +86727,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86233,8 +86933,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -86373,13 +87073,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86387,7 +87087,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86477,7 +87177,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86487,7 +87187,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -86503,7 +87203,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86790,7 +87490,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86881,7 +87581,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86901,7 +87601,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86938,7 +87638,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86972,11 +87672,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -87077,8 +87777,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87125,7 +87825,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87192,7 +87892,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -87254,7 +87954,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -87407,10 +88107,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87664,8 +88364,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87692,13 +88392,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87710,7 +88410,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87811,7 +88511,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87837,6 +88537,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87853,7 +88554,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87890,7 +88591,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87901,6 +88603,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87925,15 +88628,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88110,9 +88818,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88181,7 +88896,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88197,17 +88911,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88228,7 +88933,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -88240,6 +88944,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88395,6 +89110,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88418,8 +89134,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88595,8 +89311,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -88613,6 +89329,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88642,6 +89363,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88675,12 +89397,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88746,7 +89468,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88829,7 +89551,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88958,7 +89680,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -88984,7 +89706,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -89000,7 +89722,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -89026,7 +89748,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -89037,9 +89759,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89066,9 +89788,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -89086,7 +89808,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89198,7 +89920,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89217,7 +89939,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -89225,7 +89947,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89326,7 +90048,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89341,7 +90063,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -89406,7 +90128,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89418,7 +90140,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89437,9 +90159,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89449,7 +90171,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89599,13 +90321,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89786,19 +90508,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89811,7 +90533,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89969,7 +90691,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -90068,7 +90789,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90129,7 +90850,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90233,7 +90954,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90243,7 +90964,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -90275,7 +90996,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 5, 0x20) @@ -90333,8 +91054,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90368,7 +91092,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90461,16 +91185,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90479,13 +91208,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90497,52 +91226,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90560,111 +91289,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -90683,33 +91412,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -90717,28 +91446,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90749,7 +91478,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90760,7 +91489,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90786,7 +91515,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90799,27 +91528,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90827,49 +91556,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90883,45 +91612,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90940,16 +91669,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90980,16 +91709,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -91002,98 +91731,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -91102,79 +91831,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91249,7 +91978,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -91271,7 +92000,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91367,7 +92096,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91459,7 +92188,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91504,7 +92233,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91548,7 +92277,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -91566,7 +92295,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91578,7 +92307,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91593,7 +92322,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91605,22 +92334,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91629,7 +92358,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91658,9 +92387,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91778,7 +92507,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91811,7 +92540,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91836,13 +92565,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92098,7 +92827,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92137,9 +92866,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92151,7 +92880,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92265,12 +92994,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92384,7 +93113,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92435,7 +93164,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -92504,7 +93233,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92567,8 +93296,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92601,26 +93330,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92637,7 +93366,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92830,10 +93559,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92842,7 +93573,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93204,7 +93935,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -93236,7 +93967,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93246,7 +93977,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -94116,7 +94847,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94422,10 +95153,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+216)) + ts+20503, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -94516,7 +95247,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94548,7 +95279,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94685,23 +95416,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94712,7 +95445,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94721,7 +95454,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94740,7 +95473,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94760,20 +95493,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94818,7 +95553,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94827,7 +95562,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94838,7 +95573,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94849,7 +95584,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94971,7 +95706,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -95013,7 +95748,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95170,7 +95905,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -95194,7 +95929,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95278,11 +96013,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95292,7 +96027,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95326,7 +96061,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -95353,7 +96088,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95391,9 +96126,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95403,7 +96138,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95415,12 +96150,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95473,17 +96208,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95532,10 +96267,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95555,8 +96290,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95569,7 +96304,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95611,7 +96346,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95979,7 +96714,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -96022,7 +96757,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -96049,7 +96784,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96277,31 +97012,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -96310,35 +97027,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96355,29 +97072,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96418,11 +97135,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96432,43 +97149,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96500,25 +97217,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96879,7 +97596,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96932,104 +97649,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -97068,7 +97687,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -97088,6 +97707,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97238,12 +97859,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97262,13 +97883,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -97281,7 +97902,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -97343,7 +97964,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97490,6 +98111,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97832,13 +98455,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97846,104 +98476,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97952,92 +98591,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -98047,24 +98680,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -98084,152 +98717,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98238,121 +98872,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98361,36 +98995,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98408,219 +99042,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98630,24 +99264,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98658,41 +99292,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98726,7 +99360,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98734,13 +99368,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -99019,7 +99653,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -99032,7 +99666,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -99056,11 +99690,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -99092,10 +99726,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99237,7 +99871,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99254,10 +99888,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99314,7 +99948,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99500,6 +100134,7 @@ __3: 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 @@ -99555,7 +100190,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99592,12 +100227,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99676,7 +100311,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99770,7 +100405,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99964,7 +100599,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100143,7 +100778,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100213,6 +100848,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100239,10 +100877,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100262,14 +100900,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -100306,14 +100944,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100756,6 +101394,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100765,11 +101415,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100864,7 +101512,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100935,7 +101583,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101169,7 +101817,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101231,11 +101879,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -101303,7 +101949,7 @@ __3: 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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -101425,9 +102071,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101495,7 +102141,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101844,9 +102490,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101870,7 +102519,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101886,32 +102536,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -102057,7 +102697,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102300,13 +102940,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -102317,7 +102954,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -102372,31 +103010,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -102599,6 +103239,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102730,6 +103428,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102744,6 +103445,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102774,7 +103478,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -102930,7 +103634,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102988,7 +103692,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103346,7 +104050,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103358,7 +104062,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103373,7 +104077,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103386,7 +104090,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103487,7 +104191,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103661,7 +104365,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103713,7 +104417,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103741,7 +104445,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103762,7 +104465,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103784,7 +104486,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103846,9 +104548,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103864,7 +104565,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103884,6 +104587,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103980,8 +104688,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103993,7 +104701,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -104008,7 +104716,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -104028,7 +104736,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -104036,7 +104744,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -104046,7 +104754,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -104054,7 +104762,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -104086,7 +104794,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104143,10 +104851,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -104190,16 +104898,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104232,7 +104940,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104244,9 +104952,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -104264,6 +104972,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104350,7 +105110,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -104407,7 +105167,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -104430,31 +105190,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104472,13 +105231,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104489,169 +105248,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104660,26 +105424,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104687,37 +105451,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104725,92 +105489,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104820,24 +105590,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104847,96 +105617,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104944,30 +105714,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104987,7 +105755,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105123,11 +105891,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105166,6 +105931,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -105338,7 +106113,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105471,7 +106246,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105561,17 +106336,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105617,7 +106392,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105661,12 +106436,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105689,7 +106464,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105859,7 +106634,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105896,7 +106670,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -106012,7 +106786,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106126,7 +106900,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106191,15 +106965,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106220,7 +106994,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106358,7 +107132,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106376,11 +107150,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106861,13 +107635,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107775,19 +108553,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107855,7 +108633,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108952,7 +109730,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109927,21 +110705,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110684,7 +111462,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110848,7 +111626,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111065,9 +111843,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -111346,19 +112124,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111737,9 +112515,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112507,7 +113285,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+2464)) break } } @@ -112528,9 +113306,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112543,7 +113321,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112703,7 +113481,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112716,11 +113494,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112733,9 +113511,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112845,36 +113623,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112991,7 +113747,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113262,16 +114018,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113335,6 +114092,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113385,6 +114143,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113533,7 +114292,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -113563,7 +114322,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113578,7 +114337,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113674,7 +114433,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113685,8 +114444,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113696,13 +114455,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113769,23 +114528,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113803,35 +114562,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113946,7 +114705,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113991,7 +114750,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -114108,7 +114867,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114124,6 +114883,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114133,7 +114895,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114341,7 +115103,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114434,7 +115196,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114504,7 +115266,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114514,7 +115276,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114546,20 +115308,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -114683,7 +115445,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+24041, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114728,10 +115490,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114836,7 +115598,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114847,17 +115609,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint64(4)) == 0) { goto __32 } @@ -114865,7 +115627,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114895,7 +115657,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114903,7 +115665,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114943,7 +115705,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114967,15 +115729,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -115090,7 +115852,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -115109,8 +115871,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -115121,10 +115883,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115138,7 +115900,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -115155,7 +115917,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115189,9 +115951,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23282 (*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) @@ -115296,7 +116058,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -115399,21 +116161,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115524,7 +116286,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115571,14 +116333,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115648,6 +116410,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116224,7 +116989,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116257,7 +117022,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -116268,7 +117033,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -116342,7 +117107,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116437,7 +117202,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -116520,7 +117285,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116673,7 +117438,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 + 24335 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -116699,7 +117464,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116728,7 +117493,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116786,19 +117551,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117343,17 +118108,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6690, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6695, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -117454,7 +118219,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117760,7 +118525,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+24396, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117775,7 +118540,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117829,7 +118594,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117934,11 +118699,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -117979,7 +118744,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -118095,14 +118860,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118197,7 +118962,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118272,9 +119037,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118407,7 +119172,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118504,7 +119269,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118548,7 +119313,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118679,7 +119444,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118698,7 +119463,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118794,7 +119559,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118818,7 +119583,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118934,7 +119699,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -119029,25 +119794,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -119066,8 +119831,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119327,11 +120092,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -119542,7 +120307,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120240,7 +121005,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120452,7 +121217,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121581,7 +122346,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121593,12 +122358,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121639,7 +122404,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121824,7 +122589,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121847,14 +122612,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -121895,7 +122660,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -121938,19 +122703,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121979,7 +122744,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121991,7 +122756,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121999,18 +122764,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122025,14 +122790,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -122061,7 +122826,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -122069,19 +122834,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122123,16 +122888,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -122157,7 +122922,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -122169,7 +122934,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122192,7 +122957,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122203,14 +122968,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122253,7 +123018,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -122270,7 +123035,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122288,7 +123053,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -122326,13 +123091,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122343,7 +123108,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122421,12 +123186,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122445,7 +123210,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122464,7 +123229,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122478,8 +123243,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -122494,23 +123259,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122534,7 +123299,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122554,7 +123319,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122571,14 +123336,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122586,7 +123351,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122615,14 +123380,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122644,12 +123409,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122658,12 +123423,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122677,8 +123442,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122686,7 +123451,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122701,7 +123466,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122709,7 +123474,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122719,7 +123484,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -123088,11 +123853,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -123112,19 +123877,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -124030,7 +124795,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -124039,7 +124804,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -124047,7 +124812,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -124058,7 +124823,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -124083,7 +124848,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124272,7 +125037,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124282,7 +125047,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124290,7 +125055,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124402,7 +125167,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124532,14 +125297,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124604,7 +125369,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124616,25 +125381,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124644,26 +125409,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124717,7 +125482,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124784,6 +125549,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -125042,7 +125809,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -125053,7 +125820,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -125066,7 +125833,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -125078,7 +125845,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125154,7 +125921,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+64) + ts+27816, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -125218,7 +125985,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+24891, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125239,16 +126006,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125346,7 +126113,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125364,7 +126131,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125382,7 +126149,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125400,7 +126167,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125423,7 +126190,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125469,7 +126236,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125484,7 +126251,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125524,7 +126291,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125534,18 +126301,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125557,18 +126324,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125582,7 +126349,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -125625,12 +126392,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125641,13 +126408,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125669,25 +126436,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125724,12 +126491,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125764,7 +126531,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125772,13 +126539,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125796,12 +126563,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125823,8 +126590,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125835,7 +126602,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125862,13 +126629,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125880,9 +126647,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125892,37 +126659,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -125956,16 +126723,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125973,7 +126740,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125985,27 +126752,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -126014,7 +126781,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -126028,21 +126795,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -126077,19 +126844,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -126101,15 +126868,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -126124,12 +126891,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -126138,7 +126905,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126148,25 +126915,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126176,50 +126943,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126232,7 +126999,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126269,7 +127036,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -126374,7 +127141,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126394,24 +127161,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126427,7 +127194,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126435,31 +127202,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126484,8 +127251,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126494,52 +127261,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126547,14 +127314,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126567,35 +127334,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126658,12 +127425,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126690,7 +127457,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126722,7 +127489,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126792,28 +127559,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3272, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3286, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6367, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6381, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126846,11 +127613,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126862,16 +127629,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126887,37 +127654,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -126946,14 +127713,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127062,7 +127829,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -127079,23 +127846,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -127116,12 +127883,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127215,7 +127979,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127308,7 +128072,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127316,7 +128080,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127337,7 +128101,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127367,9 +128131,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127383,10 +128147,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127400,12 +128164,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127417,7 +128181,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127437,15 +128201,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127469,10 +128233,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127567,7 +128331,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127583,7 +128347,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127599,7 +128363,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127633,7 +128397,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127663,13 +128427,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127680,7 +128444,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127710,10 +128474,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127724,7 +128489,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127753,7 +128518,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127771,12 +128536,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127784,7 +128549,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+14479, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127795,19 +128560,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+64) + db, ts+32174, uintptr(0), uintptr(0), p+64) } } @@ -127861,7 +128626,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127888,7 +128653,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -127905,7 +128670,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127918,13 +128683,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -128019,7 +128784,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128036,19 +128801,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128056,6 +128821,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -128074,7 +128861,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128369,7 +129156,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128394,7 +129181,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128439,7 +129226,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131250,7 +132037,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131292,7 +132079,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131353,7 +132140,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131427,13 +132214,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131495,7 +132282,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -131507,6 +132294,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131859,7 +132655,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -132027,45 +132823,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32843, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32760, bp+16) + sessionAppendStr(tls, bp, ts+32856, bp+16) 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+16) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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+32771, bp+16) + ts+32867, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -132112,42 +132908,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+16) + sessionAppendStr(tls, bp, ts+32942, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32695, bp+16) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+16) + sessionAppendStr(tls, bp, ts+32960, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32407, bp+16) + sessionAppendStr(tls, bp, ts+32503, bp+16) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -132160,7 +132956,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132171,21 +132967,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+16) + sessionAppendStr(tls, bp, ts+32973, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21375, bp+16) + sessionAppendStr(tls, bp, ts+21470, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+16) + sessionAppendStr(tls, bp, ts+14604, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32895, bp+16) + sessionAppendStr(tls, bp, ts+32991, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+16) + sessionAppendStr(tls, bp, ts+33002, bp+16) } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -132199,14 +132995,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33023) + ts+33119) } return rc } @@ -132234,7 +133030,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132487,7 +133283,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132503,7 +133299,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132576,10 +133372,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -132612,7 +133408,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132625,7 +133421,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -132638,19 +133434,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132701,14 +133497,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133222,7 +134018,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -133956,7 +134752,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134244,7 +135040,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134431,7 +135227,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134499,7 +135295,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134658,7 +135454,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134681,7 +135477,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -135005,13 +135801,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135422,7 +136218,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135562,7 +136358,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135589,14 +136385,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135607,7 +136403,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135620,7 +136416,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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))) @@ -135629,7 +136425,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135648,7 +136444,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135663,14 +136459,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135678,9 +136474,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135688,9 +136484,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -135698,21 +136494,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135759,15 +136555,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135784,13 +136580,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135828,8 +136624,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135861,7 +136657,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135870,13 +136666,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -135898,19 +136694,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135954,18 +136750,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -136075,7 +136871,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -136085,7 +136881,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -136095,7 +136891,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -136108,7 +136904,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -136118,7 +136914,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -136134,7 +136930,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -136157,7 +136953,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136179,7 +136975,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -136193,7 +136989,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136291,7 +137087,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136304,20 +137100,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint64(3)) == 0 { tok = FTS5_AND } break @@ -138084,9 +138880,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -138102,7 +138898,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138189,7 +138985,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138270,7 +139066,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138440,12 +139236,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139388,7 +140184,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -139467,7 +140263,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139492,7 +140288,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -139515,7 +140311,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139754,7 +140550,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139827,13 +140623,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140953,7 +141749,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142146,7 +142942,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142312,10 +143108,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -142343,7 +143139,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142419,7 +143215,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142462,7 +143258,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -142474,7 +143270,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -142594,7 +143390,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142993,12 +143789,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -143009,7 +143805,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -143190,7 +143986,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -143314,7 +144110,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143323,7 +144119,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143355,8 +144151,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -143409,8 +144205,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -143480,7 +144276,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143496,13 +144292,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143755,7 +144551,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143869,7 +144665,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -144028,6 +144824,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -144035,7 +144835,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35242) 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)) @@ -144306,7 +145106,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144337,7 +145137,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144352,7 +145152,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144666,7 +145466,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144698,7 +145498,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144730,25 +145530,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144794,12 +145594,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144830,7 +145630,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144861,7 +145661,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144893,14 +145693,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144956,7 +145756,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -144999,7 +145799,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145173,7 +145973,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145294,7 +146094,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145318,28 +146118,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145397,7 +146197,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -145410,12 +146210,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -146045,7 +146845,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146289,7 +147089,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146308,7 +147108,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146355,7 +147155,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146364,7 +147164,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146378,7 +147178,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146402,7 +147202,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146420,13 +147220,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146481,17 +147281,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146558,7 +147358,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146593,18 +147393,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146616,7 +147416,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146628,14 +147428,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146647,17 +147447,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146694,27 +147494,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146920,12 +147720,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146933,7 +147733,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -147109,7 +147909,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147291,14 +148091,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+48) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+56) + rc = fts5StorageCount(tls, p, ts+34338, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147493,9 +148293,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147710,7 +148510,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147722,7 +148522,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147733,18 +148533,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -148020,7 +148820,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148162,7 +148962,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148170,11 +148970,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148182,7 +148982,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148190,7 +148990,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148198,11 +148998,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148210,19 +149010,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148230,11 +149030,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148242,7 +149042,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148250,11 +149050,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148262,7 +149062,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148270,7 +149070,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148278,7 +149078,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148294,24 +149094,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148326,137 +149126,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 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+37079, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36891, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36998, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148471,16 +149271,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148488,21 +149288,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148510,7 +149310,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148518,9 +149318,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148535,12 +149335,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148549,7 +149349,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148705,7 +149505,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37222) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148885,22 +149685,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -150043,14 +150843,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -150076,19 +150876,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -150221,11 +151021,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -150249,7 +151049,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150533,7 +151333,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150644,7 +151444,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150666,7 +151466,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151210,7 +152010,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -151520,16 +152320,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -151586,12 +152386,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -151606,6 +152406,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -151627,5 +152428,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 b83b23d069..f98a214532 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -993,7 +992,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1006,49 +1005,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1057,21 +1056,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1083,8 +1082,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1096,22 +1095,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1119,13 +1118,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1140,13 +1139,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1690,7 +1689,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1786,6 +1785,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1921,6 +1921,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1951,6 +1952,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2052,6 +2054,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2125,7 +2129,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2233,8 +2237,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2740,6 +2744,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3673,7 +3678,6 @@ type sqlite3 = struct { FbusyTimeout int32 FnSavepoint int32 FnStatement int32 - F__ccgo_pad4 [4]byte FnDeferredCons I64 FnDeferredImmCons I64 FpnBytesFreed uintptr @@ -3785,7 +3789,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4116,6 +4129,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4126,6 +4140,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6017,6 +6049,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6054,6 +6097,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6102,7 +6146,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6116,6 +6160,7 @@ type Parse1 = struct { FnLabelAlloc int32 FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6476,8 +6521,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6494,7 +6538,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr F__ccgo_pad2 [4]byte FrevMask Bitmask @@ -6757,8 +6800,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7083,17 +7126,6 @@ type IdxCover = struct { FiCur int32 } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7123,7 +7155,13 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7132,49 +7170,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7276,7 +7315,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7324,10 +7362,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7339,10 +7377,6 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), @@ -7352,21 +7386,13 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]uint8{ - uint8(0), - uint8(SQLITE_BLOB), - uint8(SQLITE_INTEGER), - uint8(SQLITE_INTEGER), - uint8(SQLITE_FLOAT), - uint8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7664,7 +7690,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7801,6 +7827,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FpSchema if pSchema != uintptr(0) { @@ -7824,6 +7852,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7838,9 +7867,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8083,7 +8115,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8109,13 +8141,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, 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+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8191,7 +8223,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*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)) + *(*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)+0.5) 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) @@ -8213,7 +8245,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8270,7 +8302,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8403,7 +8435,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 96)) = Time_t((*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000)) } if osLocaltime(tls, bp+96, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8427,12 +8459,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8444,7 +8476,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(z))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8466,7 +8498,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8480,7 +8512,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8488,7 +8520,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8500,7 +8532,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8534,9 +8566,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -8555,7 +8587,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8569,14 +8601,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*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+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8902,7 +8934,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8912,13 +8944,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8936,41 +8968,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8983,7 +9015,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9033,15 +9065,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9192,7 +9224,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9456,7 +9488,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9489,7 +9521,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9901,7 +9933,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(4) defer tls.Free(4) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9937,7 +9969,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9957,7 +9989,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10006,24 +10038,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10339,7 +10398,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10412,8 +10471,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10625,7 +10684,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11182,7 +11241,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11242,7 +11301,7 @@ __138: } bufpt = bp + 16 *(*uint8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint32(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint32(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11583,7 +11642,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11707,9 +11766,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11857,7 +11916,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11874,10 +11933,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11932,7 +11991,7 @@ __4: __5: } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12097,7 +12156,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12329,20 +12388,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint32(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12355,46 +12520,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint32(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([256]uint8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint32(44)) } 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 + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - sqlite3Prng.FisInit = uint8(1) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint32(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint32(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13695,7 +13860,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 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 } @@ -14246,7 +14411,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14265,13 +14430,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14284,7 +14449,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14757,193 +14922,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15318,35 +15483,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15439,11 +15604,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*12 + 4)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15522,13 +15690,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15536,7 +15704,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15557,7 +15725,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15659,19 +15827,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32) if rc != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, 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+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, 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+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16034,7 +16202,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16307,7 +16475,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16325,7 +16493,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16342,14 +16510,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16369,7 +16537,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16424,7 +16592,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16437,7 +16605,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16505,7 +16673,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16664,7 +16832,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16692,7 +16860,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16755,7 +16923,7 @@ __4: ; libc.Xmemset(tls, pShmNode, 0, uint32(unsafe.Sizeof(unixShmNode{}))+uint32(nShmFilename)) zShm = libc.AssignPtrUintptr(pShmNode+8, pShmNode+1*68) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16776,7 +16944,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0100000, @@ -16791,7 +16959,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -16917,11 +17085,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 104)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+104) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+104) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -16967,7 +17135,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17168,7 +17336,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17184,7 +17352,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } pNew = (*(*func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*12 + 4)))(tls, pOrig, uint32(nReuse), uint32(nNew), MREMAP_MAYMOVE, 0) - zErr = ts + 3417 + zErr = ts + 3431 if pNew == libc.UintptrFromInt32(-1) || pNew == uintptr(0) { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*12 + 4)))(tls, pOrig, uint32(nReuse)) @@ -17198,7 +17366,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17313,10 +17481,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_EXCL) } @@ -17332,7 +17500,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+8) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17345,7 +17513,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17353,7 +17521,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17366,15 +17534,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17419,7 +17587,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { 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+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17504,7 +17672,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17552,10 +17720,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17669,7 +17837,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17760,7 +17928,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17768,9 +17936,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17837,18 +18005,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, bp+104, uint32(unsafe.Sizeof([4098]uint8{}))-uint32(2)) if got <= 0 || got >= Ssize_t(unsafe.Sizeof([4098]uint8{}))-2 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*uint8)(unsafe.Pointer(bp + 104 + uintptr(got))) = uint8(0) @@ -17888,14 +18056,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4100)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, bp, uint32(unsafe.Sizeof([4098]uint8{}))-uint32(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4100, bp) } appendAllPathElements(tls, bp+4100, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4100)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+4100)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4100)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4100)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17951,7 +18119,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17979,11 +18147,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint32(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint32(unsafe.Sizeof(Time_t(0)))) @@ -17994,7 +18162,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18071,10 +18239,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18126,7 +18294,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18293,40 +18461,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18337,7 +18550,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18393,7 +18606,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint32(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18469,7 +18682,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18590,7 +18803,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18663,7 +18876,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18726,6 +18939,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19409,6 +19627,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19441,6 +19660,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 28)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21869,7 +22089,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23006,7 +23226,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23067,7 +23287,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint32(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint32(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23080,7 +23300,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint32(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint32(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23132,9 +23352,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23398,7 +23618,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23522,7 +23742,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23561,7 +23781,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23638,7 +23858,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23765,6 +23985,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24638,7 +24859,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24823,7 +25044,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25392,7 +25613,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25491,7 +25712,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25659,7 +25880,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26076,7 +26297,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26221,7 +26442,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26351,7 +26572,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26824,7 +27045,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27329,7 +27550,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27720,7 +27941,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27985,7 +28206,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28122,7 +28343,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28139,7 +28360,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28147,7 +28368,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28190,7 +28411,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28200,7 +28421,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28450,7 +28671,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28482,8 +28703,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28498,7 +28718,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28508,7 +28728,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28521,7 +28741,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28530,14 +28750,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -28547,7 +28767,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28594,63 +28814,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint32(usableSize-iCellStart)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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), uint32(usableSize-iCellStart)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint32(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28682,10 +28896,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint32(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28696,15 +28909,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28729,7 +28942,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28740,7 +28953,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28788,26 +29001,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28817,7 +29030,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28825,7 +29038,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28833,10 +29046,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -28905,7 +29118,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -28935,11 +29148,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -28950,15 +29163,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28986,14 +29199,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29007,7 +29220,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29019,7 +29232,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29122,7 +29335,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29150,7 +29363,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29189,7 +29402,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29213,7 +29426,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+460) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+464) } // Open a database file. @@ -29262,7 +29475,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt 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+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30034,7 +30247,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint32(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint32(3)) != 0) { goto __14 } goto page1_init_failed @@ -30072,7 +30285,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30487,7 +30700,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30513,7 +30726,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30521,6 +30734,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30530,7 +30746,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30546,7 +30762,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30607,7 +30823,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30642,7 +30858,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) if *(*Pgno)(unsafe.Pointer(bp + 24)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30702,7 +30918,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30741,7 +30957,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30772,7 +30988,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31113,7 +31329,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31357,14 +31573,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } getCellInfo(tls, pCur) aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload if Uptr((int32(aPayload)-int32((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > (*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31409,7 +31625,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31458,7 +31674,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31537,10 +31753,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31548,7 +31762,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*uintptr)(unsafe.Pointer(pCur + 120 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*4)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ - return getAndInitPage(tls, pBt, newPgno, pCur+116, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+116, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31610,7 +31825,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+116, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+116, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31630,7 +31845,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31650,7 +31865,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31862,7 +32077,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32066,7 +32281,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32131,7 +32346,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32179,7 +32394,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32298,7 +32513,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32458,7 +32673,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32523,7 +32738,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -32559,7 +32774,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32603,7 +32818,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32715,7 +32930,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32873,7 +33088,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -32930,7 +33145,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -32946,7 +33161,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33020,7 +33235,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33032,7 +33247,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 4)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -33043,7 +33258,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33208,7 +33423,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33479,12 +33694,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33492,7 +33707,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -33552,7 +33767,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -33641,7 +33856,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -33757,7 +33972,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 80)) = allocateBtreePage(tls, pBt, bp, bp+4, uint32(0), uint8(0)) @@ -34075,7 +34290,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34086,7 +34301,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34244,7 +34459,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34318,7 +34533,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34380,7 +34595,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34408,7 +34623,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -34669,7 +34884,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34861,7 +35076,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34898,6 +35113,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } else { var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 120 + uintptr(iPage-1)*4)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 72 + uintptr(iPage-1)*2))) @@ -34988,7 +35205,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35011,7 +35228,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35091,7 +35308,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35204,7 +35421,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 104)) = btreeComputeFreeSpace(tls, pPage) @@ -35265,7 +35482,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35303,13 +35520,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 108)))) @@ -35416,7 +35633,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35439,7 +35656,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35540,7 +35757,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35548,11 +35765,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35627,7 +35844,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35696,7 +35913,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35725,7 +35942,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12))) @@ -35801,7 +36018,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35815,7 +36032,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -35949,7 +36166,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36137,7 +36354,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+40, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+40, ts+4062, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+40, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -36162,11 +36379,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+312, 0) != 0 { @@ -36187,13 +36404,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36212,7 +36429,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36223,7 +36440,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36246,12 +36463,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36358,13 +36575,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36375,7 +36592,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36383,14 +36600,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36407,7 +36624,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36432,7 +36649,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36445,7 +36662,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36461,7 +36678,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36499,7 +36716,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36572,7 +36789,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36589,7 +36806,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36709,7 +36926,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36745,7 +36962,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36755,7 +36972,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36802,13 +37019,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37043,6 +37260,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37056,8 +37282,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37065,7 +37291,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37076,7 +37302,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37091,7 +37317,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37111,7 +37337,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37560,7 +37786,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37977,6 +38203,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37992,7 +38231,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38052,6 +38291,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 12)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38134,7 +38376,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38366,7 +38608,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38597,7 +38839,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38659,7 +38901,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38700,7 +38942,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38719,7 +38961,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39023,7 +39265,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39038,14 +39280,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39104,6 +39346,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39128,10 +39373,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+104, 0, uint32(unsafe.Sizeof(Vdbe{}))-uint32(uintptr(0)+104)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 8 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 4 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39169,21 +39414,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39532,85 +39785,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 + } + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 20 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39710,6 +39995,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39737,7 +40032,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39745,12 +40040,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39769,7 +40064,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39820,7 +40117,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 20 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -39949,8 +40246,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -39961,10 +40258,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39975,6 +40268,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39990,34 +40288,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 20 + uintptr(j)*4)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { - zColl = ts + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40025,7 +40323,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40033,32 +40331,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40068,13 +40366,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40082,7 +40380,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40093,20 +40391,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40131,7 +40429,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40233,7 +40531,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40583,8 +40881,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40793,7 +41091,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40801,16 +41099,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -40956,7 +41254,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41236,7 +41534,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41246,14 +41544,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41264,16 +41564,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41290,7 +41586,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41841,16 +42137,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(7) { @@ -41868,7 +42168,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 48)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else { @@ -41898,7 +42202,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41932,7 +42236,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41955,7 +42259,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 48)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 48)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 48)) != U32(10)) } if rc != 0 { @@ -41977,7 +42281,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 40 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 48))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 48))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42121,7 +42432,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42292,7 +42603,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42318,7 +42629,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42361,7 +42672,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+152, Bft(iCode+1), 0, 0x3) } } @@ -42429,13 +42740,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42466,7 +42777,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42521,7 +42832,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*40) } - Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42540,7 +42851,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42550,7 +42861,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42592,14 +42903,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42811,6 +43123,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43007,7 +43323,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43198,7 +43514,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43273,7 +43589,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43702,35 +44018,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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)*40 Xsqlite3VdbeMemRelease(tls, pVar) (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43745,7 +44060,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*40 @@ -43777,7 +44092,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, rValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43792,7 +44107,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, iValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43803,7 +44118,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43813,7 +44128,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, pPtr, zPTtype, xDestructor) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43889,7 +44204,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*40, n) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -44033,7 +44348,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44051,8 +44366,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 164 + uintptr(op)*4)) @@ -44116,7 +44434,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44260,7 +44578,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44432,7 +44750,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, (int32(zRawSql)-int32(zStart))/1) } @@ -44468,11 +44786,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 76))-1)*40 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { - Xsqlite3_str_append(tls, bp+48, ts+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44487,21 +44805,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 80 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+80) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44557,7 +44875,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44661,12 +44980,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44718,11 +45036,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44760,7 +45078,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44789,11 +45106,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44863,42 +45183,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -44906,52 +45227,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44993,19 +45314,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45014,7 +45335,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45022,11 +45343,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45262,7 +45583,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45757,20 +46078,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = (int32(pOp) - int32(aOp)) / 20 - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46160,14 +46481,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) if !(int32(type1)&int32(type2)&MEM_Int != 0) { goto __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46245,72 +46566,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46327,10 +46656,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, int64(0)) -__275: +__276: ; goto __8 @@ -46342,33 +46671,33 @@ __43: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46377,43 +46706,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint32(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46429,26 +46758,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46456,12 +46785,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46476,17 +46805,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46501,163 +46830,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46666,20 +46995,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46689,15 +47018,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46705,9 +47034,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46719,52 +47048,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*40, aMem+uintptr(U32(p21)+idx)*40, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&KEYINFO_ORDER_BIGNULL != 0 && (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*40)).Fflags)&MEM_Null != 0)) { - goto __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*20 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*20 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46773,24 +47102,24 @@ __59: v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { - goto __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46804,13 +47133,13 @@ __61: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46819,38 +47148,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } iAddr = U32((int32(pOp) - int32((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 20) 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46859,10 +47188,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46870,10 +47199,10 @@ __65: c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) if !(c1 != 0) { - goto __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46881,35 +47210,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 80 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fflags)&MEM_Null != 0) { - goto __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, int64(0)) -__353: +__362: ; goto __8 @@ -46917,372 +47284,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { - goto __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*40 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*40 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272)) - *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) + *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 272)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC1 + 80 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 272)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 272))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 120))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 272))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 272)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 272))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 120))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 272)), pDest) *(*U16)(unsafe.Pointer(pDest + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47290,15 +47658,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47307,124 +47675,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 40 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 40 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47434,40 +47802,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 40 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47485,339 +47853,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 40 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 40 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 16)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+280, pRec, uint32(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 280)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 280)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 280)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 40 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47826,20 +48194,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 288)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 288)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+288) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 288)) @@ -47850,244 +48218,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48096,172 +48464,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 296)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+296) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 152))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; 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(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48281,36 +48649,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48318,22 +48686,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 152))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48344,24 +48712,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*40 @@ -48369,30 +48737,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48408,10 +48776,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48420,10 +48788,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -48443,83 +48811,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48528,31 +48896,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48560,10 +48928,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48584,105 +48952,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) eqOnly = 0 - (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+304) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+304) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), int64(U64(iKey)), 0, bp+304) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 312)).Fdefault_rc = func() int8 { @@ -48694,231 +49062,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+312, bp+304) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+312, bp+304) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+312)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 304)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 20 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*20 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 344)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 376)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+344, bp+376) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+344, bp+376) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 376)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 376)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 376)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 376)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+384)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 384)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), bp+384, pC7+28) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+384, pC9+28) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48928,85 +49298,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, pC7+28) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), pIdxKey, pC9+28) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+384)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49014,59 +49384,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 416)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+416, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+416)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 416))) goto notExistsWithKey -__669: +__678: ; __104: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) notExistsWithKey: - pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 36)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 36)) *(*int32)(unsafe.Pointer(bp + 456)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+456) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 456)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 456)) if !(*(*int32)(unsafe.Pointer(bp + 456)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49081,121 +49451,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 460)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+460) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), bp+460) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 460)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 464)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 464)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) + *(*I64)(unsafe.Pointer(bp + 464)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 464)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 464))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 464)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 464)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 464)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+464) *(*I64)(unsafe.Pointer(bp + 464)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 464))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 464)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 464)))), 0, bp+460)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 460)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 460)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 464)) goto __8 @@ -49203,93 +49573,93 @@ __689: __107: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 472)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 472)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 472)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 472)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 472)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+472, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 36)), bp+472, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49302,7 +49672,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey) -__706: +__715: ; goto __8 @@ -49317,81 +49687,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) - (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49401,38 +49771,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+512) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+512) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49440,205 +49810,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 36)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 36)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 520)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 520)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 36)))).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 + 36)), bp+520) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36)), bp+520) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 36)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 36))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 36)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) *(*int32)(unsafe.Pointer(bp + 528)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+528) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 528)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 36)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+532) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 532)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 532)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 532)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49648,90 +50018,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) *(*int32)(unsafe.Pointer(bp + 536)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+536) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+536) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) if !(*(*int32)(unsafe.Pointer(bp + 536)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 164 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49740,36 +50110,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 544)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 544)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 544)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 544)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 36)), bp+544, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 36)), bp+544, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 @@ -49780,88 +50150,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) - (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 584)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+584, bp+616) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 616)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 624)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+624) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+624) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -49873,35 +50243,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 624)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -49910,63 +50280,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 672)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 672)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 36)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 36)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+632, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+632) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+632) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+632)).Fn, (*Mem)(unsafe.Pointer(bp+632)).Fz, bp+672, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+632) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49975,13 +50345,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 704)) = 0 @@ -49989,20 +50359,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 704))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 704)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 704))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50012,45 +50382,45 @@ __136: 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+712) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 40)) += *(*I64)(unsafe.Pointer(bp + 712)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 712)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50063,10 +50433,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+720, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 720))) goto __8 @@ -50077,10 +50447,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50088,30 +50458,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 724)).Fdb = db (*InitData)(unsafe.Pointer(bp + 724)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 724)).FpzErrMsg = p + 124 (*InitData)(unsafe.Pointer(bp + 724)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 724)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 724)).Frc = SQLITE_OK @@ -50121,36 +50491,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+724, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 724)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+724)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50158,10 +50528,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50193,22 +50563,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+752) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 752)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 752)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50218,15 +50588,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50236,17 +50606,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+760) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 760))) -__803: +__812: ; goto check_for_interrupt @@ -50256,34 +50626,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50292,48 +50662,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 120 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -50341,10 +50711,10 @@ __817: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50366,24 +50736,24 @@ __818: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem1 = pFrame2 + 88 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 40 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50415,78 +50785,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } *(*I64)(unsafe.Pointer(db + 536)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } *(*I64)(unsafe.Pointer(db + 528)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 64)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50494,11 +50864,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50514,14 +50884,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 768)) -__838: +__847: ; goto __8 @@ -50529,16 +50899,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50546,16 +50916,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50566,10 +50936,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -50592,73 +50962,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50668,22 +51038,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50696,32 +51066,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+776+1*4, bp+776+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 776)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 776 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 40 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50733,70 +51103,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50804,17 +51174,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50824,10 +51194,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50841,10 +51211,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50854,69 +51224,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+152, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 36))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 36))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 36))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -50924,16 +51294,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -50946,17 +51316,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+792) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+124) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+792) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -50966,24 +51336,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 832)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50991,52 +51361,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+832) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 832)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 832)) + *(*uintptr)(unsafe.Pointer(pCur3 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 832)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 832))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pArgc = pQuery + 1*40 - pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 36)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 36)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51045,54 +51415,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+836, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) @@ -51100,69 +51470,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 836)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+836, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36)), bp+836, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+836)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 836)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule rc = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51174,27 +51544,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 32)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51202,42 +51572,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 872)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51246,41 +51616,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 872)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51294,16 +51664,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51315,25 +51685,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51342,24 +51712,24 @@ __924: })(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+28) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+228, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51384,16 +51754,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 164 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 164 + 7*4))++ -__932: +__941: ; goto __8 @@ -51408,66 +51778,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 164 + 6*4))++ @@ -51488,73 +51858,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 32)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 164 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51562,13 +51932,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51579,10 +51949,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51631,16 +52005,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51660,10 +52034,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51673,8 +52047,8 @@ 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 { - bp := tls.Alloc(324) - defer tls.Free(324) + bp := tls.Alloc(328) + defer tls.Free(328) var nAttempt int32 var iCol int32 @@ -51694,7 +52068,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51714,8 +52088,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51723,21 +52097,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51746,8 +52120,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51780,8 +52154,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51808,7 +52182,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+36+uintptr(j)*8)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51841,7 +52215,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -51861,8 +52235,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) - *(*uintptr)(unsafe.Pointer(bp + 320)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51931,7 +52305,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+320) + rc = blobSeekToRow(tls, pBlob, iRow, bp+324) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51959,12 +52333,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 320)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 324)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 320)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 320))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 324)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52008,7 +52382,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52091,7 +52465,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52104,7 +52478,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54542,11 +54916,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54706,7 +55076,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54827,7 +55197,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -54983,14 +55353,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55007,7 +55377,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 8)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55101,7 +55471,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 140)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55110,7 +55480,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 148)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55165,7 +55535,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55173,14 +55543,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55232,7 +55602,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+44, 0, uint32(unsafe.Sizeof(struct { FpTab uintptr @@ -55272,7 +55642,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 20)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55285,23 +55655,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55404,15 +55774,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55491,10 +55861,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55541,7 +55911,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55605,7 +55975,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*20)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55621,7 +55991,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55635,7 +56005,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55658,30 +56028,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55753,7 +56123,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20))) } @@ -55769,7 +56139,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55825,7 +56195,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55900,7 +56270,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55920,7 +56290,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55955,7 +56325,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56012,7 +56382,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 8 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56040,7 +56410,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56254,7 +56624,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56294,7 +56664,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56305,7 +56675,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56317,7 +56687,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56417,12 +56787,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg @@ -56458,12 +56828,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 216)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*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 + 216)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) -= (*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)) @@ -56582,9 +56952,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) } if op == TK_COLUMN || op == TK_AGG_COLUMN { - if *(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0 { - return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) } if op == TK_SELECT { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList+8)).FpExpr) @@ -56672,14 +57040,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { - if *(*uintptr)(unsafe.Pointer(p + 44)) != uintptr(0) { - var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) - if j >= 0 { - var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) - pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) - } - break + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { + var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 44)))).FaCol+uintptr(j)*16) + 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 @@ -57007,7 +57374,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57082,7 +57449,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57250,12 +57617,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57326,12 +57698,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57370,7 +57742,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57396,7 +57768,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 20)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57424,7 +57796,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57471,7 +57843,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 120 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57496,7 +57868,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 120 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57517,11 +57889,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57550,7 +57919,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57646,7 +58019,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58070,7 +58443,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58193,7 +58566,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58203,10 +58576,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 20 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58247,10 +58622,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58680,13 +59055,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -58890,7 +59265,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58968,7 +59343,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { - goto __56 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - goto __60 -__59: - ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { - goto __61 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) != 0) { - goto __63 - } aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) - goto __64 -__63: - aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) -__64: - ; if !(aff > SQLITE_AFF_BLOB) { - goto __65 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*16 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __70 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, (*Expr)(unsafe.Pointer(pExpr)).Fop2) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 44)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { - goto __76 - } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) -__76: - ; return iReg -__6: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60362,7 +60776,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60376,10 +60790,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60392,8 +60806,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60401,12 +60815,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60432,10 +60846,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60446,14 +60858,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60483,27 +60897,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60512,9 +60926,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60522,15 +60936,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, libc.VaList(bp+8, pExpr)) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem __88: ; - goto __3 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60561,8 +60975,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60684,8 +61098,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60706,9 +61120,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60721,13 +61135,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60738,11 +61152,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60764,12 +61178,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 44)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60784,14 +61198,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60799,9 +61237,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60811,15 +61249,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60829,22 +61267,22 @@ __125: pTest = bp + 100 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 100)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60853,51 +61291,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*20)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*20)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60906,18 +61344,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61129,7 +61567,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61366,6 +61804,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61590,6 +62029,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61735,7 +62175,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62262,7 +62706,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) } - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+32)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+32)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+32)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62280,8 +62726,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*20)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62349,6 +62794,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 8)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62372,7 +62819,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62395,7 +62844,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62408,7 +62857,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62428,7 +62879,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62568,7 +63021,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } - return *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62576,7 +63029,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62627,11 +63080,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62643,13 +63096,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62659,10 +63112,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62726,7 +63179,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62736,7 +63189,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62745,7 +63198,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62786,19 +63239,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62806,7 +63259,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62818,7 +63271,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62830,7 +63283,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62876,12 +63329,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62891,11 +63344,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 44 + 4)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -62908,12 +63361,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62924,7 +63377,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 44)), zCol, *(*int32)(unsafe.Pointer(pNew + 44)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62946,7 +63399,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -62994,14 +63447,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63029,7 +63482,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nAlloc))) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63069,18 +63522,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63164,11 +63617,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63181,17 +63634,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63386,7 +63839,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 268; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { + for pp = pParse + 272; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { @@ -63449,12 +63902,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63494,8 +63947,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63512,7 +63965,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63534,7 +63987,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63574,12 +64027,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63753,8 +64206,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr @@ -63837,15 +64290,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+20, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp + 20 - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + 20 + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63873,7 +64326,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63906,13 +64359,13 @@ __15: renameTokenFind(tls, bp+20, bp, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) __16: ; - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 20)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63925,7 +64378,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63940,7 +64393,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FaCol+uintptr(i)*16) - Xsqlite3WalkExpr(tls, bp+292, pExpr) + Xsqlite3WalkExpr(tls, bp+296, pExpr) goto __24 __24: i++ @@ -63996,8 +64449,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+20) @@ -64045,7 +64498,7 @@ __39: renameColumnIdlistNames(tls, bp+20, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) __35: ; __8: @@ -64065,7 +64518,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+20)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64113,8 +64566,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(352) - defer tls.Free(352) + bp := tls.Alloc(356) + defer tls.Free(356) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64156,11 +64609,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 44)) - libc.Xmemset(tls, bp+320, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 320)).FpParse = bp + 48 + libc.Xmemset(tls, bp+324, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 324)).FpParse = bp + 48 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+320) + Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+324) if (*Parse)(unsafe.Pointer(bp+48)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 48)).Frc } else { @@ -64230,7 +64683,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*4))) } else if (*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0 { - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64253,8 +64706,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(320) - defer tls.Free(320) + bp := tls.Alloc(324) + defer tls.Free(324) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64272,16 +64725,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+292, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 292)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 292)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 292)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 292 + 24)) = bp + 272 + *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp + 276 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64296,31 +64749,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+292, pSelect) + Xsqlite3WalkSelect(tls, bp+296, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+292, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+292, + Xsqlite3WalkExpr(tls, bp+296, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*16)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+292, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+292, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+272, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+276, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+272)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+276)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64338,8 +64791,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(304) - defer tls.Free(304) + bp := tls.Alloc(308) + defer tls.Free(308) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64365,9 +64818,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*U64)(unsafe.Pointer(db + 32)) |= 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 { - libc.Xmemset(tls, bp+272, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 272)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+272) + libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 276)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+276) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64395,8 +64848,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(296) - defer tls.Free(296) + bp := tls.Alloc(300) + defer tls.Free(300) var db uintptr var iSchema int32 @@ -64433,7 +64886,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64457,7 +64910,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64538,19 +64991,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64559,7 +65012,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64573,13 +65026,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 @@ -64697,11 +65150,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64735,7 +65188,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64744,10 +65197,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64765,9 +65218,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64959,7 +65412,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65210,7 +65663,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(72) @@ -65224,7 +65677,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65237,7 +65690,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65279,7 +65732,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11397, 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)).FnChar-- @@ -65293,7 +65746,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65337,7 +65790,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65354,7 +65807,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+11272, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65510,7 +65963,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65567,7 +66020,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65614,9 +66067,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65699,7 +66152,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65721,15 +66174,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -66005,11 +66458,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66056,10 +66509,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66117,7 +66570,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66147,20 +66600,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 172 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0)) { goto __5 } @@ -66176,13 +66629,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11600, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), ts+11614, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 120 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 7*4)))) goto attach_error __7: @@ -66196,7 +66649,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66207,7 +66660,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+472) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+476) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Db{}))*uint32(3))) @@ -66260,7 +66713,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66277,7 +66730,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66343,13 +66796,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66396,7 +66849,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66427,14 +66880,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66442,7 +66895,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66553,7 +67006,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66566,7 +67019,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66580,7 +67033,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66612,7 +67065,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66787,7 +67240,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66813,11 +67266,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66864,7 +67317,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName } else { - zCol = ts + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66888,7 +67341,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66982,6 +67435,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67009,9 +67464,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67030,62 +67484,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) - } - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*20 + 16)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*20)).FpExpr, iReg) } + } - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 136)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) } - - Xsqlite3VdbeGoto(tls, v, 1) } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67132,13 +67578,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+196)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+200)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+196)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+200)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67163,25 +67609,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 0 { i = 0 } else { return uintptr(0) } } 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67202,12 +67648,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67236,9 +67682,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+404, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67249,21 +67695,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67293,12 +67739,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67403,10 +67849,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+472 { - libc.Xmemcpy(tls, db+472, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+476 { + libc.Xmemcpy(tls, db+476, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(2)*uint32(unsafe.Sizeof(Db{}))) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 472 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 476 } } @@ -67562,11 +68008,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 8))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67583,7 +68029,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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+24, zName, uintptr(0)) @@ -67612,7 +68058,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67656,7 +68102,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67682,7 +68128,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67735,13 +68181,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67779,13 +68225,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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*4))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*4))) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67945,9 +68391,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67963,7 +68409,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -67991,9 +68437,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68009,9 +68455,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68042,12 +68488,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68062,7 +68508,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68097,8 +68543,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - reg1 = libc.AssignPtrInt32(pParse+88, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) - reg2 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg1 = libc.AssignPtrInt32(pParse+92, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+96, 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) @@ -68119,7 +68565,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 132)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 136)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68149,7 +68595,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68173,7 +68619,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68182,7 +68628,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 132)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 136)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68193,7 +68639,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68205,7 +68651,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -68239,7 +68685,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68247,13 +68693,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12390, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12397, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).Fn-- @@ -68290,7 +68736,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68454,10 +68900,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Expr{}))) @@ -68488,7 +68934,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68533,7 +68979,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68622,7 +69068,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68648,7 +69094,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*16)).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+72, 1) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+76, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68717,7 +69163,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68730,13 +69176,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68769,7 +69215,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68890,13 +69336,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68904,7 +69350,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = uint8('(') @@ -68938,16 +69384,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69086,8 +69532,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 132)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 132)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 136)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 136)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69214,7 +69660,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+400, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+404, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return 0 } @@ -69238,7 +69684,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+400, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) + pMod = Xsqlite3HashFind(tls, db+404, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4))))) if pMod == uintptr(0) { return } @@ -69337,7 +69783,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69354,10 +69800,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69376,11 +69822,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69414,7 +69860,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69439,11 +69885,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69505,7 +69951,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 196 + pEnd2 = pParse + 200 } else { pEnd2 = pEnd } @@ -69514,11 +69960,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69534,13 +69980,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69555,7 +70001,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69585,7 +70031,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69601,7 +70047,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+4, pSelect) != 0) { goto __3 } @@ -69664,10 +70110,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69685,12 +70128,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69750,6 +70189,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69809,13 +70255,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -69856,10 +70302,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69891,12 +70337,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -69924,11 +70370,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70006,9 +70452,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zArg2 = uintptr(0) @@ -70067,21 +70513,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70093,7 +70539,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70157,7 +70603,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -70169,7 +70615,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70254,7 +70700,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -70481,12 +70927,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 8 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70607,7 +71053,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -70626,7 +71072,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70652,26 +71098,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70685,7 +71131,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70697,10 +71143,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70712,7 +71158,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70741,7 +71187,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70762,9 +71208,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70803,7 +71249,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70904,7 +71350,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -70918,6 +71364,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -70938,6 +71385,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 11, 0x800) __61: ; __59: @@ -71119,7 +71567,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71171,8 +71619,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71218,12 +71666,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71231,7 +71679,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71245,7 +71693,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71406,7 +71854,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71421,7 +71869,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71432,9 +71880,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71460,9 +71908,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71543,6 +71991,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71550,7 +71999,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*8)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71596,7 +72045,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71731,6 +72180,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71742,11 +72192,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 36 + 4))&0x2>>1)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 64))) @@ -71773,7 +72225,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71801,12 +72253,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -71975,7 +72427,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72011,9 +72463,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72038,7 +72490,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72053,7 +72505,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72071,7 +72523,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72357,7 +72809,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72453,7 +72905,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72553,7 +73005,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+444, zName) + pColl = Xsqlite3HashFind(tls, db+448, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72567,7 +73019,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*20)).FzName = pColl + 3*20 (*CollSeq)(unsafe.Pointer(pColl + 2*20)).Fenc = U8(SQLITE_UTF16BE) libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint32(nName)) - pDel = Xsqlite3HashInsert(tls, db+444, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+448, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72646,7 +73098,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72773,7 +73225,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+428, zName) + p = Xsqlite3HashFind(tls, db+432, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72807,7 +73259,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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+428, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) + pOther = Xsqlite3HashInsert(tls, db+432, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72830,26 +73282,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(600) + defer tls.Free(600) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 16)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 584)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 568)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash Xsqlite3HashInit(tls, pSchema+40) Xsqlite3HashClear(tls, pSchema+24) - for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { - Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) + for pElem = (*Hash)(unsafe.Pointer(bp + 568)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+568) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 16)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 584)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+16) + Xsqlite3HashClear(tls, bp+584) Xsqlite3HashClear(tls, pSchema+56) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -72915,10 +73368,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -72931,19 +73400,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73170,17 +73641,19 @@ __18: goto __20 } - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } - Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73193,10 +73666,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+8)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73205,15 +73678,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73222,98 +73695,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+40) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.Xmemset(tls, aToOpen, 1, uint32(nIdx+1)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 40)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73321,138 +73794,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+48, bp+52) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 48))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 48)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 48)), *(*int32)(unsafe.Pointer(bp + 52)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 40 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73555,7 +74033,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73785,7 +74263,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73844,7 +74322,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74148,7 +74626,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74338,7 +74816,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74451,13 +74929,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74480,7 +74972,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 120 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74490,7 +74982,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74543,7 +75035,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74583,13 +75075,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74597,7 +75089,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74626,13 +75118,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -74942,7 +75434,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74954,7 +75446,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -74978,7 +75470,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75003,7 +75495,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75081,7 +75573,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75343,7 +75835,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75363,14 +75855,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75610,107 +76102,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15076}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15421}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15123}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15143}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15143}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15149}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15464}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75831,7 +76323,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+15549, + ts+15596, 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) @@ -76491,8 +76983,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76571,7 +77063,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 40)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName (*Token)(unsafe.Pointer(bp + 40)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+40)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -76674,7 +77166,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 44 + 4)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76782,6 +77274,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).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) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76822,13 +77335,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76840,21 +77352,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0 { - *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16)).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 } @@ -76925,7 +77427,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -76983,7 +77485,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77286,6 +77788,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77449,7 +77953,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -77474,7 +77978,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77623,7 +78127,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77633,7 +78137,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77685,7 +78189,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77693,7 +78197,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -77875,7 +78379,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*20)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*20)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77890,137 +78407,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*20)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { - goto __107 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*20)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 136)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78032,64 +78549,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 144)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+144, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 144)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 136)), *(*int32)(unsafe.Pointer(bp + 140)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78097,7 +78618,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78399,7 +78924,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79490,13 +80015,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -79935,6 +80460,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79973,7 +80499,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -79982,7 +80508,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79997,7 +80523,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80033,7 +80559,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80047,7 +80573,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80071,7 +80597,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80089,7 +80615,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80116,7 +80642,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80154,7 +80680,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80164,7 +80690,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80319,7 +80845,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80327,63 +80853,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, - ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80400,238 +80926,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80653,7 +81179,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80665,10 +81191,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80677,13 +81203,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80698,9 +81224,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80714,7 +81240,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -80805,19 +81331,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80834,7 +81360,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80881,13 +81407,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -80895,7 +81421,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80920,8 +81446,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(576) - defer tls.Free(576) + bp := tls.Alloc(616) + defer tls.Free(616) var zLeft uintptr var zRight uintptr @@ -81028,13 +81554,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81054,6 +81589,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81104,7 +81641,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81119,7 +81656,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81129,7 +81666,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81146,30 +81683,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 444)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 444 + 1*4)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 444 + 2*4)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 444 + 3*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 484 + 1*4)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 484 + 2*4)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 484 + 3*4)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+444) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+484) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 444)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 444))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 484)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 484))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 444)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 484)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 444)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 484)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 484))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81390,7 +81927,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81424,7 +81961,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -81433,36 +81970,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+464) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+504) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 464)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 504)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 464)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 504)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 504)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 464)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 504)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81500,7 +82037,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81581,21 +82118,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 472)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 512)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+472) - if !(*(*I64)(unsafe.Pointer(bp + 472)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+512) + if !(*(*I64)(unsafe.Pointer(bp + 512)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 472)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 512)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 472)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 472))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 472))) + *(*I64)(unsafe.Pointer(bp + 512)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 512))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 512))) goto __15 __23: @@ -81637,15 +82174,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 480)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+480) != 0) || *(*int32)(unsafe.Pointer(bp + 480)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 520)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+520) != 0) || *(*int32)(unsafe.Pointer(bp + 520)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 480)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 520)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 480)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 520)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81682,14 +82219,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 484)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+484) != 0) { + *(*int32)(unsafe.Pointer(bp + 524)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+524) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 484))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 524))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 484)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 524)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 32)) |= uint64(SQLITE_CacheSpill) @@ -81708,17 +82245,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81729,7 +82266,7 @@ __114: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).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)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 488))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*16)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 528))) __117: ; goto __115 @@ -81741,12 +82278,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 488)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+488) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 528)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+528) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 488))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 528))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81783,11 +82320,11 @@ __123: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+496) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 496)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+536) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 536)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81806,7 +82343,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81828,7 +82365,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -81882,7 +82419,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -81979,13 +82516,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 { return 1 @@ -82050,20 +82587,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 500)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+500, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 500))) + *(*uintptr)(unsafe.Pointer(bp + 540)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+540, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 540))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82096,29 +82633,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82184,7 +82721,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82194,7 +82731,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82231,12 +82768,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 504)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 544)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 504 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), + *(*uintptr)(unsafe.Pointer(bp + 544 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82265,7 +82802,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82281,13 +82818,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 444)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 448)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82326,7 +82863,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 428)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 432)).Ffirst __212: if !(j != 0) { goto __214 @@ -82345,13 +82882,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 400)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 404)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82367,7 +82904,7 @@ __218: if !(i6 < int32(uint32(unsafe.Sizeof(aPragmaName))/uint32(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82402,7 +82939,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82410,7 +82947,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82483,20 +83020,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 516)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 556)) = 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+516, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+556, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 516)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 556)) == 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 + 516)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 516))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 556)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 556))) __242: ; goto __240 @@ -82534,12 +83071,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 516)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 556)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+516, bp+520) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+556, bp+560) __248: ; @@ -82556,8 +83093,8 @@ __250: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __252 } - if *(*uintptr)(unsafe.Pointer(bp + 520)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 520)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 560)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 36 + uintptr(j3)*8)).FiFrom } @@ -82570,11 +83107,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 516)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 556)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 516))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 556))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82599,10 +83136,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))) goto __246 __246: i8++ @@ -82640,17 +83177,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 524)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 564)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+524) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+564) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 524)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 564)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 524)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 564)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82666,7 +83203,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 524))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 564))-1, 1) i9 = 0 __264: @@ -82816,7 +83353,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82843,178 +83380,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+528, bp+532) + 1, uintptr(0), bp+568, bp+572) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 528)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 568)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 528)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 568)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*16 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 528)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 576)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+576) + if !(*(*uintptr)(unsafe.Pointer(bp + 576)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 576))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 576))) +__318: + ; +__317: ; + p11 = *(*int32)(unsafe.Pointer(bp + 568)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + libc.VaList(bp+392, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 528)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 568)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*20)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 528)), 0, 0, bp+536, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 568)), 0, 0, bp+580, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 532))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 572))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83022,87 +83688,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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)*16 + 4))&0xf>>0)) != 0) { - goto __323 + goto __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 532))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 532))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 572))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 536))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 528)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 532))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 572))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83120,14 +83792,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(endCode))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 524)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 564)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83135,27 +83807,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83164,25 +83836,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 8 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83190,50 +83862,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(setCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp2 = iCookie (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp5 = U16(1) - goto __340 -__339: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(readCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) -__340: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83248,31 +83927,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83282,10 +83961,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83305,19 +83984,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83326,86 +84005,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__359: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 56))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83413,60 +84092,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+544) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+552) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { + goto __395 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)))) { - goto __373 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 552))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+560) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 560)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 560))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+568) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 568)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 568)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83474,10 +84153,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83510,6 +84189,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83521,14 +84208,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83580,7 +84267,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83588,7 +84275,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83601,19 +84288,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+56) @@ -83629,7 +84316,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83777,7 +84464,7 @@ __1: var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) == uintptr(0) { return SQLITE_NOMEM } @@ -83793,13 +84480,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83808,7 +84495,7 @@ __3: rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+4, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83876,33 +84563,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*4)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*4)) } else { - zObj = ts + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -83962,7 +84649,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+172+8, uint32(0), 0, 0x1) @@ -83994,13 +84681,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84033,16 +84720,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40)).FiDb = iDb @@ -84127,7 +84814,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84162,7 +84849,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84176,7 +84863,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84359,16 +85046,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84436,20 +85127,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(292) + defer tls.Free(292) var rc int32 var i int32 @@ -84461,8 +85152,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84471,7 +85162,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84482,7 +85173,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84502,7 +85193,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84518,100 +85209,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 120 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr((int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) - goto __13 -__12: - (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84624,7 +85319,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84723,7 +85418,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84866,7 +85561,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85041,8 +85736,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85050,13 +85745,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85231,7 +85926,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 48)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85276,7 +85971,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85287,7 +85982,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*72 + 36 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*72 + 48)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85331,7 +86026,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85678,6 +86373,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85853,7 +86551,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -85915,16 +86613,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -85934,7 +86632,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86140,8 +86838,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 40)) = (*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)) @@ -86280,13 +86978,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86294,7 +86992,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86384,7 +87082,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86394,7 +87092,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 48)) = U32(0) @@ -86410,7 +87108,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -86697,7 +87395,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86788,7 +87486,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86808,7 +87506,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86845,7 +87543,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86879,11 +87577,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86984,8 +87682,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87032,7 +87730,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87099,7 +87797,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -87161,7 +87859,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -87314,10 +88012,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87571,8 +88269,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87599,13 +88297,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87617,7 +88315,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87718,7 +88416,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87743,6 +88441,7 @@ type SubstContext1 = struct { FiNewTable int32 FisOuterJoin int32 FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87759,7 +88458,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87796,7 +88495,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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)*20)).FpExpr + var iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*20)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87807,6 +88507,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87831,15 +88532,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*20)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88016,9 +88722,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(52) + defer tls.Free(52) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88087,7 +88800,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88103,17 +88815,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*72)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 48)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 36 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88134,7 +88837,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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)*20 + 16))) == 0 { return 0 @@ -88146,6 +88848,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*20)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*20)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88301,6 +89014,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88324,8 +89038,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+20, pParse) - Xsqlite3WalkSelect(tls, bp+20, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+24, pParse) + Xsqlite3WalkSelect(tls, bp+24, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88501,8 +89215,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(24) + defer tls.Free(24) var pNew uintptr var nChng int32 = 0 @@ -88519,6 +89233,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88548,6 +89267,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88581,12 +89301,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88652,7 +89372,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88735,7 +89455,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88864,7 +89584,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 8, 0x100) @@ -88890,7 +89610,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88906,7 +89626,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -88932,7 +89652,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -88943,9 +89663,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88972,9 +89692,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -88992,7 +89712,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89104,7 +89824,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89123,7 +89843,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -89131,7 +89851,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x80>>7)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89232,7 +89952,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89247,7 +89967,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*20 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 7, 0x80) } @@ -89312,7 +90032,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89324,7 +90044,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89343,9 +90063,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89355,7 +90075,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89505,13 +90225,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89692,19 +90412,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89717,7 +90437,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89875,7 +90595,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -89974,7 +90693,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90035,7 +90754,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90139,7 +90858,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90149,7 +90868,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 216)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 36 + 4))&0x100>>8) == 0 || @@ -90181,7 +90900,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 5, 0x20) @@ -90239,8 +90958,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+88) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+88)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90274,7 +90996,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 216)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 220)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90367,16 +91089,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 32)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90385,13 +91112,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90403,52 +91130,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90466,111 +91193,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+116, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 20 - goto __76 goto __78 __78: + k-- + pItem2 += 20 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 20 - goto __79 goto __81 __81: + k-- + pItem2 += 20 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*20)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*20)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+128, 0, uint32(unsafe.Sizeof(NameContext{}))) @@ -90589,33 +91316,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+128, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+128, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+128, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+160) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*20)).FpFExpr @@ -90623,28 +91350,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+128, *(*uintptr)(unsafe.Pointer(pExpr + 20))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+128, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 128 + 24)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90655,7 +91382,7 @@ __98: (*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 + 20)) != uintptr(0)) { - goto __101 + goto __102 } pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) + 8)).FpExpr pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) @@ -90666,7 +91393,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90692,7 +91419,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90705,27 +91432,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90733,49 +91460,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*20)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*20 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90789,45 +91516,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*20)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90846,16 +91573,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90886,16 +91613,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90908,98 +91635,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) @@ -91008,79 +91735,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 160)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91154,7 +91881,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) if !(z == uintptr(0)) { goto __10 } @@ -91176,7 +91903,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91272,7 +91999,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91364,7 +92091,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91409,7 +92136,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91453,7 +92180,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -91471,7 +92198,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91483,7 +92210,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91498,7 +92225,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91510,22 +92237,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91534,7 +92261,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91563,9 +92290,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91683,7 +92410,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91716,7 +92443,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91741,13 +92468,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92003,7 +92730,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92042,9 +92769,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92056,7 +92783,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92170,12 +92897,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92289,7 +93016,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92340,7 +93067,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 132)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 136)) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+80, 0, uint32(unsafe.Sizeof(SrcList{}))) @@ -92409,7 +93136,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92472,8 +93199,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(312) - defer tls.Free(312) + bp := tls.Alloc(316) + defer tls.Free(316) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92506,26 +93233,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 16 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+280, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 280)).FpParse = bp + 8 + libc.Xmemset(tls, bp+284, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 284)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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+280, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+284, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92542,7 +93269,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt transferParseError(tls, pParse, bp+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+96) + (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+100) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92735,10 +93462,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(4) defer tls.Free(4) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) var enc U8 = (*Sqlite3)(unsafe.Pointer(Xsqlite3VdbeDb(tls, v))).Fenc - var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16 Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), Xsqlite3ColumnExpr(tls, pTab, pCol), enc, @@ -92747,7 +93476,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93109,7 +93838,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -93141,7 +93870,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93151,7 +93880,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16)).FzCnName }(), @@ -94021,7 +94750,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94327,10 +95056,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+152, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+152)) + ts+20503, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -94421,7 +95150,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94453,7 +95182,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94590,23 +95319,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94617,7 +95348,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94626,7 +95357,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 60)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94645,7 +95376,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94665,20 +95396,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __7: ; nRes = Xsqlite3BtreeGetRequestedReserve(tls, pMain) Xsqlite3BtreeSetCacheSize(tls, pTemp, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema)).Fcache_size) Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) - Xsqlite3BtreeSetPagerFlags(tls, pTemp, uint32(PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94723,7 +95456,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94732,7 +95465,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94743,7 +95476,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94754,7 +95487,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94876,7 +95609,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+400, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+404, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -94918,7 +95651,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 404)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95075,7 +95808,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 44 + 4)) != 0 { @@ -95099,7 +95832,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95183,11 +95916,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+192)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95197,7 +95930,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95231,7 +95964,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 252 + var pArg uintptr = pParse + 256 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 @@ -95258,7 +95991,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95296,9 +96029,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95308,7 +96041,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95320,12 +96053,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) = pVTable for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { - var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95378,17 +96111,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+400, zMod) + pMod = Xsqlite3HashFind(tls, db+404, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95437,10 +96170,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - pMod = Xsqlite3HashFind(tls, db+400, zMod) + pMod = Xsqlite3HashFind(tls, db+404, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95460,8 +96193,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(280) - defer tls.Free(280) + bp := tls.Alloc(284) + defer tls.Free(284) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95474,7 +96207,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95516,7 +96249,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95884,7 +96617,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -95927,7 +96660,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -95954,7 +96687,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96183,31 +96916,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -96216,35 +96931,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96261,29 +96976,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96324,11 +97039,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96338,43 +97053,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, 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+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96406,25 +97121,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96785,7 +97500,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96838,104 +97553,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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+8, pExpr, uint32(unsafe.Sizeof(Expr{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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 + 44)) = uintptr(0) - return WRC_Prune - } else { - return WRC_Continue - } - return int32(0) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - preserveExpr(tls, pX, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), 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 + 44)) = uintptr(0) - } - } - return WRC_Continue -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(56) - defer tls.Free(56) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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 + 28)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer(aColExpr + 8 + uintptr(iIdxCol)*20)).FpExpr - if Xsqlite3ExprIsConstant(tls, (*IdxExprTrans)(unsafe.Pointer(bp+28)).FpIdxExpr) != 0 { - continue - } - (*Walker)(unsafe.Pointer(bp)).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)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16)).FcolFlags)&COLFLAG_HASCOLL == 0 || - Xsqlite3StrICmp(tls, Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*16), - uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) == 0) { - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 28)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -96974,7 +97591,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(4) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 768 + uintptr(iLevel)*88 + var pLevel uintptr = pWInfo + 760 + uintptr(iLevel)*88 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -96994,6 +97611,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97144,12 +97763,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 88 + pWC = pWInfo + 80 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)*72 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+504, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+496, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97168,13 +97787,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(j)*88)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*88)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(j)*88)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(j)*88)).FpRJ != 0) { goto __6 } goto __4 @@ -97187,7 +97806,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 768 + uintptr(j)*88)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(j)*88)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x20>>5)) != 0) { goto __7 @@ -97249,7 +97868,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97396,6 +98015,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97738,13 +98359,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97752,104 +98380,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97858,92 +98495,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -97953,24 +98584,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -97990,152 +98621,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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, uint32(unsafe.Sizeof(SrcItem{}))) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*72, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*88)).FiFrom)*72, uint32(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*48)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+768, uint16(0)) + pParse, pOrTab, pSubWInfo+760, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98144,121 +98776,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 52))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 48))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 768)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 760)).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)) + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 64)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98267,36 +98899,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 36 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98314,219 +98946,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+504, *(*int32)(unsafe.Pointer(pE + 36))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 48 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr pAlt = Xsqlite3WhereFindTerm(tls, pWC, iCur, *(*int32)(unsafe.Pointer(pTerm + 24)), notReady, uint32(WO_EQ|WO_IN|WO_IS), uintptr(0)) if !(pAlt == uintptr(0)) { - goto __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 + 20)))).FpEList)).FnExpr > 1) { - goto __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 20)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 20)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+20, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 10)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 48 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98536,24 +99168,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98564,41 +99196,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 48 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98632,7 +99264,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 88 + var pWC uintptr = pWInfo + 80 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 @@ -98640,13 +99272,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(k)*88)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+768+uintptr(k)*88)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 768 + uintptr(k)*88)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*88)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+760+uintptr(k)*88)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(k)*88)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -98925,7 +99557,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*20)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { for i = 0; i < int32(uint32(unsafe.Sizeof(aOp))/uint32(unsafe.Sizeof(Op2{}))); i++ { if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), aOp[i].FzOp) == 0 { *(*uint8)(unsafe.Pointer(peOp2)) = aOp[i].FeOp2 @@ -98938,7 +99570,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 44)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -98962,11 +99594,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 44)))).FeTabType) == TABTYP_VTAB { res++ } - if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 44)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 44)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -98998,10 +99630,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99143,7 +99775,7 @@ __1: { 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+504, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99160,10 +99792,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+504, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+496, (*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)*48 - b = b | Xsqlite3WhereGetMask(tls, pWInfo+504, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99220,7 +99852,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+504, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+496, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99406,6 +100038,7 @@ __3: 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)*20)).FpExpr, iCur) == 0 { *(*int32)(unsafe.Pointer(aiCurCol)) = iCur *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 @@ -99461,7 +100094,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*48 - pMaskSet = pWInfo + 504 + pMaskSet = pWInfo + 496 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99498,12 +100131,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99582,7 +100215,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99676,7 +100309,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99870,7 +100503,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100049,7 +100682,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100118,6 +100751,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100144,10 +100780,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 768 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*88 + pInner = pWInfo + 760 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*88 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100167,14 +100803,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&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 + 768 + uintptr(i)*88 + pInner = pWInfo + 760 + uintptr(i)*88 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 @@ -100211,14 +100847,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+20, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100661,6 +101297,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100670,11 +101318,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100769,7 +101415,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -100840,7 +101486,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101074,7 +101720,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 768 + uintptr(iLevel)*88 + pLevel = pWInfo + 760 + uintptr(iLevel)*88 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101136,11 +101782,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_OK) @@ -101208,7 +101852,7 @@ __3: uint32(unsafe.Sizeof(sqlite3_index_orderby{}))*uint32(nOrderBy)+uint32(unsafe.Sizeof(HiddenIndexInfo1{}))+ uint32(unsafe.Sizeof(uintptr(0)))*uint32(nTerm))) if pIdxInfo == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*72 @@ -101330,9 +101974,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101400,7 +102044,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanLt + uintptr(iCol)*4)) } @@ -101749,9 +102393,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 64 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint32(unsafe.Sizeof([3]uintptr{})) / uint32(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101775,7 +102422,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) return SQLITE_NOMEM } @@ -101791,32 +102439,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+88) + Xsqlite3WhereClauseClear(tls, pWInfo+80) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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+8, uint32(unsafe.Sizeof(Expr{}))) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -101962,7 +102600,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+64, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+60, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102205,13 +102843,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 36)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 + 24)) |= uint8(SQLITE_BLDF1_UNIQUE) } else { @@ -102222,7 +102857,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTerm @@ -102277,31 +102913,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } else if int32(eOp)&WO_ISNULL != 0 { *(*U32)(unsafe.Pointer(pNew + 44)) |= 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 + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = 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 { - pTop = pTerm + 1*48 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)*4)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*48 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*4)) = pTop + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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)*4)) + } else { + pBtm = uintptr(0) + } } } @@ -102504,6 +103142,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(36) + defer tls.Free(36) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(102) defer tls.Free(102) @@ -102635,6 +103331,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 44)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102649,6 +103348,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102679,7 +103381,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 88 + var pWC2 uintptr = pWInfo + 80 for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC2)).FnTerm; ii++ { var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC2)).Fa + uintptr(ii)*48 if !(Xsqlite3ExprCoveredByIndex(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iCur, pProbe) != 0) { @@ -102834,7 +103536,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102892,7 +103594,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103250,7 +103952,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103262,7 +103964,7 @@ __1: var mUnusable Bitmask = uint64(0) (*WhereLoop)(unsafe.Pointer(pNew)).FiTab = U8(iTab) *(*uint32)(unsafe.Pointer(pBuilder + 28)) += uint32(SQLITE_QUERY_PLANNER_LIMIT_INCR) - (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+504, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103277,7 +103979,7 @@ __1: var p uintptr for p = pItem + 1*72; p < pEnd; p += 72 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+504, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+496, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103290,7 +103992,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103391,7 +104093,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+88, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+80, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103565,7 +104267,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+504, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+496, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103617,7 +104319,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103645,7 +104347,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103666,7 +104367,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103688,7 +104388,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { nSpace = int32((uint32(unsafe.Sizeof(WherePath{})) + uint32(unsafe.Sizeof(uintptr(0)))*uint32(nLoop)) * uint32(mxChoice) * uint32(2)) nSpace = int32(uint32(nSpace) + uint32(unsafe.Sizeof(LogEst(0)))*uint32(nOrderBy)) - pSpace = Xsqlite3DbMallocRawNN(tls, db, uint64(nSpace)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103750,9 +104450,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103768,7 +104467,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103788,6 +104489,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103884,8 +104590,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103897,7 +104603,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 768 + uintptr(iLoop)*88 + var pLevel uintptr = pWInfo + 760 + uintptr(iLoop)*88 (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop = libc.AssignUintptr(&pWLoop, *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(iLoop)*4))) (*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)*72)).FiCursor @@ -103912,7 +104618,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -103932,7 +104638,7 @@ __3: uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+16)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -103940,7 +104646,7 @@ __3: } 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+52, uint32(1), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -103950,7 +104656,7 @@ __3: pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+24)) if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+52, uint32(1), 3, 0x8) + libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -103958,7 +104664,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -103990,7 +104696,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 88 + pWC = pWInfo + 80 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104047,10 +104753,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 760)).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) @@ -104094,16 +104800,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+504, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+504, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+496, (*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 + 768 + uintptr(i)*88)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(i)*88)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*72 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104136,7 +104842,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } if i != int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 { var nByte int32 = int32(uint32(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1-i) * uint32(unsafe.Sizeof(WhereLevel{}))) - libc.Xmemmove(tls, pWInfo+768+uintptr(i)*88, pWInfo+768+uintptr(i+1)*88, uint32(nByte)) + libc.Xmemmove(tls, pWInfo+760+uintptr(i)*88, pWInfo+760+uintptr(i+1)*88, uint32(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104148,9 +104854,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 768 + uintptr(i)*88)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 760 + uintptr(i)*88)).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) { @@ -104168,6 +104874,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*20)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104254,7 +105012,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(40) defer tls.Free(40) @@ -104311,7 +105069,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -104334,31 +105092,30 @@ __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 + 24)) = libc.AssignPtrInt32(pWInfo+24+1*4, -1) + *(*int32)(unsafe.Pointer(pWInfo + 20)) = libc.AssignPtrInt32(pWInfo+20+1*4, -1) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel = U8(nTabList) - (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+32, Xsqlite3VdbeMakeLabel(tls, pParse)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+28, 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+49, 0, - uint32(uintptr(0)+88)-uint32(uintptr(0)+49)) - libc.Xmemset(tls, pWInfo+768, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+45, 0, + uint32(uintptr(0)+80)-uint32(uintptr(0)+45)) + libc.Xmemset(tls, pWInfo+760, 0, uint32(unsafe.Sizeof(WhereLoop{}))+uint32(nTabList)*uint32(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 504 + pMaskSet = pWInfo + 496 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 88 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 80 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+88, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+88, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+80, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+80, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104376,13 +105133,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*72)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*72, pWInfo+88) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*72, pWInfo+80) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104393,169 +105150,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+88) - Xsqlite3WhereAddLimit(tls, pWInfo+88, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+80) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+80, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } pT = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).Fa + uintptr(ii)*48 if !(int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags)&TERM_VIRTUAL != 0) { - goto __15 + goto __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 10)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } wctrlFlags = libc.Uint16FromInt32(int32(wctrlFlags) & libc.CplInt32(WHERE_WANT_DISTINCT)) - *(*U16)(unsafe.Pointer(pWInfo + 44)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) - goto __19 -__18: - if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+88, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 40)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+80, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 44)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 40)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104564,26 +105326,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 768 -__40: + pLevel = pWInfo + 760 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 @@ -104591,37 +105353,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 20)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104629,92 +105391,98 @@ __51: int32((*Table)(unsafe.Pointer(pTab)).FnCol) < int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(n), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __57 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 24 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 20 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104724,24 +105492,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104751,96 +105519,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 20)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 44)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 88 - goto __40 goto __42 __42: + ii++ + pLevel += 88 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 768 + uintptr(ii)*88 + pLevel = pWInfo + 760 + uintptr(ii)*88 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+88, + constructAutomaticIndex(tls, pParse, pWInfo+80, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104848,30 +105616,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104891,7 +105657,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 768 + uintptr(i)*88 + pLevel = pWInfo + 760 + uintptr(i)*88 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105027,11 +105793,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 768 + pLevel = pWInfo + 760 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105070,6 +105833,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*20 @@ -105243,7 +106016,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105376,7 +106149,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105465,17 +106238,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105521,7 +106294,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105565,12 +106338,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105593,7 +106366,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105762,7 +106535,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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)*20)).FpExpr, 0) - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pDup) break @@ -105799,7 +106571,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105915,7 +106687,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106029,7 +106801,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106094,15 +106866,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106123,7 +106895,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106261,7 +107033,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106279,11 +107051,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106763,13 +107535,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107675,19 +108451,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107758,7 +108534,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108853,7 +109629,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109828,21 +110604,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110585,7 +111361,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110749,7 +111525,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 92)) = *(*Token)(unsafe.Pointer(yymsp + 4)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+92)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+92)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -110966,9 +111742,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) @@ -111247,19 +112023,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111638,9 +112414,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112408,7 +113184,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 1248)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+1248)) break } } @@ -112429,9 +113205,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112444,7 +113220,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112604,7 +113380,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112617,11 +113393,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112634,9 +113410,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112746,36 +113522,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -112892,7 +113646,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113163,16 +113917,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113236,6 +113991,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113286,6 +114042,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113434,7 +114191,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 404)).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) @@ -113464,7 +114221,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113479,7 +114236,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113575,7 +114332,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 428)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 432)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113586,8 +114343,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+428) - for i = (*Hash)(unsafe.Pointer(db + 444)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+432) + for i = (*Hash)(unsafe.Pointer(db + 448)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113597,13 +114354,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+444) - for i = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+448) + for i = (*Hash)(unsafe.Pointer(db + 404)).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+400) + Xsqlite3HashClear(tls, db+404) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113670,23 +114427,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113704,35 +114461,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113847,7 +114604,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113892,7 +114649,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -114009,7 +114766,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114025,6 +114782,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114034,7 +114794,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114242,7 +115002,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114335,7 +115095,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114405,7 +115165,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114415,7 +115175,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114447,20 +115207,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+444, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+448, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*20 @@ -114584,7 +115344,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+24041, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint32(5)) == 0) { goto __1 } iOut = 0 @@ -114629,10 +115389,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114737,7 +115497,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -114748,17 +115508,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint32(4)) == 0) { goto __32 } @@ -114766,7 +115526,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114796,7 +115556,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114804,7 +115564,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114844,7 +115604,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114867,15 +115627,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114990,7 +115750,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 472 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 476 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -115009,8 +115769,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+444) - Xsqlite3HashInit(tls, db+400) + Xsqlite3HashInit(tls, db+448) + Xsqlite3HashInit(tls, db+404) 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 @@ -115021,10 +115781,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115038,7 +115798,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -115055,7 +115815,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16)))) @@ -115089,9 +115849,9 @@ __22: Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FpSchema = Xsqlite3SchemaGet(tls, db, uintptr(0)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23282 (*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) @@ -115196,7 +115956,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -115299,21 +116059,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115424,7 +116184,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115471,14 +116231,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115548,6 +116308,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116124,7 +116887,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116242,7 +117005,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116419,7 +117182,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116572,7 +117335,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)(unsafe.Pointer(ts + 24335 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -116598,7 +117361,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116627,7 +117390,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116685,19 +117448,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117242,17 +118005,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6690, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6695, uint32(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint32(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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)) @@ -117353,7 +118116,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117659,7 +118422,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+24396, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117674,7 +118437,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117728,7 +118491,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117833,11 +118596,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -117878,7 +118641,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -117994,14 +118757,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118096,7 +118859,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118171,9 +118934,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118306,7 +119069,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118403,7 +119166,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118447,7 +119210,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118578,7 +119341,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118597,7 +119360,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*12 pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 @@ -118693,7 +119456,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118717,7 +119480,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118833,7 +119596,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118928,25 +119691,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118965,8 +119728,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119223,11 +119986,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+76) Xsqlite3_free(tls, zTab) } @@ -119438,7 +120201,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120136,7 +120899,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120348,7 +121111,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121477,7 +122240,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121489,12 +122252,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121535,7 +122298,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121720,7 +122483,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121743,14 +122506,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -121791,7 +122554,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -121834,19 +122597,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121875,7 +122638,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121887,7 +122650,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121895,18 +122658,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121921,14 +122684,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121957,7 +122720,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -121965,19 +122728,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122019,16 +122782,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) return SQLITE_ERROR __1: ; @@ -122053,7 +122816,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -122065,7 +122828,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122088,7 +122851,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122099,14 +122862,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122149,7 +122912,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) goto rtreeInit_fail __22: ; @@ -122166,7 +122929,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122184,7 +122947,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(600) @@ -122222,13 +122985,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+48, bp+16, ii, bp+552) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+48)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122239,7 +123002,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122315,12 +123078,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122339,7 +123102,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122358,7 +123121,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122372,8 +123135,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -122388,23 +123151,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122428,7 +123191,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122448,7 +123211,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122465,14 +123228,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122480,7 +123243,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122509,14 +123272,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122538,12 +123301,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122552,12 +123315,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122571,8 +123334,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122580,7 +123343,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 24 + 1*4))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122595,7 +123358,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122603,7 +123366,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4))) } @@ -122613,7 +123376,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122981,11 +123744,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -123005,19 +123768,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -123922,7 +124685,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123931,7 +124694,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -123939,7 +124702,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123950,7 +124713,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -123975,7 +124738,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124164,7 +124927,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124174,7 +124937,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124182,7 +124945,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124294,7 +125057,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124424,14 +125187,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124496,7 +125259,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124508,25 +125271,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124536,26 +125299,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124609,7 +125372,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124673,6 +125436,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124925,7 +125690,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -124936,7 +125701,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124949,7 +125714,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -124961,7 +125726,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125037,7 +125802,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+36) + ts+27816, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -125101,7 +125866,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+24891, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125122,16 +125887,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125229,7 +125994,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125247,7 +126012,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125265,7 +126030,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125283,7 +126048,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125306,7 +126071,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125352,7 +126117,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125367,7 +126132,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125407,7 +126172,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125417,18 +126182,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125440,18 +126205,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125465,7 +126230,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 5) @@ -125508,12 +126273,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125524,13 +126289,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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)*4)) - zRet = rbuMPrintf(tls, p, ts+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125552,25 +126317,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125607,12 +126372,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125647,7 +126412,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125655,13 +126420,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125679,12 +126444,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 } - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125706,8 +126471,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125718,7 +126483,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125745,13 +126510,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125763,9 +126528,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125775,37 +126540,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -125839,16 +126604,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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)*4)) - zList = Xsqlite3_mprintf(tls, ts+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125856,7 +126621,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125868,27 +126633,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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)*4)) - zList = rbuMPrintf(tls, p, ts+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -125897,7 +126662,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125911,21 +126676,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -125960,19 +126725,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -125984,15 +126749,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60))) } return z @@ -126007,12 +126772,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 172)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -126021,7 +126786,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126031,25 +126796,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126059,50 +126824,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*4)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126115,7 +126880,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126152,7 +126917,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -126257,7 +127022,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126277,24 +127042,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+604, bp+608, bp+612) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 612))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 604)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 612)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126310,7 +127075,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126318,31 +127083,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126367,8 +127132,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126377,52 +127142,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126430,14 +127195,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126450,35 +127215,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126541,12 +127306,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126573,7 +127338,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126605,7 +127370,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 12)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126675,28 +127440,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+24, ts+3272, uint32(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+24, ts+3286, uint32(4)) } else { - libc.Xmemcpy(tls, p+24, ts+6367, uint32(4)) + libc.Xmemcpy(tls, p+24, ts+6381, uint32(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126729,11 +127494,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126745,16 +127510,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126770,37 +127535,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -126829,14 +127594,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126945,7 +127710,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126962,23 +127727,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126999,12 +127764,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127098,7 +127860,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127191,7 +127953,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127199,7 +127961,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127220,7 +127982,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127250,9 +128012,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127266,10 +128028,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127283,12 +128045,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127300,7 +128062,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127320,15 +128082,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127352,10 +128114,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127450,7 +128212,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127466,7 +128228,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127482,7 +128244,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127516,7 +128278,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127546,13 +128308,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127563,7 +128325,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127593,10 +128355,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*248 + var pCsr uintptr = p + 1*256 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127607,7 +128370,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+Size_t(1)) pCsr += uintptr(nRbu + Size_t(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127636,7 +128399,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127654,12 +128417,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127667,7 +128430,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+14479, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+48) @@ -127678,19 +128441,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+36) + db, ts+32174, uintptr(0), uintptr(0), p+36) } } @@ -127744,7 +128507,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -127771,7 +128534,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -127788,7 +128551,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127801,13 +128564,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+36) } rbuObjIterFinalize(tls, p+48) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127902,7 +128665,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127919,19 +128682,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127939,6 +128702,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -127957,7 +128742,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 232)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128252,7 +129037,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128277,7 +129062,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128322,7 +129107,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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 + 188)) |= U32((int32(1)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131128,7 +131913,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131170,7 +131955,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131231,7 +132016,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131305,13 +132090,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131373,7 +132158,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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)*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, 215972)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -131385,6 +132170,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*4)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131737,7 +132531,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -131903,45 +132697,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) (*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+32747, bp+12) + sessionAppendStr(tls, bp, ts+32843, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32760, bp+12) + sessionAppendStr(tls, bp, ts+32856, bp+12) 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+32766, bp+12) + sessionAppendStr(tls, bp, ts+32862, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+12) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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) if bStat1 != 0 && ii == 1 { sessionAppendStr(tls, bp, - ts+32771, bp+12) + ts+32867, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32703, bp+12) + sessionAppendStr(tls, bp, ts+32799, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -131988,42 +132782,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(16) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+12) + sessionAppendStr(tls, bp, ts+32942, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32695, bp+12) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+12) + sessionAppendStr(tls, bp, ts+32862, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+12) + sessionAppendStr(tls, bp, ts+32960, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32407, bp+12) + sessionAppendStr(tls, bp, ts+32503, bp+12) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+12) + sessionAppendStr(tls, bp, ts+32799, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+12) + sessionAppendStr(tls, bp, ts+4957, bp+12) } if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { @@ -132036,7 +132830,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132047,21 +132841,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+12) + sessionAppendStr(tls, bp, ts+32973, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21375, bp+12) + sessionAppendStr(tls, bp, ts+21470, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+12) + sessionAppendStr(tls, bp, ts+14604, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32895, bp+12) + sessionAppendStr(tls, bp, ts+32991, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+12) + sessionAppendStr(tls, bp, ts+33002, bp+12) } - sessionAppendStr(tls, bp, ts+4943, bp+12) + sessionAppendStr(tls, bp, ts+4957, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+8, uintptr(0)) @@ -132075,14 +132869,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33023) + ts+33119) } return rc } @@ -132110,7 +132904,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132363,7 +133157,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132379,7 +133173,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132452,10 +133246,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+124, bp+128, bp+132, uintptr(0)) @@ -132488,7 +133282,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 124)))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) + *(*uintptr)(unsafe.Pointer(bp + 140)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124)))) if *(*uintptr)(unsafe.Pointer(bp + 140)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132501,7 +133295,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+136, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) if rc != SQLITE_OK { break } @@ -132514,19 +133308,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 128)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 128)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132577,14 +133371,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133098,7 +133892,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint32(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint32(n2)) pOut += uintptr(n2) @@ -133821,7 +134615,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134109,7 +134903,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134294,7 +135088,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134362,7 +135156,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134520,7 +135314,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134543,7 +135337,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134867,13 +135661,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135284,7 +136078,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135423,7 +136217,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135450,14 +136244,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135468,7 +136262,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135481,7 +136275,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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) @@ -135490,7 +136284,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135509,7 +136303,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135524,14 +136318,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135539,9 +136333,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135549,9 +136343,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -135559,21 +136353,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135620,15 +136414,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135645,13 +136439,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135689,8 +136483,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135722,7 +136516,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135731,13 +136525,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 44)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 44)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 52)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 52)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -135759,19 +136553,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135815,18 +136609,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135936,7 +136730,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135946,7 +136740,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135956,7 +136750,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135969,7 +136763,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135979,7 +136773,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135995,7 +136789,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4) @@ -136018,7 +136812,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136040,7 +136834,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40)) = 0 @@ -136054,7 +136848,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136152,7 +136946,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136165,20 +136959,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint32(3)) == 0 { tok = FTS5_AND } break @@ -137946,9 +138740,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137964,7 +138758,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138051,7 +138845,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138132,7 +138926,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138302,12 +139096,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139256,7 +140050,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+40) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+40) } if rc == SQLITE_ERROR { @@ -139335,7 +140129,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139360,7 +140154,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+48, zSql) != 0 { return @@ -139383,7 +140177,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139622,7 +140416,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139695,13 +140489,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*12 - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ { - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140821,7 +141615,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+60, Xsqlite3_mprintf(tls, - ts+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142013,7 +142807,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142179,10 +142973,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+36, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+36, pPage+32, nTerm, pTerm) @@ -142210,7 +143004,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist != 0 || (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 { sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, iRowid) } else { - sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, iRowid-(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid) + sqlite3Fts5BufferAppendVarint(tls, p+36, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142286,7 +143080,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142329,7 +143123,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { sqlite3Fts5BufferSize(tls, p+36, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn+(*Fts5Buffer)(unsafe.Pointer(bp)).Fn)) } sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32(unsafe.Sizeof([4]U8{})), bp+12) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -142341,7 +143135,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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+36, bp, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(4)) sqlite3Fts5BufferAppendBlob(tls, p+36, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) } @@ -142461,7 +143255,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+36, bp+4+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+36, bp+4+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -142861,12 +143655,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+36, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+36, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -142877,7 +143671,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu return sqlite3Fts5BufferSize(tls, p+36, pBuf, uint32(nByte+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) }() { { - *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iDelta)) + *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), iDelta) } { @@ -143058,7 +143852,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf for *(*uintptr)(unsafe.Pointer(bp + 896)) != 0 { { { - *(*int32)(unsafe.Pointer(bp + 900 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+900)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+900)).Fn), uint64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 896)))).Fiter.FiRowid-iLastRowid)) + *(*int32)(unsafe.Pointer(bp + 900 + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+900)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+900)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 896)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 896)))).Fiter.FiRowid } @@ -143182,7 +143976,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143191,7 +143985,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143223,8 +144017,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 12)), pSeg) if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).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 + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } } @@ -143277,8 +144071,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) - })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 12)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 12)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).Fbase.FiRowid } @@ -143348,7 +144142,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143364,13 +144158,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143623,7 +144417,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) @@ -143737,7 +144531,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -143896,6 +144690,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+4) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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 + 4))) @@ -143903,7 +144701,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+36, bp+8, uint32(4), ts+35242) 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)) @@ -144174,7 +144972,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144205,7 +145003,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } 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+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144220,7 +145018,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return uint8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144534,7 +145332,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144566,7 +145364,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144598,25 +145396,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144662,12 +145460,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144698,7 +145496,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144729,7 +145527,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144761,14 +145559,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144824,7 +145622,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -144867,7 +145665,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145041,7 +145839,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145162,7 +145960,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145186,28 +145984,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145265,7 +146063,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -145278,12 +146076,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145913,7 +146711,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146157,7 +146955,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146176,7 +146974,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146223,7 +147021,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146232,7 +147030,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146246,7 +147044,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146270,7 +147068,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146288,13 +147086,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146349,17 +147147,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146426,7 +147224,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146461,18 +147259,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146484,7 +147282,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146496,14 +147294,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146515,17 +147313,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146562,27 +147360,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146788,12 +147586,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146801,7 +147599,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146977,7 +147775,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147159,14 +147957,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 40)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+40) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+48) + rc = fts5StorageCount(tls, p, ts+34338, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147361,9 +148159,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147577,7 +148375,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147589,7 +148387,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -147600,18 +148398,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -147887,7 +148685,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148027,7 +148825,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148035,11 +148833,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148047,7 +148845,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148055,7 +148853,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148063,11 +148861,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148075,19 +148873,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148095,11 +148893,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148107,7 +148905,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148115,11 +148913,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148127,7 +148925,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148135,7 +148933,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148143,7 +148941,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148159,24 +148957,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148191,137 +148989,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36983, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36891, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37090, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36998, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148336,16 +149134,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148353,21 +149151,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148375,7 +149173,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148383,9 +149181,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148400,12 +149198,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148414,7 +149212,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148570,7 +149368,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37222) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148750,22 +149548,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -149907,14 +150705,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149940,19 +150738,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else { var nByte int32 @@ -150085,11 +150883,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -150113,7 +150911,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 68)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150397,7 +151195,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150508,7 +151306,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150530,7 +151328,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151074,7 +151872,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch @@ -151384,16 +152182,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension @@ -151450,12 +152248,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 @@ -151470,6 +152268,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1052)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1060)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit @@ -151491,5 +152290,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 228b5ddf3e..0d5307e6d9 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1021,7 +1020,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1034,49 +1033,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1085,21 +1084,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1111,8 +1110,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1124,22 +1123,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1147,13 +1146,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1168,13 +1167,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1718,7 +1717,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1814,6 +1813,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1949,6 +1949,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1979,6 +1980,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2080,6 +2082,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2153,7 +2157,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2261,8 +2265,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2768,6 +2772,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3821,7 +3826,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4152,6 +4166,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4162,6 +4177,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6073,6 +6106,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6112,6 +6156,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6162,7 +6207,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6177,6 +6222,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6545,8 +6591,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6563,7 +6608,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6825,8 +6869,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7171,17 +7215,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7211,7 +7244,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7220,49 +7260,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7364,7 +7405,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7412,10 +7452,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7427,10 +7467,6 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), @@ -7440,21 +7476,13 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]uint8{ - uint8(0), - uint8(SQLITE_BLOB), - uint8(SQLITE_INTEGER), - uint8(SQLITE_INTEGER), - uint8(SQLITE_FLOAT), - uint8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7753,7 +7781,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7890,6 +7918,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7913,6 +7943,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7927,9 +7958,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8176,7 +8210,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8202,13 +8236,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, 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+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8284,7 +8318,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*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)) + *(*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)+0.5) 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) @@ -8306,7 +8340,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8363,7 +8397,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8496,7 +8530,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8520,12 +8554,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8537,7 +8571,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(z))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8559,7 +8593,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8573,7 +8607,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8581,7 +8615,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8593,7 +8627,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8627,9 +8661,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -8648,7 +8682,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8662,14 +8696,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*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+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8995,7 +9029,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -9005,13 +9039,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -9029,41 +9063,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -9076,7 +9110,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9126,15 +9160,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9285,7 +9319,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9549,7 +9583,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9582,7 +9616,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9993,7 +10027,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -10029,7 +10063,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -10049,7 +10083,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10098,24 +10132,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10431,7 +10492,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10504,8 +10565,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10717,7 +10778,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11274,7 +11335,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11334,7 +11395,7 @@ __138: } bufpt = bp + 16 *(*uint8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11675,7 +11736,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11799,9 +11860,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11949,7 +12010,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11966,10 +12027,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -12024,7 +12085,7 @@ __4: __5: } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12189,7 +12250,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12421,20 +12482,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12447,46 +12614,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]uint8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13787,7 +13954,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 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 } @@ -14338,7 +14505,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14357,13 +14524,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14376,7 +14543,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14849,193 +15016,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15407,35 +15574,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15528,11 +15695,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15611,13 +15781,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15625,7 +15795,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15646,7 +15816,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15748,19 +15918,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, 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+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, 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+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16123,7 +16293,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16396,7 +16566,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16414,7 +16584,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16431,14 +16601,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16458,7 +16628,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16513,7 +16683,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16526,7 +16696,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16594,7 +16764,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16753,7 +16923,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16781,7 +16951,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16844,7 +17014,7 @@ __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+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16865,7 +17035,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0100000, @@ -16880,7 +17050,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -17006,11 +17176,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 128)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+128) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+128) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -17056,7 +17226,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17257,7 +17427,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17273,7 +17443,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } 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 + 3417 + zErr = ts + 3431 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)) @@ -17287,7 +17457,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17402,10 +17572,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -17421,7 +17591,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17434,7 +17604,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17442,7 +17612,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17455,15 +17625,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17508,7 +17678,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { 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+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17593,7 +17763,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17641,10 +17811,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17758,7 +17928,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17849,7 +18019,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17857,9 +18027,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17926,18 +18096,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+128, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([4098]uint8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*uint8)(unsafe.Pointer(bp + 128 + uintptr(got))) = uint8(0) @@ -17977,14 +18147,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4104)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4104, bp) } appendAllPathElements(tls, bp+4104, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4104)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+4104)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4104)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4104)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -18042,7 +18212,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -18070,11 +18240,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -18085,7 +18255,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18162,10 +18332,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18220,7 +18390,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18387,40 +18557,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18431,7 +18646,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18487,7 +18702,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18563,7 +18778,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18684,7 +18899,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18757,7 +18972,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18820,6 +19035,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19503,6 +19723,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19535,6 +19756,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21965,7 +22187,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23102,7 +23324,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23163,7 +23385,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23176,7 +23398,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23228,9 +23450,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23494,7 +23716,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23618,7 +23840,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23657,7 +23879,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23734,7 +23956,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23861,6 +24083,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24734,7 +24957,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24919,7 +25142,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25491,7 +25714,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25590,7 +25813,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25758,7 +25981,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26176,7 +26399,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26321,7 +26544,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26451,7 +26674,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26924,7 +27147,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27429,7 +27652,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27820,7 +28043,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -28085,7 +28308,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28222,7 +28445,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28239,7 +28462,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28247,7 +28470,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28290,7 +28513,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28300,7 +28523,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28550,7 +28773,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28582,8 +28805,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28598,7 +28820,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28608,7 +28830,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28621,7 +28843,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28630,14 +28852,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -28647,7 +28869,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28694,63 +28916,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28782,10 +28998,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28796,15 +29011,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28829,7 +29044,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28840,7 +29055,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28888,26 +29103,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28917,7 +29132,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28925,7 +29140,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28933,10 +29148,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -29005,7 +29220,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -29035,11 +29250,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -29050,15 +29265,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -29086,14 +29301,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29107,7 +29322,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29119,7 +29334,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29222,7 +29437,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29250,7 +29465,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29289,7 +29504,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29313,7 +29528,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -29362,7 +29577,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt 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+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30134,7 +30349,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -30172,7 +30387,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30587,7 +30802,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30613,7 +30828,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30621,6 +30836,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30630,7 +30848,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30646,7 +30864,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30707,7 +30925,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30742,7 +30960,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30802,7 +31020,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30841,7 +31059,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30872,7 +31090,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31213,7 +31431,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31457,14 +31675,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31509,7 +31727,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31558,7 +31776,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31637,10 +31855,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31648,7 +31864,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31710,7 +31927,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31730,7 +31947,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31750,7 +31967,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31962,7 +32179,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32166,7 +32383,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32231,7 +32448,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32279,7 +32496,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32398,7 +32615,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32558,7 +32775,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32623,7 +32840,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -32659,7 +32876,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32703,7 +32920,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32815,7 +33032,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32973,7 +33190,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -33030,7 +33247,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -33046,7 +33263,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33120,7 +33337,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33132,7 +33349,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -33143,7 +33360,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33308,7 +33525,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33580,12 +33797,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33593,7 +33810,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -33653,7 +33870,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33742,7 +33959,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33858,7 +34075,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -34176,7 +34393,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34187,7 +34404,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34345,7 +34562,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34419,7 +34636,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34481,7 +34698,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34509,7 +34726,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34770,7 +34987,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34962,7 +35179,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -34999,6 +35216,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -35089,7 +35308,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35112,7 +35331,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35192,7 +35411,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35305,7 +35524,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -35366,7 +35585,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35404,13 +35623,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -35517,7 +35736,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35540,7 +35759,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35641,7 +35860,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35649,11 +35868,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35728,7 +35947,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35797,7 +36016,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35826,7 +36045,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35902,7 +36121,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35916,7 +36135,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -36050,7 +36269,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36238,7 +36457,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4062, 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)) @@ -36263,11 +36482,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -36288,13 +36507,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36313,7 +36532,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36324,7 +36543,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36347,12 +36566,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36459,13 +36678,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36476,7 +36695,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36484,14 +36703,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36508,7 +36727,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36533,7 +36752,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36546,7 +36765,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36562,7 +36781,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36600,7 +36819,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36673,7 +36892,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36690,7 +36909,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36810,7 +37029,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36846,7 +37065,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36856,7 +37075,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36903,13 +37122,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37144,6 +37363,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37157,8 +37385,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37166,7 +37394,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37177,7 +37405,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37192,7 +37420,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37212,7 +37440,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37661,7 +37889,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -38078,6 +38306,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -38093,7 +38334,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38153,6 +38394,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38235,7 +38479,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38467,7 +38711,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38699,7 +38943,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38761,7 +39005,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38802,7 +39046,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38821,7 +39065,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39125,7 +39369,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39140,14 +39384,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39206,6 +39450,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39230,10 +39477,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39271,21 +39518,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39634,85 +39889,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39812,6 +40099,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39839,7 +40136,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39847,12 +40144,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39871,7 +40168,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39922,7 +40221,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -40051,8 +40350,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -40063,10 +40362,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -40077,6 +40372,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -40092,34 +40392,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40127,7 +40427,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40135,32 +40435,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40170,13 +40470,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40184,7 +40484,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40195,20 +40495,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40233,7 +40533,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40335,7 +40635,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40684,8 +40984,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40894,7 +41194,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40902,16 +41202,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -41057,7 +41357,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41337,7 +41637,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41347,14 +41647,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41365,16 +41667,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41391,7 +41689,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41942,16 +42240,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41969,7 +42271,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -41999,7 +42305,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -42033,7 +42339,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -42056,7 +42362,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -42078,7 +42384,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42222,7 +42535,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42393,7 +42706,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42419,7 +42732,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42462,7 +42775,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -42530,13 +42843,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42567,7 +42880,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42622,7 +42935,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42641,7 +42954,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42651,7 +42964,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42693,14 +43006,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42912,6 +43226,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43108,7 +43426,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43299,7 +43617,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43374,7 +43692,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43803,35 +44121,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43846,7 +44163,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43878,7 +44195,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43893,7 +44210,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43904,7 +44221,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43914,7 +44231,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43990,7 +44307,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44134,7 +44451,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44152,8 +44469,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -44217,7 +44537,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44361,7 +44681,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44533,7 +44853,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -44569,11 +44889,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44588,21 +44908,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, 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+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44658,7 +44978,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44762,12 +45083,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44819,11 +45139,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44861,7 +45181,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44890,11 +45209,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -44964,42 +45286,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -45007,52 +45330,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -45094,19 +45417,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45115,7 +45438,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45123,11 +45446,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45363,7 +45686,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45858,20 +46181,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46261,14 +46584,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46346,72 +46669,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46428,10 +46759,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -46443,33 +46774,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46478,43 +46809,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46530,26 +46861,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46557,12 +46888,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46577,17 +46908,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46602,163 +46933,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46767,20 +47098,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46790,15 +47121,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46806,9 +47137,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46820,52 +47151,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46874,24 +47205,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46905,13 +47236,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46920,38 +47251,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46960,10 +47291,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -46971,10 +47302,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -46982,35 +47313,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -47018,372 +47387,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47391,15 +47761,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47408,124 +47778,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47535,40 +47905,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47586,339 +47956,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47927,20 +48297,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47951,244 +48321,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48197,172 +48567,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48382,36 +48752,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48419,22 +48789,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48445,24 +48815,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -48470,30 +48840,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48509,10 +48879,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48521,10 +48891,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -48544,83 +48914,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48629,31 +48999,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48661,10 +49031,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48685,105 +49055,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48795,231 +49165,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -49029,85 +49401,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49115,59 +49487,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49182,121 +49554,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -49304,93 +49676,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49403,7 +49775,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -49418,81 +49790,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49502,38 +49874,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49541,205 +49913,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49749,90 +50121,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49841,36 +50213,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49881,88 +50253,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -49974,35 +50346,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -50011,63 +50383,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -50076,13 +50448,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -50090,20 +50462,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50113,45 +50485,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50164,10 +50536,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -50178,10 +50550,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50189,30 +50561,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -50222,36 +50594,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50259,10 +50631,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50294,22 +50666,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50319,15 +50691,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50337,17 +50709,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -50357,34 +50729,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50393,48 +50765,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -50442,10 +50814,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50467,24 +50839,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50516,78 +50888,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50595,11 +50967,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50615,14 +50987,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -50630,16 +51002,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50647,16 +51019,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50667,10 +51039,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -50693,73 +51065,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50769,22 +51141,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50797,32 +51169,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50834,70 +51206,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50905,17 +51277,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50925,10 +51297,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50942,10 +51314,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50955,69 +51327,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -51025,16 +51397,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -51047,17 +51419,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -51067,24 +51439,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -51092,52 +51464,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51146,54 +51518,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -51201,69 +51573,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51275,27 +51647,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51303,42 +51675,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51347,41 +51719,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51395,16 +51767,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51416,25 +51788,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51443,24 +51815,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51485,16 +51857,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -51509,66 +51881,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -51589,73 +51961,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51663,13 +52035,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51680,10 +52052,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51732,16 +52108,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51761,10 +52137,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51774,8 +52150,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51795,7 +52171,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51815,8 +52191,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51824,21 +52200,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51847,8 +52223,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51881,8 +52257,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51909,7 +52285,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51942,7 +52318,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -51962,8 +52338,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -52032,7 +52408,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -52060,12 +52436,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52109,7 +52485,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52192,7 +52568,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52205,7 +52581,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54645,11 +55021,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54809,7 +55181,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54930,7 +55302,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -55086,14 +55458,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55110,7 +55482,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55204,7 +55576,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55213,7 +55585,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55268,7 +55640,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55276,14 +55648,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55335,7 +55707,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, 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 @@ -55372,7 +55744,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55385,23 +55757,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55504,15 +55876,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55591,10 +55963,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55641,7 +56013,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55705,7 +56077,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55721,7 +56093,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55735,7 +56107,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55758,30 +56130,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55853,7 +56225,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55869,7 +56241,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55925,7 +56297,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -56000,7 +56372,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -56020,7 +56392,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -56055,7 +56427,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56112,7 +56484,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56140,7 +56512,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56354,7 +56726,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56394,7 +56766,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56405,7 +56777,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56417,7 +56789,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56517,12 +56889,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -56558,12 +56930,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -56682,9 +57054,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { 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)) - } + 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) @@ -56772,14 +57142,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -57107,7 +57476,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57182,7 +57551,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57350,12 +57719,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57426,12 +57800,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57470,7 +57844,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57496,7 +57870,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57524,7 +57898,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57571,7 +57945,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57596,7 +57970,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57617,11 +57991,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57650,7 +58021,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57746,7 +58121,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58170,7 +58545,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58293,7 +58668,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58303,10 +58678,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58347,10 +58724,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58780,13 +59157,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -58990,7 +59367,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -59068,7 +59445,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60462,7 +60878,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60476,10 +60892,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60492,8 +60908,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60501,12 +60917,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60532,10 +60948,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60546,14 +60960,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60583,27 +60999,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60612,9 +61028,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60622,15 +61038,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60661,8 +61077,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60784,8 +61200,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60806,9 +61222,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60821,13 +61237,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60838,11 +61254,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60864,12 +61280,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60884,14 +61300,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60899,9 +61339,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60911,15 +61351,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60929,22 +61369,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60953,51 +61393,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -61006,18 +61446,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61229,7 +61669,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61466,6 +61906,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61690,6 +62131,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61835,7 +62277,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62362,7 +62808,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62380,8 +62828,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62449,6 +62896,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62472,7 +62921,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62495,7 +62946,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62508,7 +62959,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62528,7 +62981,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62668,7 +63123,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62676,7 +63131,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62727,11 +63182,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62743,13 +63198,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62759,10 +63214,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62826,7 +63281,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62836,7 +63291,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62845,7 +63300,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62886,19 +63341,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62906,7 +63361,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62918,7 +63373,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62930,7 +63385,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62976,12 +63431,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62991,11 +63446,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -63008,12 +63463,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -63024,7 +63479,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -63046,7 +63501,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -63094,14 +63549,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63129,7 +63584,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63169,18 +63624,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63264,11 +63719,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63281,17 +63736,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63486,7 +63941,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -63549,12 +64004,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63594,8 +64049,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63612,7 +64067,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63634,7 +64089,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63674,12 +64129,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63853,8 +64308,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63937,15 +64392,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63973,7 +64428,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -64006,13 +64461,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64025,7 +64480,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64040,7 +64495,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -64096,8 +64551,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -64145,7 +64600,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -64165,7 +64620,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64213,8 +64668,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64256,11 +64711,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -64330,7 +64785,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64353,8 +64808,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64372,16 +64827,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64396,31 +64851,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64438,8 +64893,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64465,9 +64920,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64495,8 +64950,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -64533,7 +64988,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64557,7 +65012,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64638,19 +65093,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64659,7 +65114,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64673,13 +65128,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) 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 @@ -64797,11 +65252,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64835,7 +65290,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64844,10 +65299,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64865,9 +65320,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -65058,7 +65513,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65309,7 +65764,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -65323,7 +65778,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65336,7 +65791,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65378,7 +65833,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11397, 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)).FnChar-- @@ -65392,7 +65847,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65436,7 +65891,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65453,7 +65908,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+11272, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65609,7 +66064,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65666,7 +66121,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65713,9 +66168,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65798,7 +66253,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65820,15 +66275,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -66104,11 +66559,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66155,10 +66610,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66216,7 +66671,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66246,20 +66701,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -66275,13 +66730,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11600, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11614, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -66295,7 +66750,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66306,7 +66761,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -66359,7 +66814,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66376,7 +66831,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66442,13 +66897,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66495,7 +66950,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66526,14 +66981,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66541,7 +66996,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66652,7 +67107,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66665,7 +67120,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66679,7 +67134,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66711,7 +67166,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66886,7 +67341,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66912,11 +67367,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66963,7 +67418,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66987,7 +67442,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -67081,6 +67536,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67108,9 +67565,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67129,62 +67585,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67231,13 +67679,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67262,25 +67710,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67301,12 +67749,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67335,9 +67783,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67348,21 +67796,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67392,12 +67840,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67502,10 +67950,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -67661,11 +68109,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67682,7 +68130,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -67711,7 +68159,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67755,7 +68203,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67781,7 +68229,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67834,13 +68282,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67878,13 +68326,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -68044,9 +68492,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -68062,7 +68510,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -68090,9 +68538,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68108,9 +68556,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68141,12 +68589,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68161,7 +68609,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68196,8 +68644,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -68218,7 +68666,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68248,7 +68696,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68272,7 +68720,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68281,7 +68729,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68292,7 +68740,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68304,7 +68752,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -68338,7 +68786,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68346,13 +68794,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12390, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12397, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).Fn-- @@ -68389,7 +68837,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68553,10 +69001,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -68587,7 +69035,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68632,7 +69080,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68721,7 +69169,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68747,7 +69195,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68816,7 +69264,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68829,13 +69277,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68868,7 +69316,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68989,13 +69437,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -69003,7 +69451,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = uint8('(') @@ -69037,16 +69485,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69185,8 +69633,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69313,7 +69761,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -69337,7 +69785,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -69436,7 +69884,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69453,10 +69901,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69475,11 +69923,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69513,7 +69961,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69538,11 +69986,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69604,7 +70052,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -69613,11 +70061,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69633,13 +70081,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69654,7 +70102,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69684,7 +70132,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69700,7 +70148,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69763,10 +70211,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69784,12 +70229,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69849,6 +70290,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69908,13 +70356,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -69955,10 +70403,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69990,12 +70438,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -70023,11 +70471,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70105,9 +70553,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -70166,21 +70614,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70192,7 +70640,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70256,7 +70704,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -70268,7 +70716,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70353,7 +70801,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -70580,12 +71028,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70706,7 +71154,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -70725,7 +71173,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70751,26 +71199,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70784,7 +71232,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70796,10 +71244,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70811,7 +71259,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70840,7 +71288,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70861,9 +71309,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70902,7 +71350,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -71003,7 +71451,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -71017,6 +71465,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -71037,6 +71486,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -71218,7 +71668,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71270,8 +71720,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71317,12 +71767,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71330,7 +71780,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71344,7 +71794,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71505,7 +71955,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71520,7 +71970,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71531,9 +71981,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71559,9 +72009,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71642,6 +72092,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71649,7 +72100,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71695,7 +72146,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71830,6 +72281,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71841,11 +72293,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -71872,7 +72326,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71900,12 +72354,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -72074,7 +72528,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72110,9 +72564,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72137,7 +72591,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72152,7 +72606,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72170,7 +72624,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72456,7 +72910,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72552,7 +73006,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72652,7 +73106,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72666,7 +73120,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72745,7 +73199,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72872,7 +73326,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72906,7 +73360,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72929,26 +73383,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -73014,10 +73469,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -73030,19 +73501,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73269,17 +73742,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73292,10 +73767,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73304,15 +73779,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73321,98 +73796,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73420,138 +73895,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73654,7 +74134,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73884,7 +74364,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73943,7 +74423,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74247,7 +74727,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74437,7 +74917,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74550,13 +75030,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74579,7 +75073,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74589,7 +75083,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74642,7 +75136,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74682,13 +75176,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74696,7 +75190,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74725,13 +75219,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -75041,7 +75535,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -75053,7 +75547,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -75077,7 +75571,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75102,7 +75596,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75180,7 +75674,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75442,7 +75936,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75462,14 +75956,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75709,107 +76203,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15076}, - {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 + 15090}, - {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 + 15090}, - {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 + 15096}, - {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 + 15096}, - {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 + 15102}, - {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 + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {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 + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {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 + 15417}, - {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 + 15421}, - {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 + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15123}, + {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 + 15137}, + {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 + 15137}, + {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 + 15143}, + {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 + 15143}, + {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 + 15149}, + {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 + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {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 + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {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 + 15464}, + {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 + 15468}, + {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 + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75930,7 +76424,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+15549, + ts+15596, 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) @@ -76590,8 +77084,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76670,7 +77164,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -76773,7 +77267,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76881,6 +77375,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76921,13 +77436,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76939,21 +77453,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 } @@ -77024,7 +77528,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -77082,7 +77586,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77385,6 +77889,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77548,7 +78054,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -77573,7 +78079,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77722,7 +78228,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77732,7 +78238,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77784,7 +78290,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77792,7 +78298,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -77974,7 +78480,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -77989,137 +78508,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78131,64 +78650,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78196,7 +78719,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78499,7 +79026,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79590,13 +80117,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -80035,6 +80562,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80073,7 +80601,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -80082,7 +80610,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -80097,7 +80625,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80133,7 +80661,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80147,7 +80675,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80171,7 +80699,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80189,7 +80717,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80216,7 +80744,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80254,7 +80782,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80264,7 +80792,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80420,7 +80948,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80428,63 +80956,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, - ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80502,238 +81030,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80755,7 +81283,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80767,10 +81295,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80779,13 +81307,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80800,9 +81328,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80816,7 +81344,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80907,19 +81435,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80936,7 +81464,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80983,13 +81511,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -80997,7 +81525,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -81022,8 +81550,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -81130,13 +81658,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81156,6 +81693,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81206,7 +81745,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81221,7 +81760,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81231,7 +81770,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81248,30 +81787,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81492,7 +82031,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81526,7 +82065,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -81535,36 +82074,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81602,7 +82141,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81683,21 +82222,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81739,15 +82278,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81784,14 +82323,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81810,17 +82349,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81831,7 +82370,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81843,12 +82382,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81885,11 +82424,11 @@ __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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81908,7 +82447,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81930,7 +82469,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -81984,7 +82523,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -82081,13 +82620,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -82152,20 +82691,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82198,29 +82737,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82286,7 +82825,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82296,7 +82835,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82333,12 +82872,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, 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)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82367,7 +82906,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82383,13 +82922,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82428,7 +82967,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -82447,13 +82986,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82469,7 +83008,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82504,7 +83043,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82512,7 +83051,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82585,20 +83124,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -82636,12 +83175,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -82658,8 +83197,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -82672,11 +83211,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82701,10 +83240,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82742,17 +83281,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82768,7 +83307,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82918,7 +83457,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82945,178 +83484,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83124,87 +83792,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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 __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83222,14 +83896,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83237,27 +83911,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83266,25 +83940,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83292,50 +83966,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83350,31 +84031,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83384,10 +84065,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83407,19 +84088,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83428,86 +84109,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83515,60 +84196,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83576,10 +84257,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83612,6 +84293,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83623,14 +84312,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83682,7 +84371,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83690,7 +84379,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83703,19 +84392,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83731,7 +84420,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83879,7 +84568,7 @@ __1: 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+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83895,13 +84584,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83910,7 +84599,7 @@ __3: 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+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -83978,33 +84667,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -84064,7 +84753,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -84096,13 +84785,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84135,16 +84824,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -84229,7 +84918,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84264,7 +84953,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84278,7 +84967,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84461,16 +85150,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84538,20 +85231,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -84563,8 +85256,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84573,7 +85266,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84584,7 +85277,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84604,7 +85297,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84620,100 +85313,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84726,7 +85423,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84825,7 +85522,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -84968,7 +85665,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85143,8 +85840,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85152,13 +85849,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85333,7 +86030,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85378,7 +86075,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85389,7 +86086,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85433,7 +86130,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85780,6 +86477,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -85955,7 +86655,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -86017,16 +86717,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -86036,7 +86736,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86242,8 +86942,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -86382,13 +87082,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86396,7 +87096,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86486,7 +87186,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86496,7 +87196,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -86512,7 +87212,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86799,7 +87499,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86890,7 +87590,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86910,7 +87610,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86947,7 +87647,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86981,11 +87681,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -87086,8 +87786,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87134,7 +87834,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87201,7 +87901,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -87263,7 +87963,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -87416,10 +88116,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87673,8 +88373,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87701,13 +88401,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87719,7 +88419,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87820,7 +88520,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87846,6 +88546,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87862,7 +88563,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87899,7 +88600,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87910,6 +88612,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87934,15 +88637,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88119,9 +88827,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88190,7 +88905,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88206,17 +88920,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88237,7 +88942,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -88249,6 +88953,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88404,6 +89119,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88427,8 +89143,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88604,8 +89320,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -88622,6 +89338,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88651,6 +89372,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88684,12 +89406,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88755,7 +89477,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88838,7 +89560,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88967,7 +89689,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -88993,7 +89715,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -89009,7 +89731,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -89035,7 +89757,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -89046,9 +89768,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89075,9 +89797,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -89095,7 +89817,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89207,7 +89929,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89226,7 +89948,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -89234,7 +89956,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89335,7 +90057,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89350,7 +90072,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -89415,7 +90137,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89427,7 +90149,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89446,9 +90168,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89458,7 +90180,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89608,13 +90330,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89795,19 +90517,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89820,7 +90542,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89978,7 +90700,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -90077,7 +90798,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90138,7 +90859,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90242,7 +90963,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90252,7 +90973,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -90284,7 +91005,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 5, 0x20) @@ -90342,8 +91063,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90377,7 +91101,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90470,16 +91194,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90488,13 +91217,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90506,52 +91235,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90569,111 +91298,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -90692,33 +91421,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -90726,28 +91455,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90758,7 +91487,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90769,7 +91498,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90795,7 +91524,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90808,27 +91537,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90836,49 +91565,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90892,45 +91621,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90949,16 +91678,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90989,16 +91718,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -91011,98 +91740,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -91111,79 +91840,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91258,7 +91987,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -91280,7 +92009,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91376,7 +92105,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91468,7 +92197,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91513,7 +92242,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91557,7 +92286,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -91575,7 +92304,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91587,7 +92316,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91602,7 +92331,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91614,22 +92343,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91638,7 +92367,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91667,9 +92396,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91787,7 +92516,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91820,7 +92549,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91845,13 +92574,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92107,7 +92836,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92146,9 +92875,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92160,7 +92889,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92274,12 +93003,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92393,7 +93122,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92444,7 +93173,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -92513,7 +93242,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92576,8 +93305,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92610,26 +93339,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92646,7 +93375,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92839,10 +93568,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92851,7 +93582,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93213,7 +93944,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -93245,7 +93976,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93255,7 +93986,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -94125,7 +94856,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94431,10 +95162,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+216)) + ts+20503, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -94525,7 +95256,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94557,7 +95288,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94694,23 +95425,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94721,7 +95454,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94730,7 +95463,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94749,7 +95482,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94769,20 +95502,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94827,7 +95562,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94836,7 +95571,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94847,7 +95582,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94858,7 +95593,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94980,7 +95715,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -95022,7 +95757,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95179,7 +95914,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -95203,7 +95938,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95287,11 +96022,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95301,7 +96036,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95335,7 +96070,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -95362,7 +96097,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95400,9 +96135,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95412,7 +96147,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95424,12 +96159,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95482,17 +96217,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95541,10 +96276,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95564,8 +96299,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95578,7 +96313,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95620,7 +96355,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -95988,7 +96723,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -96031,7 +96766,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -96058,7 +96793,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96286,31 +97021,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -96319,35 +97036,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96364,29 +97081,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96427,11 +97144,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96441,43 +97158,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, 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+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96509,25 +97226,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96888,7 +97605,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96941,104 +97658,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -97077,7 +97696,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -97097,6 +97716,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97247,12 +97868,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97271,13 +97892,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -97290,7 +97911,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -97352,7 +97973,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97499,6 +98120,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97841,13 +98464,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97855,104 +98485,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97961,92 +98600,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -98056,24 +98689,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -98093,152 +98726,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98247,121 +98881,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98370,36 +99004,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98417,219 +99051,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98639,24 +99273,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98667,41 +99301,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98735,7 +99369,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98743,13 +99377,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -99028,7 +99662,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -99041,7 +99675,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -99065,11 +99699,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -99101,10 +99735,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99246,7 +99880,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99263,10 +99897,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99323,7 +99957,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99509,6 +100143,7 @@ __3: 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 @@ -99564,7 +100199,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99601,12 +100236,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99685,7 +100320,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99779,7 +100414,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99973,7 +100608,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100152,7 +100787,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100222,6 +100857,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100248,10 +100886,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100271,14 +100909,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -100315,14 +100953,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100765,6 +101403,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100774,11 +101424,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100873,7 +101521,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100944,7 +101592,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101178,7 +101826,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101240,11 +101888,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -101312,7 +101958,7 @@ __3: 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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -101434,9 +102080,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101504,7 +102150,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101853,9 +102499,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101879,7 +102528,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101895,32 +102545,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -102066,7 +102706,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102309,13 +102949,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -102326,7 +102963,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -102381,31 +103019,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -102608,6 +103248,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102739,6 +103437,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102753,6 +103454,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102783,7 +103487,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -102939,7 +103643,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102997,7 +103701,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103355,7 +104059,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103367,7 +104071,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103382,7 +104086,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103395,7 +104099,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103496,7 +104200,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103670,7 +104374,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103722,7 +104426,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103750,7 +104454,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103771,7 +104474,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103793,7 +104495,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103855,9 +104557,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103873,7 +104574,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103893,6 +104596,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -103989,8 +104697,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -104002,7 +104710,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -104017,7 +104725,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -104037,7 +104745,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -104045,7 +104753,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -104055,7 +104763,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -104063,7 +104771,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -104095,7 +104803,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104152,10 +104860,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -104199,16 +104907,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104241,7 +104949,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104253,9 +104961,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -104273,6 +104981,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104359,7 +105119,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -104416,7 +105176,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -104439,31 +105199,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104481,13 +105240,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104498,169 +105257,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104669,26 +105433,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104696,37 +105460,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104734,92 +105498,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104829,24 +105599,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104856,96 +105626,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -104953,30 +105723,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -104996,7 +105764,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105132,11 +105900,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105175,6 +105940,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -105347,7 +106122,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105480,7 +106255,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105570,17 +106345,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105626,7 +106401,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105670,12 +106445,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105698,7 +106473,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105868,7 +106643,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105905,7 +106679,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -106021,7 +106795,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106135,7 +106909,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106200,15 +106974,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106229,7 +107003,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106367,7 +107141,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106385,11 +107159,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106870,13 +107644,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107784,19 +108562,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107864,7 +108642,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108961,7 +109739,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109936,21 +110714,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110693,7 +111471,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110857,7 +111635,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111074,9 +111852,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -111355,19 +112133,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111746,9 +112524,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112516,7 +113294,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+2464)) break } } @@ -112537,9 +113315,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112552,7 +113330,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112712,7 +113490,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112725,11 +113503,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112742,9 +113520,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112854,36 +113632,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -113000,7 +113756,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113271,16 +114027,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113344,6 +114101,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113394,6 +114152,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113542,7 +114301,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -113572,7 +114331,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113587,7 +114346,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113683,7 +114442,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113694,8 +114453,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113705,13 +114464,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113778,23 +114537,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113812,35 +114571,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113955,7 +114714,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -114000,7 +114759,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -114117,7 +114876,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114133,6 +114892,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114142,7 +114904,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114350,7 +115112,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114443,7 +115205,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114513,7 +115275,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114523,7 +115285,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114555,20 +115317,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -114692,7 +115454,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+24041, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114737,10 +115499,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114845,7 +115607,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114856,17 +115618,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint64(4)) == 0) { goto __32 } @@ -114874,7 +115636,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114904,7 +115666,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114912,7 +115674,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114952,7 +115714,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114976,15 +115738,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -115099,7 +115861,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -115118,8 +115880,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -115130,10 +115892,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115147,7 +115909,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -115164,7 +115926,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115198,9 +115960,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23282 (*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) @@ -115305,7 +116067,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -115408,21 +116170,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115533,7 +116295,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115580,14 +116342,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115657,6 +116419,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116233,7 +116998,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116266,7 +117031,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -116277,7 +117042,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -116351,7 +117116,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116446,7 +117211,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -116529,7 +117294,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116682,7 +117447,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)(unsafe.Pointer(ts + 24335 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -116708,7 +117473,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116737,7 +117502,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116795,19 +117560,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117352,17 +118117,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6690, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6695, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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)) @@ -117463,7 +118228,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117769,7 +118534,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+24396, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117784,7 +118549,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117838,7 +118603,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117943,11 +118708,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -117988,7 +118753,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -118104,14 +118869,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118206,7 +118971,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118281,9 +119046,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118416,7 +119181,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118513,7 +119278,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118557,7 +119322,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118688,7 +119453,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118707,7 +119472,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118803,7 +119568,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118827,7 +119592,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118943,7 +119708,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -119038,25 +119803,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -119075,8 +119840,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119336,11 +120101,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -119551,7 +120316,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120249,7 +121014,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120461,7 +121226,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121590,7 +122355,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121602,12 +122367,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121648,7 +122413,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121833,7 +122598,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121856,14 +122621,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -121904,7 +122669,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -121947,19 +122712,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121988,7 +122753,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -122000,7 +122765,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122008,18 +122773,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122034,14 +122799,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -122070,7 +122835,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -122078,19 +122843,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122132,16 +122897,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -122166,7 +122931,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -122178,7 +122943,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122201,7 +122966,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122212,14 +122977,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122262,7 +123027,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -122279,7 +123044,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122297,7 +123062,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -122335,13 +123100,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122352,7 +123117,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122430,12 +123195,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122454,7 +123219,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122473,7 +123238,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122487,8 +123252,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -122503,23 +123268,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122543,7 +123308,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122563,7 +123328,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122580,14 +123345,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122595,7 +123360,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122624,14 +123389,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122653,12 +123418,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122667,12 +123432,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122686,8 +123451,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122695,7 +123460,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122710,7 +123475,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122718,7 +123483,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122728,7 +123493,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -123097,11 +123862,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -123121,19 +123886,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -124039,7 +124804,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -124048,7 +124813,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -124056,7 +124821,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -124067,7 +124832,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -124092,7 +124857,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124281,7 +125046,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124291,7 +125056,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124299,7 +125064,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124411,7 +125176,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124541,14 +125306,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124613,7 +125378,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124625,25 +125390,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124653,26 +125418,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124726,7 +125491,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124793,6 +125558,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -125051,7 +125818,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -125062,7 +125829,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -125075,7 +125842,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -125087,7 +125854,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125163,7 +125930,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+64) + ts+27816, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -125227,7 +125994,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+24891, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125248,16 +126015,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125355,7 +126122,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125373,7 +126140,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125391,7 +126158,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125409,7 +126176,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125432,7 +126199,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125478,7 +126245,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125493,7 +126260,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125533,7 +126300,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125543,18 +126310,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125566,18 +126333,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125591,7 +126358,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -125634,12 +126401,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125650,13 +126417,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125678,25 +126445,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125733,12 +126500,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125773,7 +126540,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125781,13 +126548,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125805,12 +126572,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125832,8 +126599,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125844,7 +126611,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125871,13 +126638,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125889,9 +126656,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125901,37 +126668,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -125965,16 +126732,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125982,7 +126749,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125994,27 +126761,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -126023,7 +126790,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -126037,21 +126804,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -126086,19 +126853,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -126110,15 +126877,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -126133,12 +126900,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -126147,7 +126914,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126157,25 +126924,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126185,50 +126952,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126241,7 +127008,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126278,7 +127045,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -126383,7 +127150,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126403,24 +127170,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126436,7 +127203,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126444,31 +127211,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126493,8 +127260,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126503,52 +127270,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126556,14 +127323,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126576,35 +127343,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126667,12 +127434,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126699,7 +127466,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126731,7 +127498,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126801,28 +127568,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3272, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3286, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6367, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6381, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126855,11 +127622,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126871,16 +127638,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126896,37 +127663,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -126955,14 +127722,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127071,7 +127838,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -127088,23 +127855,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -127125,12 +127892,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127224,7 +127988,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127317,7 +128081,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127325,7 +128089,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127346,7 +128110,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127376,9 +128140,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127392,10 +128156,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127409,12 +128173,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127426,7 +128190,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127446,15 +128210,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127478,10 +128242,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127576,7 +128340,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127592,7 +128356,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127608,7 +128372,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127642,7 +128406,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127672,13 +128436,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127689,7 +128453,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127719,10 +128483,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127733,7 +128498,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127762,7 +128527,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127780,12 +128545,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127793,7 +128558,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+14479, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127804,19 +128569,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+64) + db, ts+32174, uintptr(0), uintptr(0), p+64) } } @@ -127870,7 +128635,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127897,7 +128662,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -127914,7 +128679,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127927,13 +128692,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -128028,7 +128793,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128045,19 +128810,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128065,6 +128830,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -128083,7 +128870,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128378,7 +129165,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128403,7 +129190,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128448,7 +129235,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131259,7 +132046,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131301,7 +132088,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131362,7 +132149,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131436,13 +132223,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131504,7 +132291,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -131516,6 +132303,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131868,7 +132664,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -132036,45 +132832,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32843, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32760, bp+16) + sessionAppendStr(tls, bp, ts+32856, bp+16) 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+16) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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+32771, bp+16) + ts+32867, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -132121,42 +132917,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+16) + sessionAppendStr(tls, bp, ts+32942, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32695, bp+16) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+16) + sessionAppendStr(tls, bp, ts+32960, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32407, bp+16) + sessionAppendStr(tls, bp, ts+32503, bp+16) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -132169,7 +132965,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132180,21 +132976,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+16) + sessionAppendStr(tls, bp, ts+32973, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21375, bp+16) + sessionAppendStr(tls, bp, ts+21470, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+16) + sessionAppendStr(tls, bp, ts+14604, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32895, bp+16) + sessionAppendStr(tls, bp, ts+32991, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+16) + sessionAppendStr(tls, bp, ts+33002, bp+16) } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -132208,14 +133004,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33023) + ts+33119) } return rc } @@ -132243,7 +133039,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132496,7 +133292,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132512,7 +133308,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132585,10 +133381,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -132621,7 +133417,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132634,7 +133430,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -132647,19 +133443,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132710,14 +133506,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133231,7 +134027,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -133965,7 +134761,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134253,7 +135049,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134440,7 +135236,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134508,7 +135304,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134667,7 +135463,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134690,7 +135486,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -135014,13 +135810,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135431,7 +136227,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135571,7 +136367,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135598,14 +136394,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135616,7 +136412,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135629,7 +136425,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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))) @@ -135638,7 +136434,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135657,7 +136453,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135672,14 +136468,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135687,9 +136483,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135697,9 +136493,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -135707,21 +136503,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135768,15 +136564,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135793,13 +136589,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135837,8 +136633,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135870,7 +136666,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135879,13 +136675,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -135907,19 +136703,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135963,18 +136759,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -136084,7 +136880,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -136094,7 +136890,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -136104,7 +136900,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -136117,7 +136913,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -136127,7 +136923,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -136143,7 +136939,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -136166,7 +136962,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136188,7 +136984,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -136202,7 +136998,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136300,7 +137096,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136313,20 +137109,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint64(3)) == 0 { tok = FTS5_AND } break @@ -138093,9 +138889,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -138111,7 +138907,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138198,7 +138994,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138279,7 +139075,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138449,12 +139245,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139397,7 +140193,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -139476,7 +140272,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139501,7 +140297,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -139524,7 +140320,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139763,7 +140559,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139836,13 +140632,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -140962,7 +141758,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142155,7 +142951,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142321,10 +143117,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -142352,7 +143148,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142428,7 +143224,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142471,7 +143267,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -142483,7 +143279,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -142603,7 +143399,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -143002,12 +143798,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -143018,7 +143814,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -143199,7 +143995,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -143323,7 +144119,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143332,7 +144128,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143364,8 +144160,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -143418,8 +144214,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -143489,7 +144285,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143505,13 +144301,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143764,7 +144560,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143878,7 +144674,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -144037,6 +144833,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -144044,7 +144844,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35242) 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)) @@ -144315,7 +145115,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144346,7 +145146,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } 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+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144361,7 +145161,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return uint8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144675,7 +145475,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144707,7 +145507,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144739,25 +145539,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144803,12 +145603,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144839,7 +145639,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144870,7 +145670,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144902,14 +145702,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144965,7 +145765,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -145008,7 +145808,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145182,7 +145982,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145303,7 +146103,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145327,28 +146127,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145406,7 +146206,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -145419,12 +146219,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -146054,7 +146854,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146298,7 +147098,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146317,7 +147117,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146364,7 +147164,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146373,7 +147173,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146387,7 +147187,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146411,7 +147211,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146429,13 +147229,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146490,17 +147290,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146567,7 +147367,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146602,18 +147402,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146625,7 +147425,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146637,14 +147437,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146656,17 +147456,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146703,27 +147503,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146929,12 +147729,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146942,7 +147742,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -147118,7 +147918,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147300,14 +148100,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+48) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+56) + rc = fts5StorageCount(tls, p, ts+34338, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147502,9 +148302,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147719,7 +148519,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147731,7 +148531,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147742,18 +148542,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -148029,7 +148829,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148171,7 +148971,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148179,11 +148979,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148191,7 +148991,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148199,7 +148999,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148207,11 +149007,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148219,19 +149019,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148239,11 +149039,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148251,7 +149051,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148259,11 +149059,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148271,7 +149071,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148279,7 +149079,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148287,7 +149087,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148303,24 +149103,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148335,137 +149135,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 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+37079, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36891, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36998, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148480,16 +149280,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148497,21 +149297,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148519,7 +149319,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148527,9 +149327,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148544,12 +149344,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148558,7 +149358,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148714,7 +149514,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37222) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148894,22 +149694,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -150052,14 +150852,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -150085,19 +150885,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -150230,11 +151030,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -150258,7 +151058,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150542,7 +151342,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150653,7 +151453,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150675,7 +151475,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151219,7 +152019,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -151529,16 +152329,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -151595,12 +152395,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -151615,6 +152415,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -151636,5 +152437,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go index d8233c8458..ee951a117a 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.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_ppc64le.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_ppc64le.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1017,7 +1016,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1030,49 +1029,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1081,21 +1080,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1107,8 +1106,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1120,22 +1119,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1143,13 +1142,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1164,13 +1163,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1714,7 +1713,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1810,6 +1809,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1945,6 +1945,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1974,6 +1975,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2075,6 +2077,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2148,7 +2152,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2255,8 +2259,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2749,6 +2753,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3815,7 +3820,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4146,6 +4160,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4156,6 +4171,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6075,6 +6108,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6114,6 +6158,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6164,7 +6209,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6179,6 +6224,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6547,8 +6593,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6565,7 +6610,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6827,8 +6871,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7173,17 +7217,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7213,7 +7246,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7222,49 +7262,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7366,7 +7407,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7414,10 +7454,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7429,10 +7469,6 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), @@ -7442,21 +7478,13 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]uint8{ - uint8(0), - uint8(SQLITE_BLOB), - uint8(SQLITE_INTEGER), - uint8(SQLITE_INTEGER), - uint8(SQLITE_FLOAT), - uint8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7755,7 +7783,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7892,6 +7920,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7915,6 +7945,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7929,9 +7960,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8178,7 +8212,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8204,13 +8238,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, 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+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8286,7 +8320,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*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)) + *(*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)+0.5) 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) @@ -8308,7 +8342,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8365,7 +8399,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8498,7 +8532,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8522,12 +8556,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8539,7 +8573,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(z))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8561,7 +8595,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8575,7 +8609,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8583,7 +8617,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8595,7 +8629,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8629,9 +8663,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -8650,7 +8684,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8664,14 +8698,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*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+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8997,7 +9031,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -9007,13 +9041,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -9031,41 +9065,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -9078,7 +9112,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9128,15 +9162,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9287,7 +9321,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9551,7 +9585,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9584,7 +9618,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9995,7 +10029,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -10031,7 +10065,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -10051,7 +10085,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10100,24 +10134,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10433,7 +10494,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10506,8 +10567,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10719,7 +10780,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11276,7 +11337,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11336,7 +11397,7 @@ __138: } bufpt = bp + 16 *(*uint8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11677,7 +11738,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11801,9 +11862,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11951,7 +12012,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11968,10 +12029,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -12026,7 +12087,7 @@ __4: __5: } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12191,7 +12252,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12423,20 +12484,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12449,46 +12616,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]uint8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13799,7 +13966,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 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 } @@ -14345,7 +14512,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14364,13 +14531,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14383,7 +14550,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14856,193 +15023,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15421,35 +15588,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15542,11 +15709,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15625,13 +15795,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15639,7 +15809,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15660,7 +15830,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15762,19 +15932,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16137,7 +16307,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16410,7 +16580,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16428,7 +16598,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16445,14 +16615,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16472,7 +16642,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16527,7 +16697,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16540,7 +16710,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16608,7 +16778,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16767,7 +16937,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16795,7 +16965,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16858,7 +17028,7 @@ __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+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16879,7 +17049,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0100000, @@ -16894,7 +17064,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -17020,11 +17190,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 144)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+144) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+144) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -17070,7 +17240,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17271,7 +17441,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17287,7 +17457,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } 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 + 3417 + zErr = ts + 3431 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)) @@ -17301,7 +17471,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17416,10 +17586,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -17435,7 +17605,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17448,7 +17618,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17456,7 +17626,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17469,15 +17639,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17522,7 +17692,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { 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+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17607,7 +17777,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17655,10 +17825,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17772,7 +17942,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17863,7 +18033,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17871,9 +18041,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17940,18 +18110,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+144, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([4098]uint8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*uint8)(unsafe.Pointer(bp + 144 + uintptr(got))) = uint8(0) @@ -17991,14 +18161,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4104)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4104, bp) } appendAllPathElements(tls, bp+4104, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4104)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+4104)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4104)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4104)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -18056,7 +18226,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -18084,11 +18254,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -18099,7 +18269,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18176,10 +18346,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18234,7 +18404,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18401,40 +18571,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18445,7 +18660,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18501,7 +18716,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18577,7 +18792,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18698,7 +18913,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18771,7 +18986,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18834,6 +19049,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19517,6 +19737,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19549,6 +19770,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21979,7 +22201,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23116,7 +23338,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23177,7 +23399,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23190,7 +23412,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23242,9 +23464,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23508,7 +23730,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23632,7 +23854,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23671,7 +23893,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23748,7 +23970,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23875,6 +24097,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24748,7 +24971,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24933,7 +25156,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25505,7 +25728,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25604,7 +25827,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25772,7 +25995,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26190,7 +26413,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26335,7 +26558,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26465,7 +26688,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26938,7 +27161,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27443,7 +27666,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27834,7 +28057,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -28099,7 +28322,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28236,7 +28459,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28253,7 +28476,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28261,7 +28484,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28304,7 +28527,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28314,7 +28537,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28564,7 +28787,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28596,8 +28819,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28612,7 +28834,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28622,7 +28844,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28635,7 +28857,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28644,14 +28866,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -28661,7 +28883,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28708,63 +28930,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28796,10 +29012,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28810,15 +29025,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28843,7 +29058,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28854,7 +29069,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28902,26 +29117,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28931,7 +29146,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28939,7 +29154,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28947,10 +29162,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -29019,7 +29234,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -29049,11 +29264,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -29064,15 +29279,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -29100,14 +29315,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29121,7 +29336,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29133,7 +29348,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29236,7 +29451,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29264,7 +29479,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29303,7 +29518,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29327,7 +29542,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -29376,7 +29591,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt 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+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30148,7 +30363,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -30186,7 +30401,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30601,7 +30816,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30627,7 +30842,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30635,6 +30850,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30644,7 +30862,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30660,7 +30878,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30721,7 +30939,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30756,7 +30974,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30816,7 +31034,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30855,7 +31073,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30886,7 +31104,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31227,7 +31445,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31471,14 +31689,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31523,7 +31741,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31572,7 +31790,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31651,10 +31869,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31662,7 +31878,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31724,7 +31941,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31744,7 +31961,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31764,7 +31981,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31976,7 +32193,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32180,7 +32397,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32245,7 +32462,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32293,7 +32510,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32412,7 +32629,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32572,7 +32789,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32637,7 +32854,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -32673,7 +32890,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32717,7 +32934,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32829,7 +33046,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32987,7 +33204,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -33044,7 +33261,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -33060,7 +33277,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33134,7 +33351,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33146,7 +33363,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -33157,7 +33374,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33322,7 +33539,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33594,12 +33811,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33607,7 +33824,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -33667,7 +33884,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33756,7 +33973,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33872,7 +34089,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -34190,7 +34407,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34201,7 +34418,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34359,7 +34576,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34433,7 +34650,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34495,7 +34712,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34523,7 +34740,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34784,7 +35001,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34976,7 +35193,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -35013,6 +35230,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -35103,7 +35322,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35126,7 +35345,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35206,7 +35425,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35319,7 +35538,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -35380,7 +35599,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35418,13 +35637,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -35531,7 +35750,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35554,7 +35773,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35655,7 +35874,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35663,11 +35882,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35742,7 +35961,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35811,7 +36030,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35840,7 +36059,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35916,7 +36135,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35930,7 +36149,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -36064,7 +36283,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36252,7 +36471,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4062, 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)) @@ -36277,11 +36496,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -36302,13 +36521,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36327,7 +36546,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36338,7 +36557,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36361,12 +36580,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36473,13 +36692,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36490,7 +36709,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36498,14 +36717,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36522,7 +36741,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36547,7 +36766,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36560,7 +36779,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36576,7 +36795,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36614,7 +36833,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36687,7 +36906,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36704,7 +36923,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36824,7 +37043,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36860,7 +37079,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36870,7 +37089,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36917,13 +37136,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37158,6 +37377,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37171,8 +37399,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37180,7 +37408,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37191,7 +37419,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37206,7 +37434,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37226,7 +37454,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37675,7 +37903,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -38092,6 +38320,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -38107,7 +38348,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38167,6 +38408,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38249,7 +38493,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38481,7 +38725,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38713,7 +38957,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38775,7 +39019,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38816,7 +39060,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38835,7 +39079,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39139,7 +39383,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39154,14 +39398,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39220,6 +39464,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39244,10 +39491,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39285,21 +39532,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39648,85 +39903,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39826,6 +40113,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39853,7 +40150,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39861,12 +40158,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39885,7 +40182,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39936,7 +40235,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -40065,8 +40364,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -40077,10 +40376,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -40091,6 +40386,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -40106,34 +40406,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40141,7 +40441,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40149,32 +40449,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40184,13 +40484,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40198,7 +40498,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40209,20 +40509,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40247,7 +40547,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40349,7 +40649,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40698,8 +40998,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40908,7 +41208,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40916,16 +41216,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -41071,7 +41371,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41351,7 +41651,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41361,14 +41661,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41379,16 +41681,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41405,7 +41703,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41956,16 +42254,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41983,7 +42285,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -42013,7 +42319,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -42047,7 +42353,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -42070,7 +42376,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -42092,7 +42398,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42236,7 +42549,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42407,7 +42720,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42433,7 +42746,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42476,7 +42789,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -42544,13 +42857,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42581,7 +42894,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42636,7 +42949,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42655,7 +42968,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42665,7 +42978,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42707,14 +43020,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42936,6 +43250,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43147,7 +43465,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43338,7 +43656,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43413,7 +43731,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43842,35 +44160,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43885,7 +44202,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43917,7 +44234,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43932,7 +44249,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43943,7 +44260,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43953,7 +44270,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44039,7 +44356,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44183,7 +44500,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44201,8 +44518,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -44266,7 +44586,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44410,7 +44730,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44582,7 +44902,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -44618,11 +44938,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44637,21 +44957,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, 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+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44707,7 +45027,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44811,12 +45132,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44868,11 +45188,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44910,7 +45230,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44939,11 +45258,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -45013,42 +45335,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -45056,52 +45379,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -45143,19 +45466,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45164,7 +45487,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45172,11 +45495,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45412,7 +45735,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45907,20 +46230,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46310,14 +46633,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46395,72 +46718,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46477,10 +46808,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -46492,33 +46823,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46527,43 +46858,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46579,26 +46910,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46606,12 +46937,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46626,17 +46957,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46651,163 +46982,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46816,20 +47147,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46839,15 +47170,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46855,9 +47186,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46869,52 +47200,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46923,24 +47254,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46954,13 +47285,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46969,38 +47300,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47009,10 +47340,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -47020,10 +47351,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -47031,35 +47362,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -47067,372 +47436,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47440,15 +47810,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47457,124 +47827,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47584,40 +47954,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47635,339 +48005,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47976,20 +48346,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -48000,244 +48370,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48246,172 +48616,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48431,36 +48801,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48468,22 +48838,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48494,24 +48864,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -48519,30 +48889,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48558,10 +48928,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48570,10 +48940,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -48593,83 +48963,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48678,31 +49048,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48710,10 +49080,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48734,105 +49104,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48844,231 +49214,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -49078,85 +49450,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49164,59 +49536,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49231,121 +49603,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -49353,93 +49725,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49452,7 +49824,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -49467,81 +49839,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49551,38 +49923,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49590,205 +49962,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49798,90 +50170,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49890,36 +50262,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49930,88 +50302,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -50023,35 +50395,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -50060,63 +50432,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -50125,13 +50497,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -50139,20 +50511,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50162,45 +50534,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50213,10 +50585,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -50227,10 +50599,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50238,30 +50610,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -50271,36 +50643,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50308,10 +50680,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50343,22 +50715,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50368,15 +50740,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50386,17 +50758,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -50406,34 +50778,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50442,48 +50814,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -50491,10 +50863,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50516,24 +50888,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50565,78 +50937,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50644,11 +51016,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50664,14 +51036,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -50679,16 +51051,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50696,16 +51068,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50716,10 +51088,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -50742,73 +51114,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50818,22 +51190,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50846,32 +51218,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50883,70 +51255,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50954,17 +51326,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50974,10 +51346,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50991,10 +51363,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -51004,69 +51376,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -51074,16 +51446,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -51096,17 +51468,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -51116,24 +51488,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -51141,52 +51513,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51195,54 +51567,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -51250,69 +51622,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51324,27 +51696,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51352,42 +51724,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51396,41 +51768,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51444,16 +51816,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51465,25 +51837,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51492,24 +51864,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51534,16 +51906,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -51558,66 +51930,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -51638,73 +52010,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51712,13 +52084,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51729,10 +52101,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51781,16 +52157,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51810,10 +52186,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51823,8 +52199,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51844,7 +52220,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51864,8 +52240,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51873,21 +52249,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51896,8 +52272,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51930,8 +52306,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51958,7 +52334,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51991,7 +52367,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -52011,8 +52387,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -52081,7 +52457,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -52109,12 +52485,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52158,7 +52534,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52241,7 +52617,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52254,7 +52630,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54694,11 +55070,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54858,7 +55230,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54979,7 +55351,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -55135,14 +55507,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55159,7 +55531,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55253,7 +55625,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55262,7 +55634,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55317,7 +55689,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55325,14 +55697,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55384,7 +55756,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, 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 @@ -55421,7 +55793,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55434,23 +55806,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55553,15 +55925,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55640,10 +56012,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55690,7 +56062,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55754,7 +56126,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55770,7 +56142,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55784,7 +56156,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55807,30 +56179,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55902,7 +56274,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55918,7 +56290,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55974,7 +56346,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -56049,7 +56421,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -56069,7 +56441,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -56104,7 +56476,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56161,7 +56533,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56189,7 +56561,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56403,7 +56775,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56443,7 +56815,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56454,7 +56826,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56466,7 +56838,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56566,12 +56938,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -56607,12 +56979,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -56731,9 +57103,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { 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)) - } + 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) @@ -56821,14 +57191,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -57156,7 +57525,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57231,7 +57600,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57399,12 +57768,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57475,12 +57849,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57519,7 +57893,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57545,7 +57919,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57573,7 +57947,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57620,7 +57994,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57645,7 +58019,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57666,11 +58040,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57699,7 +58070,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57795,7 +58170,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58219,7 +58594,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58342,7 +58717,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58352,10 +58727,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58396,10 +58773,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58829,13 +59206,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -59039,7 +59416,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -59117,7 +59494,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60511,7 +60927,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60525,10 +60941,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60541,8 +60957,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60550,12 +60966,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60581,10 +60997,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60595,14 +61009,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60632,27 +61048,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60661,9 +61077,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60671,15 +61087,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60710,8 +61126,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60833,8 +61249,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60855,9 +61271,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60870,13 +61286,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60887,11 +61303,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60913,12 +61329,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60933,14 +61349,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60948,9 +61388,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60960,15 +61400,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60978,22 +61418,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -61002,51 +61442,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -61055,18 +61495,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61278,7 +61718,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61515,6 +61955,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61739,6 +62180,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61884,7 +62326,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62411,7 +62857,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62429,8 +62877,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62498,6 +62945,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62521,7 +62970,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62544,7 +62995,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62557,7 +63008,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62577,7 +63030,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62717,7 +63172,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62725,7 +63180,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62776,11 +63231,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62792,13 +63247,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62808,10 +63263,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62875,7 +63330,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62885,7 +63340,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62894,7 +63349,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62935,19 +63390,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62955,7 +63410,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62967,7 +63422,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62979,7 +63434,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -63025,12 +63480,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -63040,11 +63495,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -63057,12 +63512,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -63073,7 +63528,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -63095,7 +63550,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -63143,14 +63598,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63178,7 +63633,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63218,18 +63673,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63313,11 +63768,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63330,17 +63785,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63535,7 +63990,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -63598,12 +64053,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63643,8 +64098,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63661,7 +64116,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63683,7 +64138,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63723,12 +64178,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63902,8 +64357,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63986,15 +64441,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -64022,7 +64477,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -64055,13 +64510,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64074,7 +64529,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64089,7 +64544,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -64145,8 +64600,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -64194,7 +64649,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -64214,7 +64669,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64262,8 +64717,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64305,11 +64760,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -64379,7 +64834,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64402,8 +64857,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64421,16 +64876,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64445,31 +64900,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64487,8 +64942,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64514,9 +64969,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64544,8 +64999,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -64582,7 +65037,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64606,7 +65061,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64687,19 +65142,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64708,7 +65163,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64722,13 +65177,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) 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 @@ -64846,11 +65301,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64884,7 +65339,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64893,10 +65348,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64914,9 +65369,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -65107,7 +65562,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65358,7 +65813,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -65372,7 +65827,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65385,7 +65840,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65427,7 +65882,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11397, 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)).FnChar-- @@ -65441,7 +65896,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65485,7 +65940,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65502,7 +65957,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+11272, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65658,7 +66113,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65715,7 +66170,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65762,9 +66217,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65847,7 +66302,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65869,15 +66324,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -66153,11 +66608,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66204,10 +66659,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66265,7 +66720,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66295,20 +66750,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -66324,13 +66779,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11600, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11614, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -66344,7 +66799,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66355,7 +66810,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -66408,7 +66863,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66425,7 +66880,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66491,13 +66946,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66544,7 +66999,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66575,14 +67030,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66590,7 +67045,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66701,7 +67156,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66714,7 +67169,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66728,7 +67183,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66760,7 +67215,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66935,7 +67390,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66961,11 +67416,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -67012,7 +67467,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -67036,7 +67491,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -67130,6 +67585,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67157,9 +67614,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67178,62 +67634,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67280,13 +67728,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67311,25 +67759,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67350,12 +67798,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67384,9 +67832,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67397,21 +67845,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67441,12 +67889,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67551,10 +67999,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -67710,11 +68158,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67731,7 +68179,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -67760,7 +68208,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67804,7 +68252,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67830,7 +68278,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67883,13 +68331,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67927,13 +68375,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -68093,9 +68541,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -68111,7 +68559,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -68139,9 +68587,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68157,9 +68605,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68190,12 +68638,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68210,7 +68658,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68245,8 +68693,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -68267,7 +68715,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68297,7 +68745,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68321,7 +68769,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68330,7 +68778,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68341,7 +68789,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68353,7 +68801,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -68387,7 +68835,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68395,13 +68843,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12390, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12397, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).Fn-- @@ -68438,7 +68886,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68602,10 +69050,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -68636,7 +69084,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68681,7 +69129,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68770,7 +69218,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68796,7 +69244,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68865,7 +69313,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68878,13 +69326,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68917,7 +69365,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -69038,13 +69486,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -69052,7 +69500,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = uint8('(') @@ -69086,16 +69534,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69234,8 +69682,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69362,7 +69810,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -69386,7 +69834,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -69485,7 +69933,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69502,10 +69950,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69524,11 +69972,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69562,7 +70010,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69587,11 +70035,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69653,7 +70101,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -69662,11 +70110,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69682,13 +70130,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69703,7 +70151,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69733,7 +70181,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69749,7 +70197,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69812,10 +70260,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69833,12 +70278,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69898,6 +70339,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69957,13 +70405,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -70004,10 +70452,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -70039,12 +70487,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -70072,11 +70520,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70154,9 +70602,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -70215,21 +70663,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70241,7 +70689,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70305,7 +70753,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -70317,7 +70765,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70402,7 +70850,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -70629,12 +71077,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70755,7 +71203,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -70774,7 +71222,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70800,26 +71248,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70833,7 +71281,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70845,10 +71293,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70860,7 +71308,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70889,7 +71337,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70910,9 +71358,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70951,7 +71399,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -71052,7 +71500,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -71066,6 +71514,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -71086,6 +71535,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -71267,7 +71717,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71319,8 +71769,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71366,12 +71816,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71379,7 +71829,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71393,7 +71843,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71554,7 +72004,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71569,7 +72019,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71580,9 +72030,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71608,9 +72058,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71691,6 +72141,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71698,7 +72149,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71744,7 +72195,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71879,6 +72330,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71890,11 +72342,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -71921,7 +72375,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71949,12 +72403,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -72123,7 +72577,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72159,9 +72613,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72186,7 +72640,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72201,7 +72655,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72219,7 +72673,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72505,7 +72959,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72601,7 +73055,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72706,7 +73160,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72720,7 +73174,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72799,7 +73253,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72926,7 +73380,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72960,7 +73414,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72983,26 +73437,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -73068,10 +73523,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -73084,19 +73555,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73323,17 +73796,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73346,10 +73821,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73358,15 +73833,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73375,98 +73850,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73474,138 +73949,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73708,7 +74188,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73938,7 +74418,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73997,7 +74477,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74301,7 +74781,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74491,7 +74971,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74604,13 +75084,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74633,7 +75127,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74643,7 +75137,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74696,7 +75190,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74736,13 +75230,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74750,7 +75244,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74779,13 +75273,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -75095,7 +75589,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -75107,7 +75601,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -75131,7 +75625,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75156,7 +75650,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75234,7 +75728,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75496,7 +75990,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75516,14 +76010,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75763,107 +76257,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15076}, - {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 + 15090}, - {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 + 15090}, - {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 + 15096}, - {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 + 15096}, - {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 + 15102}, - {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 + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {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 + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {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 + 15417}, - {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 + 15421}, - {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 + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15123}, + {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 + 15137}, + {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 + 15137}, + {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 + 15143}, + {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 + 15143}, + {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 + 15149}, + {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 + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {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 + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {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 + 15464}, + {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 + 15468}, + {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 + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75984,7 +76478,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+15549, + ts+15596, 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) @@ -76644,8 +77138,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76724,7 +77218,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -76827,7 +77321,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76935,6 +77429,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76975,13 +77490,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76993,21 +77507,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 } @@ -77078,7 +77582,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -77136,7 +77640,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77439,6 +77943,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77602,7 +78108,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -77627,7 +78133,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77776,7 +78282,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77786,7 +78292,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77838,7 +78344,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77846,7 +78352,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -78028,7 +78534,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -78043,137 +78562,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78185,64 +78704,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78250,7 +78773,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78553,7 +79080,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79644,13 +80171,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -80089,6 +80616,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80127,7 +80655,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -80136,7 +80664,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -80151,7 +80679,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80187,7 +80715,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80201,7 +80729,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80225,7 +80753,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80243,7 +80771,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80270,7 +80798,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80308,7 +80836,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80318,7 +80846,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80474,7 +81002,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80482,63 +81010,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, - ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80556,238 +81084,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80809,7 +81337,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80821,10 +81349,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80833,13 +81361,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80854,9 +81382,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80870,7 +81398,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80961,19 +81489,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80990,7 +81518,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -81037,13 +81565,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -81051,7 +81579,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -81076,8 +81604,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -81184,13 +81712,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81210,6 +81747,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81260,7 +81799,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81275,7 +81814,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81285,7 +81824,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81302,30 +81841,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81546,7 +82085,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81580,7 +82119,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -81589,36 +82128,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81656,7 +82195,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81737,21 +82276,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81793,15 +82332,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81838,14 +82377,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81864,17 +82403,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81885,7 +82424,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81897,12 +82436,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81939,11 +82478,11 @@ __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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81962,7 +82501,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81984,7 +82523,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -82038,7 +82577,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -82135,13 +82674,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -82206,20 +82745,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82252,29 +82791,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82340,7 +82879,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82350,7 +82889,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82387,12 +82926,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, 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)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82421,7 +82960,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82437,13 +82976,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82482,7 +83021,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -82501,13 +83040,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82523,7 +83062,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82558,7 +83097,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82566,7 +83105,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82639,20 +83178,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -82690,12 +83229,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -82712,8 +83251,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -82726,11 +83265,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82755,10 +83294,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82796,17 +83335,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82822,7 +83361,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82972,7 +83511,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82999,178 +83538,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83178,87 +83846,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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 __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83276,14 +83950,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83291,27 +83965,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83325,25 +83999,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83351,50 +84025,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83409,31 +84090,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83443,10 +84124,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83466,19 +84147,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83487,86 +84168,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83574,60 +84255,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83635,10 +84316,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83671,6 +84352,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83682,14 +84371,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83741,7 +84430,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83749,7 +84438,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83762,19 +84451,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83790,7 +84479,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83938,7 +84627,7 @@ __1: 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+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83954,13 +84643,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83969,7 +84658,7 @@ __3: 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+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -84037,33 +84726,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -84123,7 +84812,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -84155,13 +84844,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84194,16 +84883,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -84288,7 +84977,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84323,7 +85012,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84337,7 +85026,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84520,16 +85209,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84597,20 +85290,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -84622,8 +85315,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84632,7 +85325,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84643,7 +85336,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84663,7 +85356,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84679,100 +85372,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84785,7 +85482,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84884,7 +85581,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -85032,7 +85729,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85207,8 +85904,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85216,13 +85913,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85397,7 +86094,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85442,7 +86139,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85453,7 +86150,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85497,7 +86194,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85844,6 +86541,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -86019,7 +86719,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -86081,16 +86781,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -86100,7 +86800,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86306,8 +87006,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -86446,13 +87146,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86460,7 +87160,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86550,7 +87250,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86560,7 +87260,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -86576,7 +87276,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86863,7 +87563,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86954,7 +87654,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86974,7 +87674,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -87011,7 +87711,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -87045,11 +87745,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -87150,8 +87850,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87198,7 +87898,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87265,7 +87965,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -87327,7 +88027,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -87480,10 +88180,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87737,8 +88437,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87765,13 +88465,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87783,7 +88483,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87884,7 +88584,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87910,6 +88610,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87926,7 +88627,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87963,7 +88664,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87974,6 +88676,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87998,15 +88701,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88183,9 +88891,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88254,7 +88969,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88270,17 +88984,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88301,7 +89006,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -88313,6 +89017,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88468,6 +89183,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88491,8 +89207,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88668,8 +89384,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -88686,6 +89402,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88715,6 +89436,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88748,12 +89470,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88819,7 +89541,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88902,7 +89624,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -89031,7 +89753,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -89057,7 +89779,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -89073,7 +89795,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -89099,7 +89821,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -89110,9 +89832,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89139,9 +89861,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -89159,7 +89881,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89271,7 +89993,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89290,7 +90012,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -89298,7 +90020,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89399,7 +90121,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89414,7 +90136,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -89479,7 +90201,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89491,7 +90213,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89510,9 +90232,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89522,7 +90244,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89672,13 +90394,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89859,19 +90581,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89884,7 +90606,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -90042,7 +90764,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -90141,7 +90862,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90202,7 +90923,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90306,7 +91027,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90316,7 +91037,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -90348,7 +91069,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 5, 0x20) @@ -90406,8 +91127,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90441,7 +91165,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90534,16 +91258,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90552,13 +91281,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90570,52 +91299,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90633,111 +91362,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -90756,33 +91485,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -90790,28 +91519,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90822,7 +91551,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90833,7 +91562,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90859,7 +91588,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90872,27 +91601,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90900,49 +91629,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90956,45 +91685,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -91013,16 +91742,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -91053,16 +91782,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -91075,98 +91804,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -91175,79 +91904,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91322,7 +92051,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -91344,7 +92073,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91440,7 +92169,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91532,7 +92261,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91577,7 +92306,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91621,7 +92350,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -91639,7 +92368,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91651,7 +92380,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91666,7 +92395,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91678,22 +92407,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91702,7 +92431,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91731,9 +92460,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91851,7 +92580,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91884,7 +92613,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91909,13 +92638,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92171,7 +92900,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92210,9 +92939,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92224,7 +92953,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92338,12 +93067,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92457,7 +93186,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92508,7 +93237,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -92577,7 +93306,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92640,8 +93369,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92674,26 +93403,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92710,7 +93439,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92903,10 +93632,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92915,7 +93646,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93277,7 +94008,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -93309,7 +94040,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93319,7 +94050,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -94189,7 +94920,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94495,10 +95226,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+216)) + ts+20503, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -94589,7 +95320,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94621,7 +95352,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94758,23 +95489,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94785,7 +95518,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94794,7 +95527,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94813,7 +95546,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94833,20 +95566,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94891,7 +95626,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94900,7 +95635,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94911,7 +95646,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94922,7 +95657,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -95044,7 +95779,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -95086,7 +95821,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95243,7 +95978,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -95267,7 +96002,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95351,11 +96086,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95365,7 +96100,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95399,7 +96134,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -95426,7 +96161,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95464,9 +96199,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95476,7 +96211,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95488,12 +96223,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95546,17 +96281,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95605,10 +96340,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95628,8 +96363,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95642,7 +96377,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95684,7 +96419,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -96052,7 +96787,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -96095,7 +96830,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -96122,7 +96857,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96350,31 +97085,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -96383,35 +97100,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96428,29 +97145,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96491,11 +97208,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96505,43 +97222,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, 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+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96573,25 +97290,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96952,7 +97669,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -97005,104 +97722,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -97141,7 +97760,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -97161,6 +97780,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97311,12 +97932,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97335,13 +97956,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -97354,7 +97975,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -97416,7 +98037,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97563,6 +98184,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97905,13 +98528,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97919,104 +98549,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -98025,92 +98664,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -98120,24 +98753,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -98157,152 +98790,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98311,121 +98945,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98434,36 +99068,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98481,219 +99115,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98703,24 +99337,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98731,41 +99365,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98799,7 +99433,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98807,13 +99441,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -99092,7 +99726,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -99105,7 +99739,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -99129,11 +99763,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -99165,10 +99799,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99310,7 +99944,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99327,10 +99961,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99387,7 +100021,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99573,6 +100207,7 @@ __3: 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 @@ -99628,7 +100263,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99665,12 +100300,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99749,7 +100384,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99843,7 +100478,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -100037,7 +100672,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100216,7 +100851,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100286,6 +100921,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100312,10 +100950,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100335,14 +100973,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -100379,14 +101017,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100829,6 +101467,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100838,11 +101488,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100937,7 +101585,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -101008,7 +101656,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101242,7 +101890,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101304,11 +101952,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -101376,7 +102022,7 @@ __3: 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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -101498,9 +102144,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101568,7 +102214,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101917,9 +102563,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101943,7 +102592,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101959,32 +102609,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -102130,7 +102770,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102373,13 +103013,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -102390,7 +103027,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -102445,31 +103083,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -102672,6 +103312,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102803,6 +103501,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102817,6 +103518,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102847,7 +103551,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -103003,7 +103707,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103061,7 +103765,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103419,7 +104123,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103431,7 +104135,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103446,7 +104150,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103459,7 +104163,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103560,7 +104264,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103734,7 +104438,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103786,7 +104490,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103814,7 +104518,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103835,7 +104538,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103857,7 +104559,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103919,9 +104621,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103937,7 +104638,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103957,6 +104660,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -104053,8 +104761,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -104066,7 +104774,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -104081,7 +104789,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -104101,7 +104809,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -104109,7 +104817,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -104119,7 +104827,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -104127,7 +104835,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -104159,7 +104867,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104216,10 +104924,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -104263,16 +104971,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104305,7 +105013,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104317,9 +105025,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -104337,6 +105045,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104423,7 +105183,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -104480,7 +105240,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -104503,31 +105263,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104545,13 +105304,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104562,169 +105321,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104733,26 +105497,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104760,37 +105524,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104798,92 +105562,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104893,24 +105663,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104920,96 +105690,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -105017,30 +105787,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -105060,7 +105828,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105196,11 +105964,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105239,6 +106004,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -105411,7 +106186,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105544,7 +106319,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105634,17 +106409,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105690,7 +106465,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105734,12 +106509,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105762,7 +106537,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105932,7 +106707,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105969,7 +106743,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -106085,7 +106859,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106199,7 +106973,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106264,15 +107038,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106293,7 +107067,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106431,7 +107205,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106449,11 +107223,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106934,13 +107708,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107848,19 +108626,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107928,7 +108706,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -109025,7 +109803,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -110000,21 +110778,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110757,7 +111535,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110921,7 +111699,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111138,9 +111916,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -111419,19 +112197,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111810,9 +112588,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112580,7 +113358,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+2464)) break } } @@ -112601,9 +113379,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112616,7 +113394,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112776,7 +113554,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112789,11 +113567,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112806,9 +113584,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112923,36 +113701,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -113069,7 +113825,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113340,16 +114096,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113413,6 +114170,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113463,6 +114221,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113611,7 +114370,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -113641,7 +114400,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113656,7 +114415,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113752,7 +114511,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113763,8 +114522,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113774,13 +114533,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113847,23 +114606,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113881,35 +114640,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -114024,7 +114783,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -114074,7 +114833,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -114196,7 +114955,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114212,6 +114971,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114221,7 +114983,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114429,7 +115191,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114522,7 +115284,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114592,7 +115354,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114602,7 +115364,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114639,20 +115401,20 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint }() } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -114776,7 +115538,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+24041, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114821,10 +115583,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114929,7 +115691,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114940,17 +115702,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint64(4)) == 0) { goto __32 } @@ -114958,7 +115720,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114988,7 +115750,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114996,7 +115758,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -115036,7 +115798,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -115060,15 +115822,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -115183,7 +115945,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -115202,8 +115964,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -115214,10 +115976,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115231,7 +115993,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -115248,7 +116010,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115282,9 +116044,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23282 (*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) @@ -115389,7 +116151,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, func() uint8 { @@ -115507,21 +116269,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115632,7 +116394,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115679,14 +116441,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115756,6 +116518,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116332,7 +117097,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116365,7 +117130,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -116376,7 +117141,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -116450,7 +117215,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116545,7 +117310,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -116628,7 +117393,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116781,7 +117546,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)(unsafe.Pointer(ts + 24335 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -116807,7 +117572,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116836,7 +117601,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116894,19 +117659,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117451,17 +118216,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6690, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6695, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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)) @@ -117562,7 +118327,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117868,7 +118633,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+24396, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117883,7 +118648,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117937,7 +118702,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -118042,11 +118807,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -118087,7 +118852,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -118203,14 +118968,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118305,7 +119070,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118380,9 +119145,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118515,7 +119280,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118612,7 +119377,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118656,7 +119421,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118787,7 +119552,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118806,7 +119571,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118902,7 +119667,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118926,7 +119691,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -119042,7 +119807,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -119137,25 +119902,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -119174,8 +119939,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119435,11 +120200,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -119650,7 +120415,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120348,7 +121113,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120560,7 +121325,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121689,7 +122454,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121701,12 +122466,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121747,7 +122512,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121932,7 +122697,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121955,14 +122720,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -122003,7 +122768,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -122046,19 +122811,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -122087,7 +122852,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -122099,7 +122864,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122107,18 +122872,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122133,14 +122898,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -122169,7 +122934,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -122177,19 +122942,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122231,16 +122996,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -122265,7 +123030,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -122277,7 +123042,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122300,7 +123065,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122311,14 +123076,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122361,7 +123126,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -122378,7 +123143,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122396,7 +123161,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -122434,13 +123199,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122451,7 +123216,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122529,12 +123294,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122553,7 +123318,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122572,7 +123337,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122586,8 +123351,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -122602,23 +123367,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122642,7 +123407,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122662,7 +123427,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122679,14 +123444,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122694,7 +123459,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122723,14 +123488,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122752,12 +123517,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122766,12 +123531,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122785,8 +123550,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122794,7 +123559,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122809,7 +123574,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122817,7 +123582,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122827,7 +123592,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -123196,11 +123961,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -123220,19 +123985,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -124138,7 +124903,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -124147,7 +124912,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -124155,7 +124920,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -124166,7 +124931,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -124191,7 +124956,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124380,7 +125145,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124390,7 +125155,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124398,7 +125163,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124510,7 +125275,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124640,14 +125405,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124712,7 +125477,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124724,25 +125489,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124752,26 +125517,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124825,7 +125590,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124892,6 +125657,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -125150,7 +125917,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -125161,7 +125928,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -125174,7 +125941,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -125186,7 +125953,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125262,7 +126029,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+64) + ts+27816, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -125326,7 +126093,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+24891, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125347,16 +126114,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125454,7 +126221,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125472,7 +126239,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125490,7 +126257,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125508,7 +126275,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125531,7 +126298,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125577,7 +126344,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125592,7 +126359,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125632,7 +126399,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125642,18 +126409,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125665,18 +126432,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125690,7 +126457,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -125733,12 +126500,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125749,13 +126516,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125777,25 +126544,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125832,12 +126599,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125872,7 +126639,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125880,13 +126647,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125904,12 +126671,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125931,8 +126698,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125943,7 +126710,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125970,13 +126737,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125988,9 +126755,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -126000,37 +126767,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -126064,16 +126831,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -126081,7 +126848,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -126093,27 +126860,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -126122,7 +126889,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -126136,21 +126903,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -126185,19 +126952,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -126209,15 +126976,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -126232,12 +126999,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -126246,7 +127013,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126256,25 +127023,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126284,50 +127051,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126340,7 +127107,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126377,7 +127144,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -126482,7 +127249,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126502,24 +127269,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126535,7 +127302,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126543,31 +127310,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126592,8 +127359,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126602,52 +127369,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126655,14 +127422,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126675,35 +127442,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126766,12 +127533,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126798,7 +127565,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126830,7 +127597,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126900,28 +127667,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3272, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3286, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6367, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6381, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126954,11 +127721,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126970,16 +127737,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126995,37 +127762,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -127054,14 +127821,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127170,7 +127937,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -127187,23 +127954,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -127224,12 +127991,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127323,7 +128087,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127416,7 +128180,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127424,7 +128188,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127445,7 +128209,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127475,9 +128239,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127491,10 +128255,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127508,12 +128272,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127525,7 +128289,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127545,15 +128309,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127577,10 +128341,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127675,7 +128439,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127691,7 +128455,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127707,7 +128471,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127741,7 +128505,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127771,13 +128535,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127788,7 +128552,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127818,10 +128582,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127832,7 +128597,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127861,7 +128626,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127879,12 +128644,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127892,7 +128657,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+14479, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127903,19 +128668,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+64) + db, ts+32174, uintptr(0), uintptr(0), p+64) } } @@ -127969,7 +128734,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127996,7 +128761,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -128013,7 +128778,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -128026,13 +128791,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -128127,7 +128892,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128144,19 +128909,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128164,6 +128929,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -128182,7 +128969,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128477,7 +129264,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128502,7 +129289,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128547,7 +129334,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131358,7 +132145,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131400,7 +132187,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131461,7 +132248,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131535,13 +132322,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131603,7 +132390,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -131615,6 +132402,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131967,7 +132763,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -132135,45 +132931,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32843, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32760, bp+16) + sessionAppendStr(tls, bp, ts+32856, bp+16) 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+16) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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+32771, bp+16) + ts+32867, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -132220,42 +133016,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+16) + sessionAppendStr(tls, bp, ts+32942, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32695, bp+16) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+16) + sessionAppendStr(tls, bp, ts+32960, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32407, bp+16) + sessionAppendStr(tls, bp, ts+32503, bp+16) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -132268,7 +133064,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132279,21 +133075,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+16) + sessionAppendStr(tls, bp, ts+32973, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21375, bp+16) + sessionAppendStr(tls, bp, ts+21470, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+16) + sessionAppendStr(tls, bp, ts+14604, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32895, bp+16) + sessionAppendStr(tls, bp, ts+32991, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+16) + sessionAppendStr(tls, bp, ts+33002, bp+16) } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -132307,14 +133103,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33023) + ts+33119) } return rc } @@ -132342,7 +133138,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132595,7 +133391,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132611,7 +133407,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132684,10 +133480,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -132720,7 +133516,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132733,7 +133529,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -132746,19 +133542,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132809,14 +133605,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133330,7 +134126,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -134064,7 +134860,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134352,7 +135148,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134539,7 +135335,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134607,7 +135403,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134766,7 +135562,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134789,7 +135585,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -135113,13 +135909,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135530,7 +136326,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135670,7 +136466,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135697,14 +136493,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135715,7 +136511,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135728,7 +136524,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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))) @@ -135737,7 +136533,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135756,7 +136552,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135771,14 +136567,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135786,9 +136582,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135796,9 +136592,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -135806,21 +136602,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135867,15 +136663,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135892,13 +136688,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135936,8 +136732,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135969,7 +136765,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135978,13 +136774,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -136006,19 +136802,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -136062,18 +136858,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -136183,7 +136979,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -136193,7 +136989,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -136203,7 +136999,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -136216,7 +137012,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -136226,7 +137022,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -136242,7 +137038,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -136265,7 +137061,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136287,7 +137083,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -136301,7 +137097,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136399,7 +137195,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136412,20 +137208,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint64(3)) == 0 { tok = FTS5_AND } break @@ -138192,9 +138988,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -138210,7 +139006,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138297,7 +139093,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138378,7 +139174,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138548,12 +139344,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139496,7 +140292,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -139575,7 +140371,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139600,7 +140396,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -139623,7 +140419,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139862,7 +140658,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139935,13 +140731,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -141061,7 +141857,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142254,7 +143050,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142420,10 +143216,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -142451,7 +143247,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142527,7 +143323,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142570,7 +143366,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -142582,7 +143378,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -142702,7 +143498,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -143101,12 +143897,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -143117,7 +143913,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -143298,7 +144094,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -143422,7 +144218,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143431,7 +144227,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143463,8 +144259,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -143517,8 +144313,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -143588,7 +144384,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143604,13 +144400,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143863,7 +144659,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143977,7 +144773,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -144136,6 +144932,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -144143,7 +144943,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35242) 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)) @@ -144414,7 +145214,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144445,7 +145245,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } 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+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144460,7 +145260,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return uint8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144774,7 +145574,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144806,7 +145606,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144838,25 +145638,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144902,12 +145702,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144938,7 +145738,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144969,7 +145769,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -145001,14 +145801,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -145064,7 +145864,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -145107,7 +145907,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145281,7 +146081,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145402,7 +146202,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145426,28 +146226,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145505,7 +146305,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -145518,12 +146318,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -146153,7 +146953,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146397,7 +147197,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146416,7 +147216,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146463,7 +147263,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146472,7 +147272,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146486,7 +147286,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146510,7 +147310,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146528,13 +147328,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146589,17 +147389,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146666,7 +147466,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146701,18 +147501,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146724,7 +147524,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146736,14 +147536,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146755,17 +147555,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146802,27 +147602,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -147028,12 +147828,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -147041,7 +147841,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -147217,7 +148017,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147399,14 +148199,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+48) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+56) + rc = fts5StorageCount(tls, p, ts+34338, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147601,9 +148401,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147818,7 +148618,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147830,7 +148630,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147841,18 +148641,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -148128,7 +148928,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148270,7 +149070,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148278,11 +149078,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148290,7 +149090,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148298,7 +149098,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148306,11 +149106,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148318,19 +149118,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148338,11 +149138,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148350,7 +149150,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148358,11 +149158,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148370,7 +149170,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148378,7 +149178,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148386,7 +149186,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148402,24 +149202,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148434,137 +149234,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 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+37079, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36891, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36998, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148579,16 +149379,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148596,21 +149396,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148618,7 +149418,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148626,9 +149426,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148643,12 +149443,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148657,7 +149457,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148813,7 +149613,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37222) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148993,22 +149793,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -150151,14 +150951,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -150184,19 +150984,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -150329,11 +151129,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -150357,7 +151157,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150641,7 +151441,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150752,7 +151552,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150774,7 +151574,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151318,7 +152118,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -151628,16 +152428,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -151694,12 +152494,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -151714,6 +152514,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -151735,5 +152536,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 index f119e601e1..299da00542 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.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_riscv64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_riscv64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1021,7 +1020,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1034,49 +1033,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1085,21 +1084,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1111,8 +1110,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1124,22 +1123,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1147,13 +1146,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1168,13 +1167,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1717,7 +1716,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1813,6 +1812,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1948,6 +1948,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1977,6 +1978,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2078,6 +2080,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2151,7 +2155,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2258,8 +2262,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2765,6 +2769,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3819,7 +3824,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4150,6 +4164,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4160,6 +4175,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6077,6 +6110,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6116,6 +6160,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6166,7 +6211,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6181,6 +6226,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6549,8 +6595,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6567,7 +6612,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6829,8 +6873,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7175,17 +7219,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7215,7 +7248,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7224,49 +7264,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7368,7 +7409,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7416,10 +7456,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7431,10 +7471,6 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), @@ -7444,21 +7480,13 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]uint8{ - uint8(0), - uint8(SQLITE_BLOB), - uint8(SQLITE_INTEGER), - uint8(SQLITE_INTEGER), - uint8(SQLITE_FLOAT), - uint8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7757,7 +7785,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7894,6 +7922,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7917,6 +7947,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7931,9 +7962,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8180,7 +8214,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8206,13 +8240,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, 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+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8288,7 +8322,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*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)) + *(*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)+0.5) 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) @@ -8310,7 +8344,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8367,7 +8401,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8500,7 +8534,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8524,12 +8558,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8541,7 +8575,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(z))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8563,7 +8597,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8577,7 +8611,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8585,7 +8619,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8597,7 +8631,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8631,9 +8665,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -8652,7 +8686,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8666,14 +8700,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*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+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8999,7 +9033,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -9009,13 +9043,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -9033,41 +9067,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -9080,7 +9114,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9130,15 +9164,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9289,7 +9323,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9553,7 +9587,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9586,7 +9620,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9997,7 +10031,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -10033,7 +10067,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -10053,7 +10087,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10102,24 +10136,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10435,7 +10496,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10508,8 +10569,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10721,7 +10782,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11278,7 +11339,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11338,7 +11399,7 @@ __138: } bufpt = bp + 16 *(*uint8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11679,7 +11740,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11803,9 +11864,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11953,7 +12014,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11970,10 +12031,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -12028,7 +12089,7 @@ __4: __5: } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12193,7 +12254,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12425,20 +12486,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12451,46 +12618,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]uint8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13801,7 +13968,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 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 } @@ -14347,7 +14514,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14366,13 +14533,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14385,7 +14552,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14858,193 +15025,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15416,35 +15583,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15537,11 +15704,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15620,13 +15790,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15634,7 +15804,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15655,7 +15825,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15757,19 +15927,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, 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+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, 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+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16132,7 +16302,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16405,7 +16575,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16423,7 +16593,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16440,14 +16610,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16467,7 +16637,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16522,7 +16692,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16535,7 +16705,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16603,7 +16773,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16762,7 +16932,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16790,7 +16960,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16853,7 +17023,7 @@ __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+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16874,7 +17044,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0400000, @@ -16889,7 +17059,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -17015,11 +17185,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 128)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+128) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+128) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -17065,7 +17235,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17266,7 +17436,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17282,7 +17452,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } 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 + 3417 + zErr = ts + 3431 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)) @@ -17296,7 +17466,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17411,10 +17581,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -17430,7 +17600,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17443,7 +17613,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17451,7 +17621,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17464,15 +17634,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17517,7 +17687,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { 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+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17602,7 +17772,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17650,10 +17820,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17767,7 +17937,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17858,7 +18028,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17866,9 +18036,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17935,18 +18105,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+128, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([4098]uint8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*uint8)(unsafe.Pointer(bp + 128 + uintptr(got))) = uint8(0) @@ -17986,14 +18156,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4104)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4104, bp) } appendAllPathElements(tls, bp+4104, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4104)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+4104)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4104)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4104)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -18051,7 +18221,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -18079,11 +18249,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -18094,7 +18264,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18171,10 +18341,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18229,7 +18399,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18396,40 +18566,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18440,7 +18655,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18496,7 +18711,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18572,7 +18787,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18693,7 +18908,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18766,7 +18981,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18829,6 +19044,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19512,6 +19732,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19544,6 +19765,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21974,7 +22196,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23111,7 +23333,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23172,7 +23394,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23185,7 +23407,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23237,9 +23459,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23503,7 +23725,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23627,7 +23849,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23666,7 +23888,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23743,7 +23965,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23870,6 +24092,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24743,7 +24966,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24928,7 +25151,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25500,7 +25723,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25599,7 +25822,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25767,7 +25990,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26185,7 +26408,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26330,7 +26553,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26460,7 +26683,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26933,7 +27156,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27438,7 +27661,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27829,7 +28052,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -28094,7 +28317,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28231,7 +28454,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28248,7 +28471,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28256,7 +28479,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28299,7 +28522,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28309,7 +28532,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28559,7 +28782,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28591,8 +28814,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28607,7 +28829,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28617,7 +28839,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28630,7 +28852,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28639,14 +28861,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -28656,7 +28878,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28703,63 +28925,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28791,10 +29007,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28805,15 +29020,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28838,7 +29053,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28849,7 +29064,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28897,26 +29112,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28926,7 +29141,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28934,7 +29149,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28942,10 +29157,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -29014,7 +29229,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -29044,11 +29259,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -29059,15 +29274,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -29095,14 +29310,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29116,7 +29331,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29128,7 +29343,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29231,7 +29446,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29259,7 +29474,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29298,7 +29513,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29322,7 +29537,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -29371,7 +29586,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt 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+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30143,7 +30358,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -30181,7 +30396,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30596,7 +30811,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30622,7 +30837,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30630,6 +30845,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30639,7 +30857,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30655,7 +30873,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30716,7 +30934,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30751,7 +30969,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30811,7 +31029,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30850,7 +31068,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30881,7 +31099,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31222,7 +31440,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31466,14 +31684,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31518,7 +31736,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31567,7 +31785,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31646,10 +31864,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31657,7 +31873,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31719,7 +31936,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31739,7 +31956,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31759,7 +31976,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31971,7 +32188,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32175,7 +32392,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32240,7 +32457,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32288,7 +32505,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32407,7 +32624,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32567,7 +32784,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32632,7 +32849,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -32668,7 +32885,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32712,7 +32929,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32824,7 +33041,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32982,7 +33199,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -33039,7 +33256,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -33055,7 +33272,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33129,7 +33346,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33141,7 +33358,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -33152,7 +33369,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33317,7 +33534,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33589,12 +33806,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33602,7 +33819,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -33662,7 +33879,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33751,7 +33968,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33867,7 +34084,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -34185,7 +34402,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34196,7 +34413,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34354,7 +34571,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34428,7 +34645,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34490,7 +34707,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34518,7 +34735,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34779,7 +34996,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34971,7 +35188,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -35008,6 +35225,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -35098,7 +35317,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35121,7 +35340,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35201,7 +35420,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35314,7 +35533,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -35375,7 +35594,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35413,13 +35632,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -35526,7 +35745,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35549,7 +35768,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35650,7 +35869,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35658,11 +35877,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35737,7 +35956,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35806,7 +36025,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35835,7 +36054,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35911,7 +36130,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35925,7 +36144,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -36059,7 +36278,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36247,7 +36466,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4062, 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)) @@ -36272,11 +36491,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -36297,13 +36516,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36322,7 +36541,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36333,7 +36552,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36356,12 +36575,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36468,13 +36687,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36485,7 +36704,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36493,14 +36712,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36517,7 +36736,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36542,7 +36761,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36555,7 +36774,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36571,7 +36790,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36609,7 +36828,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36682,7 +36901,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36699,7 +36918,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36819,7 +37038,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36855,7 +37074,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36865,7 +37084,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36912,13 +37131,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37153,6 +37372,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37166,8 +37394,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37175,7 +37403,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37186,7 +37414,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37201,7 +37429,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37221,7 +37449,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37670,7 +37898,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -38087,6 +38315,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -38102,7 +38343,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38162,6 +38403,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38244,7 +38488,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38476,7 +38720,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38708,7 +38952,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38770,7 +39014,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38811,7 +39055,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38830,7 +39074,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39134,7 +39378,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39149,14 +39393,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39215,6 +39459,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39239,10 +39486,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39280,21 +39527,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39643,85 +39898,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39821,6 +40108,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39848,7 +40145,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39856,12 +40153,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39880,7 +40177,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39931,7 +40230,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -40060,8 +40359,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -40072,10 +40371,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -40086,6 +40381,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -40101,34 +40401,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40136,7 +40436,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40144,32 +40444,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40179,13 +40479,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40193,7 +40493,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40204,20 +40504,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40242,7 +40542,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40344,7 +40644,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40693,8 +40993,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40903,7 +41203,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40911,16 +41211,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -41066,7 +41366,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41346,7 +41646,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41356,14 +41656,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41374,16 +41676,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41400,7 +41698,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41951,16 +42249,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41978,7 +42280,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -42008,7 +42314,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -42042,7 +42348,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -42065,7 +42371,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -42087,7 +42393,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42231,7 +42544,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42402,7 +42715,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42428,7 +42741,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42471,7 +42784,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -42539,13 +42852,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42576,7 +42889,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42631,7 +42944,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42650,7 +42963,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42660,7 +42973,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42702,14 +43015,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42931,6 +43245,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43142,7 +43460,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43333,7 +43651,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43408,7 +43726,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43837,35 +44155,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43880,7 +44197,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43912,7 +44229,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43927,7 +44244,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43938,7 +44255,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43948,7 +44265,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44034,7 +44351,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44178,7 +44495,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44196,8 +44513,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -44261,7 +44581,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44405,7 +44725,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44577,7 +44897,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -44613,11 +44933,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44632,21 +44952,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, 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+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44702,7 +45022,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44806,12 +45127,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44863,11 +45183,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44905,7 +45225,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44934,11 +45253,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -45008,42 +45330,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -45051,52 +45374,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -45138,19 +45461,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45159,7 +45482,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45167,11 +45490,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45407,7 +45730,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45902,20 +46225,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46305,14 +46628,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46390,72 +46713,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46472,10 +46803,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -46487,33 +46818,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46522,43 +46853,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46574,26 +46905,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46601,12 +46932,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46621,17 +46952,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46646,163 +46977,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46811,20 +47142,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46834,15 +47165,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46850,9 +47181,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46864,52 +47195,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46918,24 +47249,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46949,13 +47280,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46964,38 +47295,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47004,10 +47335,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -47015,10 +47346,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -47026,35 +47357,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -47062,372 +47431,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47435,15 +47805,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47452,124 +47822,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47579,40 +47949,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47630,339 +48000,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47971,20 +48341,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47995,244 +48365,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48241,172 +48611,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48426,36 +48796,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48463,22 +48833,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48489,24 +48859,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -48514,30 +48884,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48553,10 +48923,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48565,10 +48935,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -48588,83 +48958,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48673,31 +49043,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48705,10 +49075,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48729,105 +49099,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48839,231 +49209,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -49073,85 +49445,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49159,59 +49531,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49226,121 +49598,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -49348,93 +49720,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49447,7 +49819,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -49462,81 +49834,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49546,38 +49918,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49585,205 +49957,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49793,90 +50165,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49885,36 +50257,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49925,88 +50297,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -50018,35 +50390,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -50055,63 +50427,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -50120,13 +50492,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -50134,20 +50506,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50157,45 +50529,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50208,10 +50580,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -50222,10 +50594,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50233,30 +50605,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -50266,36 +50638,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50303,10 +50675,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50338,22 +50710,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50363,15 +50735,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50381,17 +50753,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -50401,34 +50773,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50437,48 +50809,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -50486,10 +50858,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50511,24 +50883,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50560,78 +50932,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50639,11 +51011,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50659,14 +51031,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -50674,16 +51046,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50691,16 +51063,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50711,10 +51083,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -50737,73 +51109,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50813,22 +51185,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50841,32 +51213,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50878,70 +51250,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50949,17 +51321,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50969,10 +51341,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50986,10 +51358,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50999,69 +51371,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -51069,16 +51441,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -51091,17 +51463,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -51111,24 +51483,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -51136,52 +51508,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51190,54 +51562,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -51245,69 +51617,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51319,27 +51691,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51347,42 +51719,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51391,41 +51763,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51439,16 +51811,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51460,25 +51832,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51487,24 +51859,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51529,16 +51901,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -51553,66 +51925,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -51633,73 +52005,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51707,13 +52079,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51724,10 +52096,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51776,16 +52152,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51805,10 +52181,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51818,8 +52194,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51839,7 +52215,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51859,8 +52235,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51868,21 +52244,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51891,8 +52267,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51925,8 +52301,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51953,7 +52329,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51986,7 +52362,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -52006,8 +52382,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -52076,7 +52452,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -52104,12 +52480,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52153,7 +52529,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52236,7 +52612,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52249,7 +52625,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54689,11 +55065,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54853,7 +55225,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54974,7 +55346,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -55130,14 +55502,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55154,7 +55526,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55248,7 +55620,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55257,7 +55629,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55312,7 +55684,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55320,14 +55692,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55379,7 +55751,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, 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 @@ -55416,7 +55788,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55429,23 +55801,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55548,15 +55920,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55635,10 +56007,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55685,7 +56057,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55749,7 +56121,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55765,7 +56137,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55779,7 +56151,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55802,30 +56174,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55897,7 +56269,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55913,7 +56285,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55969,7 +56341,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -56044,7 +56416,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -56064,7 +56436,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -56099,7 +56471,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56156,7 +56528,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56184,7 +56556,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56398,7 +56770,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56438,7 +56810,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56449,7 +56821,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56461,7 +56833,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56561,12 +56933,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -56602,12 +56974,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -56726,9 +57098,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { 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)) - } + 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) @@ -56816,14 +57186,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -57151,7 +57520,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57226,7 +57595,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57394,12 +57763,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57470,12 +57844,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57514,7 +57888,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57540,7 +57914,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57568,7 +57942,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57615,7 +57989,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57640,7 +58014,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57661,11 +58035,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57694,7 +58065,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57790,7 +58165,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58214,7 +58589,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58337,7 +58712,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58347,10 +58722,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58391,10 +58768,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58824,13 +59201,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -59034,7 +59411,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -59112,7 +59489,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60506,7 +60922,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60520,10 +60936,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60536,8 +60952,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60545,12 +60961,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60576,10 +60992,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60590,14 +61004,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60627,27 +61043,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60656,9 +61072,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60666,15 +61082,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60705,8 +61121,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60828,8 +61244,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60850,9 +61266,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60865,13 +61281,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60882,11 +61298,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60908,12 +61324,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60928,14 +61344,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60943,9 +61383,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60955,15 +61395,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60973,22 +61413,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60997,51 +61437,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -61050,18 +61490,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61273,7 +61713,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61510,6 +61950,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61734,6 +62175,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61879,7 +62321,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62406,7 +62852,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62424,8 +62872,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62493,6 +62940,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62516,7 +62965,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62539,7 +62990,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62552,7 +63003,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62572,7 +63025,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62712,7 +63167,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62720,7 +63175,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62771,11 +63226,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62787,13 +63242,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62803,10 +63258,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62870,7 +63325,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62880,7 +63335,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62889,7 +63344,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62930,19 +63385,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62950,7 +63405,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62962,7 +63417,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62974,7 +63429,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -63020,12 +63475,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -63035,11 +63490,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -63052,12 +63507,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -63068,7 +63523,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -63090,7 +63545,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -63138,14 +63593,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63173,7 +63628,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63213,18 +63668,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63308,11 +63763,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63325,17 +63780,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63530,7 +63985,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -63593,12 +64048,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63638,8 +64093,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63656,7 +64111,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63678,7 +64133,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63718,12 +64173,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63897,8 +64352,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63981,15 +64436,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -64017,7 +64472,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -64050,13 +64505,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64069,7 +64524,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64084,7 +64539,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -64140,8 +64595,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -64189,7 +64644,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -64209,7 +64664,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64257,8 +64712,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64300,11 +64755,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -64374,7 +64829,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64397,8 +64852,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64416,16 +64871,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64440,31 +64895,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64482,8 +64937,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64509,9 +64964,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64539,8 +64994,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -64577,7 +65032,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64601,7 +65056,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64682,19 +65137,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64703,7 +65158,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64717,13 +65172,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) 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 @@ -64841,11 +65296,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64879,7 +65334,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64888,10 +65343,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64909,9 +65364,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -65102,7 +65557,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65353,7 +65808,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -65367,7 +65822,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65380,7 +65835,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65422,7 +65877,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11397, 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)).FnChar-- @@ -65436,7 +65891,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65480,7 +65935,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65497,7 +65952,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+11272, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65653,7 +66108,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65710,7 +66165,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65757,9 +66212,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65842,7 +66297,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65864,15 +66319,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -66148,11 +66603,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66199,10 +66654,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66260,7 +66715,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66290,20 +66745,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -66319,13 +66774,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11600, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11614, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -66339,7 +66794,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66350,7 +66805,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -66403,7 +66858,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66420,7 +66875,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66486,13 +66941,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66539,7 +66994,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66570,14 +67025,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66585,7 +67040,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66696,7 +67151,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66709,7 +67164,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66723,7 +67178,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66755,7 +67210,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66930,7 +67385,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66956,11 +67411,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -67007,7 +67462,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -67031,7 +67486,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -67125,6 +67580,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67152,9 +67609,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67173,62 +67629,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67275,13 +67723,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67306,25 +67754,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67345,12 +67793,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67379,9 +67827,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67392,21 +67840,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67436,12 +67884,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67546,10 +67994,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -67705,11 +68153,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67726,7 +68174,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -67755,7 +68203,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67799,7 +68247,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67825,7 +68273,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67878,13 +68326,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67922,13 +68370,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -68088,9 +68536,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -68106,7 +68554,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -68134,9 +68582,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68152,9 +68600,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68185,12 +68633,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68205,7 +68653,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68240,8 +68688,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -68262,7 +68710,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68292,7 +68740,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68316,7 +68764,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68325,7 +68773,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68336,7 +68784,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68348,7 +68796,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -68382,7 +68830,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68390,13 +68838,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12390, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12397, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).Fn-- @@ -68433,7 +68881,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68597,10 +69045,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -68631,7 +69079,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68676,7 +69124,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68765,7 +69213,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68791,7 +69239,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68860,7 +69308,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68873,13 +69321,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68912,7 +69360,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -69033,13 +69481,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -69047,7 +69495,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = uint8('(') @@ -69081,16 +69529,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69229,8 +69677,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69357,7 +69805,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -69381,7 +69829,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -69480,7 +69928,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69497,10 +69945,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69519,11 +69967,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69557,7 +70005,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69582,11 +70030,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69648,7 +70096,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -69657,11 +70105,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69677,13 +70125,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69698,7 +70146,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69728,7 +70176,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69744,7 +70192,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69807,10 +70255,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69828,12 +70273,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69893,6 +70334,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69952,13 +70400,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -69999,10 +70447,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -70034,12 +70482,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -70067,11 +70515,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70149,9 +70597,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -70210,21 +70658,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70236,7 +70684,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70300,7 +70748,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -70312,7 +70760,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70397,7 +70845,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -70624,12 +71072,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70750,7 +71198,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -70769,7 +71217,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70795,26 +71243,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70828,7 +71276,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70840,10 +71288,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70855,7 +71303,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70884,7 +71332,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70905,9 +71353,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70946,7 +71394,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -71047,7 +71495,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -71061,6 +71509,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -71081,6 +71530,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -71262,7 +71712,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71314,8 +71764,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71361,12 +71811,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71374,7 +71824,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71388,7 +71838,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71549,7 +71999,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71564,7 +72014,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71575,9 +72025,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71603,9 +72053,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71686,6 +72136,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71693,7 +72144,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71739,7 +72190,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71874,6 +72325,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71885,11 +72337,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -71916,7 +72370,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71944,12 +72398,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -72118,7 +72572,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72154,9 +72608,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72181,7 +72635,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72196,7 +72650,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72214,7 +72668,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72500,7 +72954,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72596,7 +73050,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72701,7 +73155,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72715,7 +73169,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72794,7 +73248,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72921,7 +73375,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72955,7 +73409,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72978,26 +73432,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -73063,10 +73518,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -73079,19 +73550,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73318,17 +73791,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73341,10 +73816,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73353,15 +73828,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73370,98 +73845,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73469,138 +73944,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73703,7 +74183,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73933,7 +74413,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73992,7 +74472,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74296,7 +74776,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74486,7 +74966,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74599,13 +75079,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74628,7 +75122,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74638,7 +75132,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74691,7 +75185,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74731,13 +75225,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74745,7 +75239,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74774,13 +75268,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -75090,7 +75584,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -75102,7 +75596,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -75126,7 +75620,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75151,7 +75645,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75229,7 +75723,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75491,7 +75985,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75511,14 +76005,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75758,107 +76252,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15076}, - {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 + 15090}, - {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 + 15090}, - {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 + 15096}, - {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 + 15096}, - {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 + 15102}, - {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 + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {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 + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {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 + 15417}, - {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 + 15421}, - {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 + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15123}, + {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 + 15137}, + {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 + 15137}, + {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 + 15143}, + {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 + 15143}, + {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 + 15149}, + {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 + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {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 + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {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 + 15464}, + {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 + 15468}, + {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 + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75979,7 +76473,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+15549, + ts+15596, 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) @@ -76639,8 +77133,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76719,7 +77213,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -76822,7 +77316,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76930,6 +77424,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76970,13 +77485,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76988,21 +77502,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 } @@ -77073,7 +77577,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -77131,7 +77635,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77434,6 +77938,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77597,7 +78103,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -77622,7 +78128,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77771,7 +78277,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77781,7 +78287,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77833,7 +78339,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77841,7 +78347,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -78023,7 +78529,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -78038,137 +78557,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78180,64 +78699,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78245,7 +78768,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78548,7 +79075,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79639,13 +80166,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -80084,6 +80611,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80122,7 +80650,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -80131,7 +80659,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -80146,7 +80674,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80182,7 +80710,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80196,7 +80724,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80220,7 +80748,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80238,7 +80766,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80265,7 +80793,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80303,7 +80831,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80313,7 +80841,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80469,7 +80997,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80477,63 +81005,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, - ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80551,238 +81079,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80804,7 +81332,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80816,10 +81344,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80828,13 +81356,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80849,9 +81377,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80865,7 +81393,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80956,19 +81484,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80985,7 +81513,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -81032,13 +81560,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -81046,7 +81574,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -81071,8 +81599,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -81179,13 +81707,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81205,6 +81742,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81255,7 +81794,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81270,7 +81809,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81280,7 +81819,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81297,30 +81836,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81541,7 +82080,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81575,7 +82114,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -81584,36 +82123,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81651,7 +82190,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81732,21 +82271,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81788,15 +82327,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81833,14 +82372,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81859,17 +82398,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81880,7 +82419,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81892,12 +82431,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81934,11 +82473,11 @@ __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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81957,7 +82496,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81979,7 +82518,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -82033,7 +82572,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -82130,13 +82669,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -82201,20 +82740,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82247,29 +82786,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82335,7 +82874,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82345,7 +82884,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82382,12 +82921,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, 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)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82416,7 +82955,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82432,13 +82971,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82477,7 +83016,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -82496,13 +83035,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82518,7 +83057,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82553,7 +83092,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82561,7 +83100,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82634,20 +83173,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -82685,12 +83224,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -82707,8 +83246,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -82721,11 +83260,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82750,10 +83289,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82791,17 +83330,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82817,7 +83356,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82967,7 +83506,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82994,178 +83533,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83173,87 +83841,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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 __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83271,14 +83945,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83286,27 +83960,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83320,25 +83994,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83346,50 +84020,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83404,31 +84085,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83438,10 +84119,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83461,19 +84142,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83482,86 +84163,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83569,60 +84250,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83630,10 +84311,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83666,6 +84347,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83677,14 +84366,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83736,7 +84425,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83744,7 +84433,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83757,19 +84446,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83785,7 +84474,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83933,7 +84622,7 @@ __1: 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+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83949,13 +84638,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83964,7 +84653,7 @@ __3: 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+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -84032,33 +84721,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -84118,7 +84807,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -84150,13 +84839,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84189,16 +84878,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -84283,7 +84972,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84318,7 +85007,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84332,7 +85021,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84515,16 +85204,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84592,20 +85285,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -84617,8 +85310,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84627,7 +85320,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84638,7 +85331,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84658,7 +85351,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84674,100 +85367,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84780,7 +85477,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84879,7 +85576,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -85027,7 +85724,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85202,8 +85899,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85211,13 +85908,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85392,7 +86089,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85437,7 +86134,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85448,7 +86145,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85492,7 +86189,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85839,6 +86536,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -86014,7 +86714,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -86076,16 +86776,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -86095,7 +86795,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86301,8 +87001,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -86441,13 +87141,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86455,7 +87155,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86545,7 +87245,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86555,7 +87255,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -86571,7 +87271,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86858,7 +87558,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86949,7 +87649,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86969,7 +87669,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -87006,7 +87706,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -87040,11 +87740,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -87145,8 +87845,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87193,7 +87893,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87260,7 +87960,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -87322,7 +88022,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -87475,10 +88175,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87732,8 +88432,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87760,13 +88460,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87778,7 +88478,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87879,7 +88579,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87905,6 +88605,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87921,7 +88622,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87958,7 +88659,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87969,6 +88671,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87993,15 +88696,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88178,9 +88886,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88249,7 +88964,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88265,17 +88979,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88296,7 +89001,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -88308,6 +89012,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88463,6 +89178,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88486,8 +89202,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88663,8 +89379,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -88681,6 +89397,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88710,6 +89431,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88743,12 +89465,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88814,7 +89536,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88897,7 +89619,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -89026,7 +89748,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -89052,7 +89774,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -89068,7 +89790,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -89094,7 +89816,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -89105,9 +89827,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89134,9 +89856,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -89154,7 +89876,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89266,7 +89988,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89285,7 +90007,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -89293,7 +90015,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89394,7 +90116,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89409,7 +90131,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -89474,7 +90196,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89486,7 +90208,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89505,9 +90227,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89517,7 +90239,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89667,13 +90389,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89854,19 +90576,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89879,7 +90601,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -90037,7 +90759,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -90136,7 +90857,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90197,7 +90918,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90301,7 +91022,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90311,7 +91032,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -90343,7 +91064,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 5, 0x20) @@ -90401,8 +91122,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90436,7 +91160,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90529,16 +91253,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90547,13 +91276,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90565,52 +91294,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90628,111 +91357,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -90751,33 +91480,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -90785,28 +91514,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90817,7 +91546,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90828,7 +91557,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90854,7 +91583,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90867,27 +91596,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90895,49 +91624,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90951,45 +91680,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -91008,16 +91737,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -91048,16 +91777,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -91070,98 +91799,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -91170,79 +91899,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91317,7 +92046,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -91339,7 +92068,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91435,7 +92164,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91527,7 +92256,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91572,7 +92301,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91616,7 +92345,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -91634,7 +92363,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91646,7 +92375,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91661,7 +92390,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91673,22 +92402,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91697,7 +92426,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91726,9 +92455,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91846,7 +92575,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91879,7 +92608,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91904,13 +92633,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92166,7 +92895,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92205,9 +92934,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92219,7 +92948,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92333,12 +93062,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92452,7 +93181,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92503,7 +93232,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -92572,7 +93301,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92635,8 +93364,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92669,26 +93398,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92705,7 +93434,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92898,10 +93627,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92910,7 +93641,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93272,7 +94003,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -93304,7 +94035,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93314,7 +94045,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -94184,7 +94915,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94490,10 +95221,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+216)) + ts+20503, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -94584,7 +95315,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94616,7 +95347,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94753,23 +95484,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94780,7 +95513,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94789,7 +95522,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94808,7 +95541,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94828,20 +95561,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94886,7 +95621,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94895,7 +95630,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94906,7 +95641,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94917,7 +95652,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -95039,7 +95774,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -95081,7 +95816,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95238,7 +95973,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -95262,7 +95997,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95346,11 +96081,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95360,7 +96095,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95394,7 +96129,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -95421,7 +96156,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95459,9 +96194,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95471,7 +96206,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95483,12 +96218,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95541,17 +96276,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95600,10 +96335,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95623,8 +96358,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95637,7 +96372,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95679,7 +96414,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -96047,7 +96782,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -96090,7 +96825,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -96117,7 +96852,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96345,31 +97080,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -96378,35 +97095,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96423,29 +97140,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96486,11 +97203,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96500,43 +97217,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, 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+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96568,25 +97285,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96947,7 +97664,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -97000,104 +97717,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -97136,7 +97755,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -97156,6 +97775,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97306,12 +97927,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97330,13 +97951,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -97349,7 +97970,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -97411,7 +98032,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97558,6 +98179,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97900,13 +98523,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97914,104 +98544,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -98020,92 +98659,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -98115,24 +98748,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -98152,152 +98785,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98306,121 +98940,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98429,36 +99063,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98476,219 +99110,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98698,24 +99332,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98726,41 +99360,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98794,7 +99428,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98802,13 +99436,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -99087,7 +99721,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -99100,7 +99734,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -99124,11 +99758,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -99160,10 +99794,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99305,7 +99939,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99322,10 +99956,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99382,7 +100016,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99568,6 +100202,7 @@ __3: 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 @@ -99623,7 +100258,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99660,12 +100295,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99744,7 +100379,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99838,7 +100473,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -100032,7 +100667,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100211,7 +100846,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100281,6 +100916,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100307,10 +100945,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100330,14 +100968,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -100374,14 +101012,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100824,6 +101462,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100833,11 +101483,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100932,7 +101580,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -101003,7 +101651,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101237,7 +101885,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101299,11 +101947,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -101371,7 +102017,7 @@ __3: 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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -101493,9 +102139,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101563,7 +102209,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101912,9 +102558,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101938,7 +102587,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101954,32 +102604,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -102125,7 +102765,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102368,13 +103008,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -102385,7 +103022,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -102440,31 +103078,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -102667,6 +103307,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102798,6 +103496,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102812,6 +103513,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102842,7 +103546,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -102998,7 +103702,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103056,7 +103760,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103414,7 +104118,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103426,7 +104130,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103441,7 +104145,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103454,7 +104158,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103555,7 +104259,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103729,7 +104433,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103781,7 +104485,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103809,7 +104513,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103830,7 +104533,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103852,7 +104554,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103914,9 +104616,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103932,7 +104633,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103952,6 +104655,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -104048,8 +104756,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -104061,7 +104769,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -104076,7 +104784,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -104096,7 +104804,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -104104,7 +104812,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -104114,7 +104822,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -104122,7 +104830,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -104154,7 +104862,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104211,10 +104919,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -104258,16 +104966,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104300,7 +105008,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104312,9 +105020,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -104332,6 +105040,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104418,7 +105178,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -104475,7 +105235,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -104498,31 +105258,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104540,13 +105299,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104557,169 +105316,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104728,26 +105492,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104755,37 +105519,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104793,92 +105557,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104888,24 +105658,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104915,96 +105685,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -105012,30 +105782,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -105055,7 +105823,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105191,11 +105959,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105234,6 +105999,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -105406,7 +106181,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105539,7 +106314,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105629,17 +106404,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105685,7 +106460,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105729,12 +106504,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105757,7 +106532,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105927,7 +106702,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105964,7 +106738,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -106080,7 +106854,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106194,7 +106968,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106259,15 +107033,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106288,7 +107062,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106426,7 +107200,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106444,11 +107218,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106929,13 +107703,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107843,19 +108621,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107923,7 +108701,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -109020,7 +109798,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109995,21 +110773,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110752,7 +111530,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110916,7 +111694,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111133,9 +111911,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -111414,19 +112192,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111805,9 +112583,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112575,7 +113353,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+2464)) break } } @@ -112596,9 +113374,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112611,7 +113389,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112771,7 +113549,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112784,11 +113562,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112801,9 +113579,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112918,36 +113696,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -113064,7 +113820,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113335,16 +114091,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113408,6 +114165,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113458,6 +114216,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113606,7 +114365,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -113636,7 +114395,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113651,7 +114410,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113747,7 +114506,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113758,8 +114517,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113769,13 +114528,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113842,23 +114601,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113876,35 +114635,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -114019,7 +114778,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -114069,7 +114828,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -114191,7 +114950,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114207,6 +114966,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114216,7 +114978,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114424,7 +115186,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114517,7 +115279,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114587,7 +115349,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114597,7 +115359,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114634,20 +115396,20 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint }() } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -114771,7 +115533,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+24041, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114816,10 +115578,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114924,7 +115686,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114935,17 +115697,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint64(4)) == 0) { goto __32 } @@ -114953,7 +115715,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114983,7 +115745,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114991,7 +115753,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -115031,7 +115793,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -115055,15 +115817,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -115178,7 +115940,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -115197,8 +115959,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -115209,10 +115971,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115226,7 +115988,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -115243,7 +116005,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115277,9 +116039,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23282 (*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) @@ -115384,7 +116146,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, func() uint8 { @@ -115502,21 +116264,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115627,7 +116389,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115674,14 +116436,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115751,6 +116513,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116327,7 +117092,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116360,7 +117125,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -116371,7 +117136,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -116445,7 +117210,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116540,7 +117305,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -116623,7 +117388,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116776,7 +117541,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)(unsafe.Pointer(ts + 24335 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -116802,7 +117567,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116831,7 +117596,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116889,19 +117654,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117446,17 +118211,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6690, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6695, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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)) @@ -117557,7 +118322,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117863,7 +118628,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+24396, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117878,7 +118643,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117932,7 +118697,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -118037,11 +118802,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -118082,7 +118847,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -118198,14 +118963,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118300,7 +119065,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118375,9 +119140,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118510,7 +119275,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118607,7 +119372,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118651,7 +119416,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118782,7 +119547,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118801,7 +119566,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118897,7 +119662,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118921,7 +119686,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -119037,7 +119802,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -119132,25 +119897,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -119169,8 +119934,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119430,11 +120195,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -119645,7 +120410,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120343,7 +121108,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120555,7 +121320,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121684,7 +122449,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121696,12 +122461,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121742,7 +122507,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121927,7 +122692,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121950,14 +122715,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -121998,7 +122763,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -122041,19 +122806,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -122082,7 +122847,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -122094,7 +122859,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122102,18 +122867,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122128,14 +122893,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -122164,7 +122929,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -122172,19 +122937,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122226,16 +122991,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -122260,7 +123025,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -122272,7 +123037,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122295,7 +123060,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122306,14 +123071,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122356,7 +123121,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -122373,7 +123138,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122391,7 +123156,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -122429,13 +123194,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122446,7 +123211,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122524,12 +123289,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122548,7 +123313,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122567,7 +123332,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122581,8 +123346,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -122597,23 +123362,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122637,7 +123402,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122657,7 +123422,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122674,14 +123439,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122689,7 +123454,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122718,14 +123483,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122747,12 +123512,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122761,12 +123526,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122780,8 +123545,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122789,7 +123554,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122804,7 +123569,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122812,7 +123577,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122822,7 +123587,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -123191,11 +123956,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -123215,19 +123980,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -124133,7 +124898,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -124142,7 +124907,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -124150,7 +124915,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -124161,7 +124926,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -124186,7 +124951,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124375,7 +125140,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124385,7 +125150,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124393,7 +125158,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124505,7 +125270,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124635,14 +125400,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124707,7 +125472,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124719,25 +125484,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124747,26 +125512,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124820,7 +125585,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124887,6 +125652,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -125145,7 +125912,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -125156,7 +125923,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -125169,7 +125936,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -125181,7 +125948,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125257,7 +126024,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+64) + ts+27816, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -125321,7 +126088,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+24891, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125342,16 +126109,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125449,7 +126216,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125467,7 +126234,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125485,7 +126252,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125503,7 +126270,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125526,7 +126293,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125572,7 +126339,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125587,7 +126354,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125627,7 +126394,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125637,18 +126404,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125660,18 +126427,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125685,7 +126452,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -125728,12 +126495,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125744,13 +126511,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125772,25 +126539,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125827,12 +126594,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125867,7 +126634,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125875,13 +126642,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125899,12 +126666,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125926,8 +126693,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125938,7 +126705,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125965,13 +126732,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125983,9 +126750,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125995,37 +126762,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -126059,16 +126826,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -126076,7 +126843,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -126088,27 +126855,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -126117,7 +126884,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -126131,21 +126898,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -126180,19 +126947,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -126204,15 +126971,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -126227,12 +126994,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -126241,7 +127008,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126251,25 +127018,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126279,50 +127046,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126335,7 +127102,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126372,7 +127139,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -126477,7 +127244,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126497,24 +127264,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126530,7 +127297,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126538,31 +127305,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126587,8 +127354,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126597,52 +127364,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126650,14 +127417,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126670,35 +127437,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126761,12 +127528,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126793,7 +127560,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126825,7 +127592,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126895,28 +127662,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3272, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3286, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6367, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6381, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126949,11 +127716,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126965,16 +127732,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126990,37 +127757,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -127049,14 +127816,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127165,7 +127932,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -127182,23 +127949,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -127219,12 +127986,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127318,7 +128082,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127411,7 +128175,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127419,7 +128183,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127440,7 +128204,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127470,9 +128234,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127486,10 +128250,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127503,12 +128267,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127520,7 +128284,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127540,15 +128304,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127572,10 +128336,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127670,7 +128434,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127686,7 +128450,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127702,7 +128466,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127736,7 +128500,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127766,13 +128530,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127783,7 +128547,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127813,10 +128577,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127827,7 +128592,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127856,7 +128621,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127874,12 +128639,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127887,7 +128652,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+14479, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127898,19 +128663,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+64) + db, ts+32174, uintptr(0), uintptr(0), p+64) } } @@ -127964,7 +128729,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127991,7 +128756,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -128008,7 +128773,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -128021,13 +128786,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -128122,7 +128887,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128139,19 +128904,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128159,6 +128924,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -128177,7 +128964,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128472,7 +129259,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128497,7 +129284,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128542,7 +129329,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131353,7 +132140,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131395,7 +132182,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131456,7 +132243,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131530,13 +132317,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131598,7 +132385,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -131610,6 +132397,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131962,7 +132758,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -132130,45 +132926,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32843, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32760, bp+16) + sessionAppendStr(tls, bp, ts+32856, bp+16) 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+16) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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+32771, bp+16) + ts+32867, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -132215,42 +133011,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+16) + sessionAppendStr(tls, bp, ts+32942, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32695, bp+16) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+16) + sessionAppendStr(tls, bp, ts+32960, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32407, bp+16) + sessionAppendStr(tls, bp, ts+32503, bp+16) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -132263,7 +133059,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132274,21 +133070,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+16) + sessionAppendStr(tls, bp, ts+32973, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21375, bp+16) + sessionAppendStr(tls, bp, ts+21470, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+16) + sessionAppendStr(tls, bp, ts+14604, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32895, bp+16) + sessionAppendStr(tls, bp, ts+32991, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+16) + sessionAppendStr(tls, bp, ts+33002, bp+16) } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -132302,14 +133098,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33023) + ts+33119) } return rc } @@ -132337,7 +133133,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132590,7 +133386,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132606,7 +133402,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132679,10 +133475,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -132715,7 +133511,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132728,7 +133524,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -132741,19 +133537,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132804,14 +133600,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133325,7 +134121,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -134059,7 +134855,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134347,7 +135143,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134534,7 +135330,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134602,7 +135398,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134761,7 +135557,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134784,7 +135580,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -135108,13 +135904,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135525,7 +136321,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135665,7 +136461,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135692,14 +136488,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135710,7 +136506,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135723,7 +136519,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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))) @@ -135732,7 +136528,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135751,7 +136547,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135766,14 +136562,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135781,9 +136577,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135791,9 +136587,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -135801,21 +136597,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135862,15 +136658,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135887,13 +136683,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135931,8 +136727,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135964,7 +136760,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135973,13 +136769,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -136001,19 +136797,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -136057,18 +136853,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -136178,7 +136974,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -136188,7 +136984,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -136198,7 +136994,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -136211,7 +137007,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -136221,7 +137017,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -136237,7 +137033,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -136260,7 +137056,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136282,7 +137078,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -136296,7 +137092,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136394,7 +137190,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136407,20 +137203,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint64(3)) == 0 { tok = FTS5_AND } break @@ -138187,9 +138983,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -138205,7 +139001,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138292,7 +139088,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138373,7 +139169,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138543,12 +139339,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139491,7 +140287,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -139570,7 +140366,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139595,7 +140391,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -139618,7 +140414,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139857,7 +140653,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139930,13 +140726,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -141056,7 +141852,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142249,7 +143045,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142415,10 +143211,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -142446,7 +143242,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142522,7 +143318,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142565,7 +143361,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -142577,7 +143373,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -142697,7 +143493,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -143096,12 +143892,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -143112,7 +143908,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -143293,7 +144089,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -143417,7 +144213,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143426,7 +144222,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143458,8 +144254,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -143512,8 +144308,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -143583,7 +144379,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143599,13 +144395,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143858,7 +144654,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143972,7 +144768,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -144131,6 +144927,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -144138,7 +144938,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35242) 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)) @@ -144409,7 +145209,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144440,7 +145240,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } 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+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144455,7 +145255,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return uint8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144769,7 +145569,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144801,7 +145601,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144833,25 +145633,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144897,12 +145697,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144933,7 +145733,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144964,7 +145764,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144996,14 +145796,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -145059,7 +145859,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -145102,7 +145902,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145276,7 +146076,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145397,7 +146197,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145421,28 +146221,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145500,7 +146300,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -145513,12 +146313,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -146148,7 +146948,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146392,7 +147192,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146411,7 +147211,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146458,7 +147258,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146467,7 +147267,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146481,7 +147281,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146505,7 +147305,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146523,13 +147323,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146584,17 +147384,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146661,7 +147461,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146696,18 +147496,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146719,7 +147519,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146731,14 +147531,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146750,17 +147550,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146797,27 +147597,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -147023,12 +147823,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -147036,7 +147836,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -147212,7 +148012,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147394,14 +148194,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+48) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+56) + rc = fts5StorageCount(tls, p, ts+34338, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147596,9 +148396,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147813,7 +148613,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147825,7 +148625,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147836,18 +148636,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -148123,7 +148923,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148265,7 +149065,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148273,11 +149073,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148285,7 +149085,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148293,7 +149093,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148301,11 +149101,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148313,19 +149113,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148333,11 +149133,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148345,7 +149145,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148353,11 +149153,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148365,7 +149165,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148373,7 +149173,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148381,7 +149181,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148397,24 +149197,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148429,137 +149229,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 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+37079, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36891, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36998, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148574,16 +149374,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148591,21 +149391,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148613,7 +149413,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148621,9 +149421,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148638,12 +149438,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148652,7 +149452,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148808,7 +149608,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37222) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148988,22 +149788,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -150146,14 +150946,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -150179,19 +150979,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -150324,11 +151124,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -150352,7 +151152,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150636,7 +151436,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150747,7 +151547,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150769,7 +151569,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151313,7 +152113,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -151623,16 +152423,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -151689,12 +152489,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -151709,6 +152509,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -151730,5 +152531,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 dda7c47a20..b07db89e13 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -353,7 +353,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -1021,7 +1020,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -1034,49 +1033,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -1085,21 +1084,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -1111,8 +1110,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -1124,22 +1123,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -1147,13 +1146,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1168,13 +1167,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0003 @@ -1717,7 +1716,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1813,6 +1812,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1948,6 +1948,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1977,6 +1978,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -2078,6 +2080,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -2151,7 +2155,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2258,8 +2262,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2765,6 +2769,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3812,7 +3817,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -4143,6 +4157,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4153,6 +4168,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -6071,6 +6104,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -6110,6 +6154,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -6160,7 +6205,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -6175,6 +6220,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -6543,8 +6589,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -6561,7 +6606,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6823,8 +6867,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -7169,17 +7213,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -7209,7 +7242,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 56, @@ -7218,49 +7258,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 122, ts + 152, ts + 172, - ts + 195, - ts + 220, - ts + 247, - ts + 272, - ts + 294, - ts + 326, - ts + 352, - ts + 377, - ts + 400, - ts + 412, - ts + 427, - ts + 449, - ts + 474, - ts + 497, - ts + 519, - ts + 530, - ts + 543, - ts + 558, - ts + 574, - ts + 587, - ts + 608, - ts + 632, - ts + 655, - ts + 671, - ts + 687, - ts + 711, - ts + 738, + ts + 192, + ts + 215, + ts + 240, + ts + 267, + ts + 292, + ts + 314, + ts + 346, + ts + 372, + ts + 397, + ts + 420, + ts + 432, + ts + 447, + ts + 469, + ts + 494, + ts + 517, + ts + 539, + ts + 550, + ts + 563, + ts + 578, + ts + 594, + ts + 607, + ts + 628, + ts + 652, + ts + 675, + ts + 691, + ts + 707, + ts + 731, ts + 758, - ts + 779, - ts + 801, - ts + 831, - ts + 856, - ts + 882, + ts + 778, + ts + 799, + ts + 821, + ts + 851, + ts + 876, ts + 902, - ts + 928, - ts + 951, - ts + 977, - ts + 999, - ts + 1020, - ts + 1031, - ts + 1039, - ts + 1053, - ts + 1066, + ts + 922, + ts + 948, + ts + 971, + ts + 997, + ts + 1019, + ts + 1040, + ts + 1051, + ts + 1059, + ts + 1073, + ts + 1086, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -7362,7 +7403,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -7410,10 +7450,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1099)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -7425,10 +7465,6 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) // // 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)} var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), @@ -7438,21 +7474,13 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]uint8{ - uint8(0), - uint8(SQLITE_BLOB), - uint8(SQLITE_INTEGER), - uint8(SQLITE_INTEGER), - uint8(SQLITE_FLOAT), - uint8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1086, - ts + 1090, - ts + 1095, - ts + 1099, - ts + 1107, - ts + 1112, + ts + 1106, + ts + 1110, + ts + 1115, + ts + 1119, + ts + 1127, + ts + 1132, } // SQL is translated into a sequence of instructions to be @@ -7751,7 +7779,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7888,6 +7916,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7911,6 +7941,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7925,9 +7956,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -8174,7 +8208,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1117, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -8200,13 +8234,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1125, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1145, 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+1133, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1153, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -8282,7 +8316,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*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)) + *(*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)+0.5) 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) @@ -8304,7 +8338,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1137, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1157, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -8361,7 +8395,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1149) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1169) == 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))) @@ -8494,7 +8528,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1153, -1) + Xsqlite3_result_error(tls, pCtx, ts+1173, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -8518,12 +8552,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1176)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1183)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1190)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1196)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1203)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1210)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1217)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1224)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1231)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -8535,7 +8569,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(z))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1238) == 0 { if idx > 1 { return 1 } @@ -8557,7 +8591,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 { if idx > 1 { return 1 } @@ -8571,7 +8605,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -8579,7 +8613,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -8591,7 +8625,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -8625,9 +8659,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1257, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1277, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -8646,7 +8680,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1266, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1286, 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) { @@ -8660,14 +8694,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*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+1276) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1296) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1282) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1302) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1287) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1307) == 0 { rc = 0 } break @@ -8993,7 +9027,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -9003,13 +9037,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1296, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1316, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -9027,41 +9061,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1308, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1328, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1314, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1334, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1291, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1311, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -9074,7 +9108,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1319, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1339, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -9124,15 +9158,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1223}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1243}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1329}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1263}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1349}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1354}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1363}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1372}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1385}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1403}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -9283,7 +9317,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9547,7 +9581,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1396, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1416, libc.VaList(bp, nByte)) } return p } @@ -9580,7 +9614,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1434, + ts+1454, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9991,7 +10025,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -10027,7 +10061,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -10047,7 +10081,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -10096,24 +10130,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -10429,7 +10490,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -10502,8 +10563,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1504)) +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1537)) 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)}, @@ -10715,7 +10776,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1524, 1) + Xsqlite3_str_append(tls, pAccum, ts+1544, 1) goto __5 __11: ; @@ -11272,7 +11333,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1526 + bufpt = ts + 1546 length = 3 goto __58 __127: @@ -11332,7 +11393,7 @@ __138: } bufpt = bp + 16 *(*uint8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1530, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1550, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -11673,7 +11734,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1534 + bufpt = ts + 1554 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -11797,9 +11858,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1535 + return ts + 1555 } - return ts + 1540 + return ts + 1560 }() __220: ; @@ -11947,7 +12008,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1547, 1) + Xsqlite3_str_append(tls, pAccum, ts+1567, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11964,10 +12025,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1579, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -12022,7 +12083,7 @@ __4: __5: } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1573)) +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1593)) // 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 @@ -12187,7 +12248,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1534, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1554, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -12419,20 +12480,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -12445,46 +12612,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]uint8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -13795,7 +13962,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1582 + var pow63 uintptr = ts + 1602 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 } @@ -14341,7 +14508,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1601, + ts+1621, libc.VaList(bp, zType)) } @@ -14360,13 +14527,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1535) + logBadConnection(tls, ts+1555) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1646) + logBadConnection(tls, ts+1666) } return 0 } else { @@ -14379,7 +14546,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1655) + logBadConnection(tls, ts+1675) return 0 } else { return 1 @@ -14852,193 +15019,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1663, - ts + 1673, - ts + 1684, - ts + 1696, - ts + 1707, - ts + 1719, - ts + 1726, - ts + 1734, - ts + 1742, - ts + 1747, - ts + 1753, + ts + 1683, + ts + 1693, + ts + 1704, + ts + 1716, + ts + 1727, + ts + 1739, + ts + 1746, + ts + 1754, + ts + 1762, ts + 1767, - ts + 1773, - ts + 1783, - ts + 1788, - ts + 1793, - ts + 1796, - ts + 1802, - ts + 1815, - ts + 1825, - ts + 1829, - ts + 1836, - ts + 1843, - ts + 1850, - ts + 1857, - ts + 1867, + ts + 1772, + ts + 1778, + ts + 1792, + ts + 1798, + ts + 1808, + ts + 1813, + ts + 1818, + ts + 1821, + ts + 1827, + ts + 1834, + ts + 1838, + ts + 1848, + ts + 1855, + ts + 1862, + ts + 1869, ts + 1876, - ts + 1887, - ts + 1896, - ts + 1902, - ts + 1912, - ts + 1922, - ts + 1927, - ts + 1937, - ts + 1948, - ts + 1953, - ts + 1960, - ts + 1971, - ts + 1976, - ts + 1981, - ts + 1987, - ts + 1993, - ts + 1999, - ts + 2005, - ts + 2008, + ts + 1886, + ts + 1895, + ts + 1906, + ts + 1915, + ts + 1921, + ts + 1931, + ts + 1941, + ts + 1946, + ts + 1956, + ts + 1967, + ts + 1972, + ts + 1979, + ts + 1990, + ts + 1995, + ts + 2000, + ts + 2006, ts + 2012, - ts + 2023, - ts + 2034, + ts + 2018, + ts + 2021, + ts + 2025, + ts + 2031, ts + 2042, - ts + 2051, - ts + 2057, - ts + 2064, - ts + 2072, - ts + 2075, - ts + 2078, - ts + 2081, - ts + 2084, - ts + 2087, - ts + 2090, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2077, + ts + 2085, + ts + 2088, + ts + 2091, + ts + 2094, ts + 2097, - ts + 2107, - ts + 2120, - ts + 2131, - ts + 2137, - ts + 2144, - ts + 2149, - ts + 2158, - ts + 2167, - ts + 2174, - ts + 2187, - ts + 2198, - ts + 2203, - ts + 2211, + ts + 2100, + ts + 2103, + ts + 2110, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2163, + ts + 2172, + ts + 2181, + ts + 2188, + ts + 2201, + ts + 2212, ts + 2217, - ts + 2224, - ts + 2236, - ts + 2241, + ts + 2225, + ts + 2231, + ts + 2238, ts + 2250, ts + 2255, ts + 2264, ts + 2269, - ts + 2274, - ts + 2280, + ts + 2278, + ts + 2283, ts + 2288, - ts + 2296, - ts + 2306, - ts + 2314, - ts + 2321, - ts + 2334, - ts + 2339, - ts + 2351, - ts + 2359, - ts + 2366, - ts + 2377, - ts + 2384, + ts + 2294, + ts + 2302, + ts + 2310, + ts + 2320, + ts + 2328, + ts + 2335, + ts + 2348, + ts + 2353, + ts + 2365, + ts + 2373, + ts + 2380, ts + 2391, - ts + 2401, - ts + 2410, - ts + 2421, - ts + 2427, - ts + 2438, - ts + 2448, - ts + 2458, - ts + 2465, - ts + 2471, - ts + 2481, - ts + 2492, - ts + 2496, - ts + 2505, - ts + 2514, - ts + 2521, - ts + 2531, - ts + 2538, - ts + 2547, - ts + 2557, - ts + 2564, - ts + 2572, + ts + 2398, + ts + 2405, + ts + 2415, + ts + 2424, + ts + 2435, + ts + 2441, + ts + 2452, + ts + 2462, + ts + 2472, + ts + 2479, + ts + 2485, + ts + 2495, + ts + 2506, + ts + 2510, + ts + 2519, + ts + 2528, + ts + 2535, + ts + 2545, + ts + 2552, + ts + 2561, + ts + 2571, + ts + 2578, ts + 2586, - ts + 2594, + ts + 2600, ts + 2608, - ts + 2619, - ts + 2632, - ts + 2643, - ts + 2649, - ts + 2661, - ts + 2670, - ts + 2678, - ts + 2687, - ts + 2696, - ts + 2703, - ts + 2711, - ts + 2718, - ts + 2729, + ts + 2622, + ts + 2633, + ts + 2646, + ts + 2657, + ts + 2663, + ts + 2675, + ts + 2684, + ts + 2692, + ts + 2701, + ts + 2710, + ts + 2717, + ts + 2725, + ts + 2732, ts + 2743, - ts + 2754, - ts + 2762, + ts + 2757, ts + 2768, ts + 2776, - ts + 2784, - ts + 2794, - ts + 2807, - ts + 2817, - ts + 2830, - ts + 2839, - ts + 2850, - ts + 2858, + ts + 2782, + ts + 2790, + ts + 2798, + ts + 2808, + ts + 2821, + ts + 2831, + ts + 2844, + ts + 2853, ts + 2864, - ts + 2876, - ts + 2888, - ts + 2896, - ts + 2908, - ts + 2921, - ts + 2931, - ts + 2941, - ts + 2946, - ts + 2958, - ts + 2970, - ts + 2980, - ts + 2986, - ts + 2996, - ts + 3003, - ts + 3015, - ts + 3026, - ts + 3034, - ts + 3043, - ts + 3052, - ts + 3061, - ts + 3068, - ts + 3079, - ts + 3092, - ts + 3102, - ts + 3109, - ts + 3117, - ts + 3126, - ts + 3132, + ts + 2872, + ts + 2878, + ts + 2890, + ts + 2902, + ts + 2910, + ts + 2922, + ts + 2935, + ts + 2945, + ts + 2955, + ts + 2960, + ts + 2972, + ts + 2984, + ts + 2994, + ts + 3000, + ts + 3010, + ts + 3017, + ts + 3029, + ts + 3040, + ts + 3048, + ts + 3057, + ts + 3066, + ts + 3075, + ts + 3082, + ts + 3093, + ts + 3106, + ts + 3116, + ts + 3123, + ts + 3131, ts + 3140, - ts + 3148, - ts + 3156, - ts + 3166, - ts + 3175, - ts + 3186, - ts + 3196, - ts + 3202, - ts + 3213, - ts + 3224, - ts + 3229, - ts + 3237, + ts + 3146, + ts + 3154, + ts + 3162, + ts + 3170, + ts + 3180, + ts + 3189, + ts + 3200, + ts + 3210, + ts + 3216, + ts + 3227, + ts + 3238, + ts + 3243, + ts + 3251, } type stat = struct { @@ -15412,35 +15579,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3247, FpCurrent: 0}, - {FzName: ts + 3252, FpCurrent: 0}, - {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3265, FpCurrent: 0}, + {FzName: ts + 3261, FpCurrent: 0}, + {FzName: ts + 3266, FpCurrent: 0}, {FzName: ts + 3272, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3293, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3304}, - {FzName: ts + 3310}, - {FzName: ts + 3318, FpCurrent: 0}, + {FzName: ts + 3279, FpCurrent: 0}, + {FzName: ts + 3286, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3307, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3318}, {FzName: ts + 3324}, - {FzName: ts + 3331}, - {FzName: ts + 3340, FpCurrent: 0}, - {FzName: ts + 3347}, - {FzName: ts + 3357, FpCurrent: 0}, - {FzName: ts + 3364, FpCurrent: 0}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3338}, + {FzName: ts + 3345}, + {FzName: ts + 3354, FpCurrent: 0}, + {FzName: ts + 3361}, + {FzName: ts + 3371, FpCurrent: 0}, {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3390, FpCurrent: 0}, - {FzName: ts + 3397, FpCurrent: 0}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, + {FzName: ts + 3392, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, + {FzName: ts + 3404, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, {FzName: ts + 3424, FpCurrent: 0}, - {FzName: ts + 3436, FpCurrent: 0}, - {FzName: ts + 3445, FpCurrent: 0}, - {FzName: ts + 3451}, + {FzName: ts + 3431, FpCurrent: 0}, + {FzName: ts + 3438, FpCurrent: 0}, + {FzName: ts + 3450, FpCurrent: 0}, + {FzName: ts + 3459, FpCurrent: 0}, + {FzName: ts + 3465}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -15533,11 +15700,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3457, libc.VaList(bp, z, fd)) + ts+3471, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3500, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3514, O_RDONLY, int32(m)) < 0 { break } } @@ -15616,13 +15786,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) - zErr = ts + 1534 + zErr = ts + 1554 if zPath == uintptr(0) { - zPath = ts + 1534 + zPath = ts + 1554 } Xsqlite3_log(tls, errcode, - ts+3510, + ts+3524, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -15630,7 +15800,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3252, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3266, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -15651,7 +15821,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -15753,19 +15923,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3541, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3555, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3565, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3579, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3594, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3608, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3621, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3635, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -16128,7 +16298,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -16401,7 +16571,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3649, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3663, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -16419,7 +16589,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3364, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3378, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -16436,14 +16606,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3652, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3666, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -16463,7 +16633,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -16518,7 +16688,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1534, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1554, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -16531,7 +16701,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) 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+3283, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39399) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3297, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) } } @@ -16599,7 +16769,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -16758,7 +16928,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -16786,7 +16956,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3283, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3297, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16849,7 +17019,7 @@ __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+3663, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3677, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16870,7 +17040,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3670, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3684, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0400000, @@ -16885,7 +17055,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3247, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3261, zShm, 41333) goto shm_open_err __10: ; @@ -17011,11 +17181,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 144)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1534, 1, bp+144) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1554, 1, bp+144) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3318, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3332, zFile, 41477) goto shmpage_out __14: ; @@ -17061,7 +17231,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3405, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3419, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -17262,7 +17432,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { } func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { - var zErr uintptr = ts + 3405 + var zErr uintptr = ts + 3419 var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual @@ -17278,7 +17448,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { } 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 + 3417 + zErr = ts + 3431 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)) @@ -17292,7 +17462,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 40685) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -17407,10 +17577,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3683, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3697, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3688) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3702) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -17426,7 +17596,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -17439,7 +17609,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3698, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3712, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -17447,7 +17617,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -17460,15 +17630,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3706, - ts + 3715, - ts + 3724, - ts + 1547, + ts + 3720, + ts + 3729, + ts + 3738, + ts + 1567, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3729) - azTempDirs[1] = libc.Xgetenv(tls, ts+3743) + azTempDirs[0] = libc.Xgetenv(tls, ts+3743) + azTempDirs[1] = libc.Xgetenv(tls, ts+3757) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -17513,7 +17683,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { 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+3750, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3764, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -17598,7 +17768,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3767) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3781) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -17646,10 +17816,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -17763,7 +17933,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3247, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3261, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -17854,7 +18024,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+3357, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3371, zPath, 43046) } return rc } @@ -17862,9 +18032,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+3774, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3788, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -17931,18 +18101,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3445, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3459, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+144, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([4098]uint8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3436, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3450, zIn, 43165) return } *(*uint8)(unsafe.Pointer(bp + 144 + uintptr(got))) = uint8(0) @@ -17982,14 +18152,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 4104)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([4098]uint8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3265, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3279, zPath, 43223) } appendAllPathElements(tls, bp+4104, bp) } appendAllPathElements(tls, bp+4104, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+4104)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+4104)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+4104)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+4104)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -18047,7 +18217,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3649, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3663, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -18075,11 +18245,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3780, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3794, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -18090,7 +18260,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -18167,10 +18337,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3793, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3798, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3808, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3688, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3807, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3812, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3822, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3702, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -18225,7 +18395,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3821, + FzName: ts + 3835, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -18392,40 +18562,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18436,7 +18651,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18492,7 +18707,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18568,7 +18783,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18689,7 +18904,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18762,7 +18977,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18825,6 +19040,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19508,6 +19728,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19540,6 +19761,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21970,7 +22192,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23107,7 +23329,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23168,7 +23390,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23181,7 +23403,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23233,9 +23455,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23499,7 +23721,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23623,7 +23845,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23662,7 +23884,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23739,7 +23961,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23866,6 +24088,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24739,7 +24962,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24924,7 +25147,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25496,7 +25719,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25595,7 +25818,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25763,7 +25986,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26181,7 +26404,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26326,7 +26549,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26456,7 +26679,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26929,7 +27152,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27434,7 +27657,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27825,7 +28048,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -28090,7 +28313,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28227,7 +28450,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28244,7 +28467,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28252,7 +28475,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28295,7 +28518,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28305,7 +28528,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28555,7 +28778,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28587,8 +28810,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -28603,7 +28825,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28613,7 +28835,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28626,7 +28848,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28635,14 +28857,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -28652,7 +28874,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28699,63 +28921,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28787,10 +29003,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28801,15 +29016,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28834,7 +29049,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28845,7 +29060,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28893,26 +29108,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28922,7 +29137,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28930,7 +29145,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28938,10 +29153,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -29010,7 +29225,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -29040,11 +29255,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -29055,15 +29270,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -29091,14 +29306,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29112,7 +29327,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29124,7 +29339,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29227,7 +29442,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29255,7 +29470,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29294,7 +29509,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29318,7 +29533,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -29367,7 +29582,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt 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+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30139,7 +30354,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -30177,7 +30392,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30592,7 +30807,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30618,7 +30833,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -30626,6 +30841,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30635,7 +30853,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30651,7 +30869,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30712,7 +30930,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30747,7 +30965,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30807,7 +31025,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30846,7 +31064,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30877,7 +31095,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31218,7 +31436,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31462,14 +31680,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31514,7 +31732,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31563,7 +31781,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31642,10 +31860,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31653,7 +31869,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31715,7 +31932,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31735,7 +31952,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31755,7 +31972,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31967,7 +32184,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32171,7 +32388,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32236,7 +32453,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32284,7 +32501,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32403,7 +32620,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32563,7 +32780,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32628,7 +32845,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -32664,7 +32881,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32708,7 +32925,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32820,7 +33037,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32978,7 +33195,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -33035,7 +33252,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -33051,7 +33268,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33125,7 +33342,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33137,7 +33354,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -33148,7 +33365,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33313,7 +33530,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33585,12 +33802,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33598,7 +33815,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -33658,7 +33875,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33747,7 +33964,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33863,7 +34080,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -34181,7 +34398,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34192,7 +34409,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34350,7 +34567,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34424,7 +34641,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34486,7 +34703,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34514,7 +34731,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34775,7 +34992,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34967,7 +35184,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -35004,6 +35221,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -35094,7 +35313,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35117,7 +35336,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35197,7 +35416,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35310,7 +35529,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -35371,7 +35590,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35409,13 +35628,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -35522,7 +35741,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35545,7 +35764,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35646,7 +35865,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35654,11 +35873,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35733,7 +35952,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35802,7 +36021,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35831,7 +36050,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35907,7 +36126,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35921,7 +36140,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -36055,7 +36274,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36243,7 +36462,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4062, 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)) @@ -36268,11 +36487,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -36293,13 +36512,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36318,7 +36537,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36329,7 +36548,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36352,12 +36571,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36464,13 +36683,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36481,7 +36700,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36489,14 +36708,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36513,7 +36732,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36538,7 +36757,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36551,7 +36770,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36567,7 +36786,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36605,7 +36824,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36678,7 +36897,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36695,7 +36914,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36815,7 +37034,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 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)).FzPfx = uintptr(0) @@ -36851,7 +37070,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36861,7 +37080,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36908,13 +37127,13 @@ __23: 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+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, 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+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37149,6 +37368,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37162,8 +37390,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37171,7 +37399,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37182,7 +37410,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37197,7 +37425,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37217,7 +37445,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37666,7 +37894,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -38083,6 +38311,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -38098,7 +38339,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38158,6 +38399,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38240,7 +38484,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38472,7 +38716,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38704,7 +38948,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38766,7 +39010,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38807,7 +39051,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38826,7 +39070,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39130,7 +39374,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39145,14 +39389,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39211,6 +39455,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -39235,10 +39482,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39276,21 +39523,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39639,85 +39894,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 1, 0x2) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x1) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39817,6 +40104,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -39844,7 +40141,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39852,12 +40149,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39876,7 +40173,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39927,7 +40226,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -40056,8 +40355,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -40068,10 +40367,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -40082,6 +40377,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -40097,34 +40397,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, 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 + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40132,7 +40432,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40140,32 +40440,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40175,13 +40475,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, 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+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40189,7 +40489,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40200,20 +40500,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, 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+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40238,7 +40538,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40340,7 +40640,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40689,8 +40989,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40899,7 +41199,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40907,16 +41207,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -41062,7 +41362,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41342,7 +41642,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41352,14 +41652,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41370,16 +41672,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41396,7 +41694,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41947,16 +42245,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41974,7 +42276,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -42004,7 +42310,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -42038,7 +42344,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -42061,7 +42367,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -42083,7 +42389,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42227,7 +42540,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42398,7 +42711,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42424,7 +42737,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42467,7 +42780,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 6, 0xc0) } } @@ -42535,13 +42848,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, 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) @@ -42572,7 +42885,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42627,7 +42940,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42646,7 +42959,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42656,7 +42969,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42698,14 +43011,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42927,6 +43241,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43138,7 +43456,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43329,7 +43647,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43404,7 +43722,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43833,35 +44151,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43876,7 +44193,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43908,7 +44225,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43923,7 +44240,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43934,7 +44251,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43944,7 +44261,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44030,7 +44347,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -44174,7 +44491,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44192,8 +44509,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -44257,7 +44577,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44401,7 +44721,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44573,7 +44893,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -44609,11 +44929,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, 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+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44628,21 +44948,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, 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+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44698,7 +45018,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44802,12 +45123,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44859,11 +45179,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44901,7 +45221,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44930,11 +45249,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -45004,42 +45326,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -45047,52 +45370,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -45134,19 +45457,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45155,7 +45478,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45163,11 +45486,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45403,7 +45726,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45898,20 +46221,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46301,14 +46624,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46386,72 +46709,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -46468,10 +46799,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -46483,33 +46814,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46518,43 +46849,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46570,26 +46901,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46597,12 +46928,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46617,17 +46948,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46642,163 +46973,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46807,20 +47138,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46830,15 +47161,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46846,9 +47177,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46860,52 +47191,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46914,24 +47245,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -46945,13 +47276,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46960,38 +47291,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47000,10 +47331,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -47011,10 +47342,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -47022,35 +47353,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -47058,372 +47427,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47431,15 +47801,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47448,124 +47818,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf >> 0) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf>>0)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47575,40 +47945,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47626,339 +47996,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47967,20 +48337,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47991,244 +48361,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48237,172 +48607,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x4>>2)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0xc0) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 3, 0x8) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48422,36 +48792,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0xc0) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48459,22 +48829,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0xc0>>6) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48485,24 +48855,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -48510,30 +48880,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48549,10 +48919,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48561,10 +48931,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 7, 0x80) @@ -48584,83 +48954,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1554 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 5, 0x20) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48669,31 +49039,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48701,10 +49071,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48725,105 +49095,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48835,231 +49205,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -49069,85 +49441,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49155,59 +49527,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49222,121 +49594,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x40>>6) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 6, 0x40) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 6, 0x40) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x40>>6)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x40>>6)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -49344,93 +49716,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49443,7 +49815,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -49458,81 +49830,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49542,38 +49914,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49581,205 +49953,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 4, 0x10) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 4, 0x10) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49789,90 +50161,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49881,36 +50253,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49921,88 +50293,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -50014,35 +50386,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -50051,63 +50423,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -50116,13 +50488,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -50130,20 +50502,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50153,45 +50525,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50204,10 +50576,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -50218,10 +50590,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50229,30 +50601,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0xc0) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -50262,36 +50634,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50299,10 +50671,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50334,22 +50706,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50359,15 +50731,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50377,17 +50749,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -50397,34 +50769,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50433,48 +50805,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -50482,10 +50854,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50507,24 +50879,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50556,78 +50928,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50635,11 +51007,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50655,14 +51027,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -50670,16 +51042,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50687,16 +51059,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50707,10 +51079,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -50733,73 +51105,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50809,22 +51181,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50837,32 +51209,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50874,70 +51246,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50945,17 +51317,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50965,10 +51337,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50982,10 +51354,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50995,69 +51367,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 6, 0xc0) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -51065,16 +51437,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -51087,17 +51459,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -51107,24 +51479,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -51132,52 +51504,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51186,54 +51558,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -51241,69 +51613,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51315,27 +51687,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0xc0) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51343,42 +51715,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51387,41 +51759,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51435,16 +51807,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51456,25 +51828,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51483,24 +51855,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51525,16 +51897,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -51549,66 +51921,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -51629,73 +52001,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51703,13 +52075,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51720,10 +52092,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51772,16 +52148,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51801,10 +52177,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51814,8 +52190,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51835,7 +52211,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51855,8 +52231,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51864,21 +52240,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, 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+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, 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+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51887,8 +52263,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51921,8 +52297,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51949,7 +52325,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51982,7 +52358,7 @@ __26: 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 + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -52002,8 +52378,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -52072,7 +52448,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -52100,12 +52476,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52149,7 +52525,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52232,7 +52608,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52245,7 +52621,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54685,11 +55061,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54849,7 +55221,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54970,7 +55342,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -55126,14 +55498,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55150,7 +55522,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55244,7 +55616,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55253,7 +55625,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55308,7 +55680,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55316,14 +55688,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55375,7 +55747,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, 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 @@ -55412,7 +55784,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55425,23 +55797,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55544,15 +55916,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55631,10 +56003,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55681,7 +56053,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55745,7 +56117,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55761,7 +56133,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55775,7 +56147,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55798,30 +56170,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6846, libc.VaList(bp+16, pExpr)) + ts+6860, 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 + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, 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+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, 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+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55893,7 +56265,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55909,7 +56281,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55965,7 +56337,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -56040,7 +56412,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -56060,7 +56432,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -56095,7 +56467,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56152,7 +56524,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x2000>>13) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56180,7 +56552,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56394,7 +56766,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56434,7 +56806,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56445,7 +56817,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56457,7 +56829,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56557,12 +56929,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -56598,12 +56970,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -56722,9 +57094,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { 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)) - } + 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) @@ -56812,14 +57182,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -57147,7 +57516,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57222,7 +57591,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57390,12 +57759,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57466,12 +57840,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57510,7 +57884,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57536,7 +57910,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57564,7 +57938,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57611,7 +57985,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57636,7 +58010,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57657,11 +58031,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57690,7 +58061,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57786,7 +58161,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58210,7 +58585,7 @@ __2: 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+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58333,7 +58708,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58343,10 +58718,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58387,10 +58764,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58820,13 +59197,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -59030,7 +59407,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -59108,7 +59485,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60502,7 +60918,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60516,10 +60932,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60532,8 +60948,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60541,12 +60957,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60572,10 +60988,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60586,14 +61000,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60623,27 +61039,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60652,9 +61068,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60662,15 +61078,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60701,8 +61117,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60824,8 +61240,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60846,9 +61262,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60861,13 +61277,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60878,11 +61294,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60904,12 +61320,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60924,14 +61340,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60939,9 +61379,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60951,15 +61391,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60969,22 +61409,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60993,51 +61433,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -61046,18 +61486,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61269,7 +61709,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -61506,6 +61946,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61730,6 +62171,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61875,7 +62317,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62402,7 +62848,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62420,8 +62868,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62489,6 +62936,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62512,7 +62961,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62535,7 +62986,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62548,7 +62999,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -62568,7 +63021,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62708,7 +63163,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62716,7 +63171,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62767,11 +63222,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 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+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62783,13 +63238,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62799,10 +63254,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62866,7 +63321,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62876,7 +63331,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62885,7 +63340,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62926,19 +63381,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62946,7 +63401,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62958,7 +63413,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62970,7 +63425,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -63016,12 +63471,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -63031,11 +63486,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -63048,12 +63503,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -63064,7 +63519,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -63086,7 +63541,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -63134,14 +63589,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63169,7 +63624,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, 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 } @@ -63209,18 +63664,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63304,11 +63759,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63321,17 +63776,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, 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+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63526,7 +63981,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -63589,12 +64044,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63634,8 +64089,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63652,7 +64107,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63674,7 +64129,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63714,12 +64169,12 @@ 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+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, 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 + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63893,8 +64348,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63977,15 +64432,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -64013,7 +64468,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -64046,13 +64501,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64065,7 +64520,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64080,7 +64535,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -64136,8 +64591,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -64185,7 +64640,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -64205,7 +64660,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64253,8 +64708,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64296,11 +64751,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -64370,7 +64825,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64393,8 +64848,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64412,16 +64867,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64436,31 +64891,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64478,8 +64933,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64505,9 +64960,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64535,8 +64990,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -64573,7 +65028,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64597,7 +65052,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, 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) @@ -64678,19 +65133,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __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+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, 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 + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64699,7 +65154,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64713,13 +65168,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) 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 @@ -64837,11 +65292,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64875,7 +65330,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, 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) } @@ -64884,10 +65339,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+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64905,9 +65360,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -65098,7 +65553,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65349,7 +65804,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -65363,7 +65818,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65376,7 +65831,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65418,7 +65873,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11397, 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)).FnChar-- @@ -65432,7 +65887,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65476,7 +65931,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65493,7 +65948,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+11272, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, 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, -6) @@ -65649,7 +66104,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65706,7 +66161,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+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65753,9 +66208,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+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65838,7 +66293,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65860,15 +66315,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+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 13, 0x2000) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, 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+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 9, 0x200) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -66144,11 +66599,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66195,10 +66650,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66256,7 +66711,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66286,20 +66741,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x20>>5)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -66315,13 +66770,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11600, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11614, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -66335,7 +66790,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66346,7 +66801,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -66399,7 +66854,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66416,7 +66871,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66482,13 +66937,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66535,7 +66990,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66566,14 +67021,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66581,7 +67036,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66692,7 +67147,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66705,7 +67160,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66719,7 +67174,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66751,7 +67206,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+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66926,7 +67381,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66952,11 +67407,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+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -67003,7 +67458,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -67027,7 +67482,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+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -67121,6 +67576,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67148,9 +67605,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67169,62 +67625,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67271,13 +67719,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67302,25 +67750,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 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+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67341,12 +67789,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67375,9 +67823,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67388,21 +67836,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67432,12 +67880,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67542,10 +67990,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -67701,11 +68149,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -67722,7 +68170,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -67751,7 +68199,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67795,7 +68243,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67821,7 +68269,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67874,13 +68322,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+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67918,13 +68366,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -68084,9 +68532,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -68102,7 +68550,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -68130,9 +68578,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68148,9 +68596,9 @@ __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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68181,12 +68629,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68201,7 +68649,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68236,8 +68684,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -68258,7 +68706,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68288,7 +68736,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68312,7 +68760,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68321,7 +68769,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68332,7 +68780,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*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) @@ -68344,7 +68792,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12302, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -68378,7 +68826,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68386,13 +68834,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12390, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).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+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12397, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*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)).Fn-- @@ -68429,7 +68877,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+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68593,10 +69041,10 @@ 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+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -68627,7 +69075,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68672,7 +69120,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68761,7 +69209,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68787,7 +69235,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68856,7 +69304,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68869,13 +69317,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68908,7 +69356,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -69029,13 +69477,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -69043,7 +69491,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = uint8('(') @@ -69077,16 +69525,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69225,8 +69673,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69353,7 +69801,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -69377,7 +69825,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -69476,7 +69924,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69493,10 +69941,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+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69515,11 +69963,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+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69553,7 +70001,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69578,11 +70026,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69644,7 +70092,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -69653,11 +70101,11 @@ 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+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69673,13 +70121,13 @@ 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+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69694,7 +70142,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69724,7 +70172,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+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69740,7 +70188,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69803,10 +70251,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69824,12 +70269,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69889,6 +70330,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69948,13 +70396,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, 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) } @@ -69995,10 +70443,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -70030,12 +70478,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, 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) @@ -70063,11 +70511,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70145,9 +70593,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -70206,21 +70654,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, 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+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70232,7 +70680,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70296,7 +70744,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -70308,7 +70756,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70393,7 +70841,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -70620,12 +71068,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x400>>10)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70746,7 +71194,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -70765,7 +71213,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70791,26 +71239,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 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+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70824,7 +71272,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70836,10 +71284,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70851,7 +71299,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70880,7 +71328,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70901,9 +71349,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70942,7 +71390,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -71043,7 +71491,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -71057,6 +71505,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 12, 0x1000) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 4, 0x10) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -71077,6 +71526,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 5, 0x20) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 4, 0x10) __61: ; __59: @@ -71258,7 +71708,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71310,8 +71760,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71357,12 +71807,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71370,7 +71820,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, 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, @@ -71384,7 +71834,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71545,7 +71995,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71560,7 +72010,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71571,9 +72021,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71599,9 +72049,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, 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+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*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) @@ -71682,6 +72132,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71689,7 +72140,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71735,7 +72186,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+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71870,6 +72321,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71881,11 +72333,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4000>>14)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 88))) @@ -71912,7 +72366,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71940,12 +72394,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -72114,7 +72568,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72150,9 +72604,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72177,7 +72631,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72192,7 +72646,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72210,7 +72664,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, 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+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72496,7 +72950,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72592,7 +73046,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+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72697,7 +73151,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72711,7 +73165,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72790,7 +73244,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72917,7 +73371,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72951,7 +73405,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72974,26 +73428,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -73059,10 +73514,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -73075,19 +73546,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, 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+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73314,17 +73787,19 @@ __18: goto __20 } - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } - Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73337,10 +73812,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73349,15 +73824,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73366,98 +73841,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73465,138 +73940,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73699,7 +74179,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+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73929,7 +74409,7 @@ 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 + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73988,7 +74468,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74292,7 +74772,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74482,7 +74962,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74595,13 +75075,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74624,7 +75118,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74634,7 +75128,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74687,7 +75181,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74727,13 +75221,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, 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+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74741,7 +75235,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74770,13 +75264,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -75086,7 +75580,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -75098,7 +75592,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -75122,7 +75616,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75147,7 +75641,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75225,7 +75719,7 @@ func sumFinalize(tls *libc.TLS, context 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+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75487,7 +75981,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75507,14 +76001,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 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+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75754,107 +76248,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14915}, - {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 + 14935}, - {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 + 14948}, - {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 + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {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 + 15049}, - {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 + 15058}, - {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 + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15076}, - {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 + 15090}, - {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 + 15090}, - {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 + 15096}, - {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 + 15096}, - {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 + 15102}, - {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 + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {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 + 15107}, - {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 + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15111}, - {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 + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {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 + 15351}, - {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 + 15355}, - {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 + 15361}, - {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 + 15365}, - {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 + 15365}, - {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 + 15371}, - {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 + 15371}, - {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 + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {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 + 15417}, - {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 + 15421}, - {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 + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), 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 + 15450}, + {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 + 14962}, + {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 + 14982}, + {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 + 14995}, + {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 + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {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 + 15096}, + {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 + 15105}, + {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 + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15123}, + {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 + 15137}, + {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 + 15137}, + {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 + 15143}, + {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 + 15143}, + {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 + 15149}, + {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 + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {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 + 15154}, + {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 + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15158}, + {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 + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), 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 + 15204}, + {FnArg: int8(-1), 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 + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {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 + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), 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 + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {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 + 15398}, + {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 + 15402}, + {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 + 15408}, + {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 + 15412}, + {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 + 15412}, + {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 + 15418}, + {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 + 15418}, + {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 + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {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 + 15441}, + {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 + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), 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 + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {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 + 15464}, + {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 + 15468}, + {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 + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {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 + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {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 + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {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 + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75975,7 +76469,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+15549, + ts+15596, 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) @@ -76635,8 +77129,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76715,7 +77209,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -76818,7 +77312,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -76926,6 +77420,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76966,13 +77481,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -76984,21 +77498,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 } @@ -77069,7 +77573,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -77127,7 +77631,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77430,6 +77934,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77593,7 +78099,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -77618,7 +78124,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77767,7 +78273,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77777,7 +78283,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77829,7 +78335,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77837,7 +78343,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -78019,7 +78525,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -78034,137 +78553,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78176,64 +78695,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78241,7 +78764,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78544,7 +79071,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, 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) @@ -79635,13 +80162,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -80080,6 +80607,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80118,7 +80646,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -80127,7 +80655,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -80142,7 +80670,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80178,7 +80706,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80192,7 +80720,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80216,7 +80744,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80234,7 +80762,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80261,7 +80789,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80299,7 +80827,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80309,7 +80837,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80465,7 +80993,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80473,63 +81001,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, - ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, + ts + 5057, ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, - ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80547,238 +81075,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80800,7 +81328,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80812,10 +81340,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80824,13 +81352,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80845,9 +81373,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80861,7 +81389,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80952,19 +81480,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80981,7 +81509,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -81028,13 +81556,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, 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), @@ -81042,7 +81570,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -81067,8 +81595,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -81175,13 +81703,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81201,6 +81738,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81251,7 +81790,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81266,7 +81805,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81276,7 +81815,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81293,30 +81832,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81537,7 +82076,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81571,7 +82110,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -81580,36 +82119,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81647,7 +82186,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81728,21 +82267,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81784,15 +82323,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81829,14 +82368,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81855,17 +82394,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81876,7 +82415,7 @@ __114: 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))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81888,12 +82427,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81930,11 +82469,11 @@ __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) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81953,7 +82492,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81975,7 +82514,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -82029,7 +82568,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -82126,13 +82665,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { return 1 @@ -82197,20 +82736,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82243,29 +82782,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82331,7 +82870,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82341,7 +82880,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, 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)))) @@ -82378,12 +82917,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, 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))&0xc000>>14)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0xc000>>14)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82412,7 +82951,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, 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))) @@ -82428,13 +82967,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82473,7 +83012,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -82492,13 +83031,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82514,7 +83053,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82549,7 +83088,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82557,7 +83096,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82630,20 +83169,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = 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)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == 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)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -82681,12 +83220,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -82703,8 +83242,8 @@ __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)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -82717,11 +83256,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82746,10 +83285,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82787,17 +83326,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82813,7 +83352,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82963,7 +83502,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+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82990,178 +83529,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + libc.VaList(bp+392, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*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, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; 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+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) 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) @@ -83169,87 +83837,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } 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))&0xf0>>4)) != 0) { - goto __323 + goto __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+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: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83267,14 +83941,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83282,27 +83956,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83316,25 +83990,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83342,50 +84016,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*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: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*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: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83400,31 +84081,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83434,10 +84115,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83457,19 +84138,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83478,86 +84159,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; 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: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x100>>8) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } 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: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83565,60 +84246,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } 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 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83626,10 +84307,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83662,6 +84343,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83673,14 +84362,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83732,7 +84421,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+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83740,7 +84429,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83753,19 +84442,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, 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+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83781,7 +84470,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83929,7 +84618,7 @@ __1: 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+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83945,13 +84634,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+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, 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+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83960,7 +84649,7 @@ __3: 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+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -84028,33 +84717,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18152, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -84114,7 +84803,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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 7, 0x80) @@ -84146,13 +84835,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+18121) + corruptSchema(tls, pData, argv, ts+18249) } 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+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84185,16 +84874,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -84279,7 +84968,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84314,7 +85003,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+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84328,7 +85017,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84511,16 +85200,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84588,20 +85281,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -84613,8 +85306,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84623,7 +85316,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84634,7 +85327,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84654,7 +85347,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84670,100 +85363,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84776,7 +85473,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84875,7 +85572,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -85023,7 +85720,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85198,8 +85895,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85207,13 +85904,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85388,7 +86085,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x20>>5)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85433,7 +86130,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x8>>3)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85444,7 +86141,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x8>>3)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x20>>5) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85488,7 +86185,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // 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. @@ -85835,6 +86532,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -86010,7 +86710,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -86072,16 +86772,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -86091,7 +86791,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86297,8 +86997,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -86437,13 +87137,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } 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+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86451,7 +87151,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+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86541,7 +87241,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86551,7 +87251,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -86567,7 +87267,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86854,7 +87554,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86945,7 +87645,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86965,7 +87665,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -87002,7 +87702,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -87036,11 +87736,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+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -87141,8 +87841,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87189,7 +87889,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87256,7 +87956,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -87318,7 +88018,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -87471,10 +88171,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87728,8 +88428,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87756,13 +88456,13 @@ 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+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87774,7 +88474,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+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87875,7 +88575,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87901,6 +88601,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87917,7 +88618,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87954,7 +88655,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87965,6 +88667,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87989,15 +88692,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88174,9 +88882,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88245,7 +88960,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88261,17 +88975,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x20>>5)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x10>>4)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88292,7 +88997,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -88304,6 +89008,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88459,6 +89174,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88482,8 +89198,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88659,8 +89375,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -88677,6 +89393,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88706,6 +89427,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88739,12 +89461,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 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+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88810,7 +89532,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+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88893,7 +89615,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2000>>13)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -89022,7 +89744,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+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -89048,7 +89770,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 9, 0x200) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -89064,7 +89786,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -89090,7 +89812,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+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, 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 @@ -89101,9 +89823,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 + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89130,9 +89852,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -89150,7 +89872,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+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89262,7 +89984,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89281,7 +90003,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+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -89289,7 +90011,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x100>>8)) != 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+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89390,7 +90112,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89405,7 +90127,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 14, 0xc000) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } @@ -89470,7 +90192,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89482,7 +90204,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 14, 0xc000) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89501,9 +90223,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89513,7 +90235,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+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89663,13 +90385,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89850,19 +90572,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89875,7 +90597,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -90033,7 +90755,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -90132,7 +90853,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90193,7 +90914,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, 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 __15: @@ -90297,7 +91018,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90307,7 +91028,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x80>>7) == 0 || @@ -90339,7 +91060,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, 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), 10, 0x400) @@ -90397,8 +91118,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90432,7 +91156,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90525,16 +91249,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90543,13 +91272,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90561,52 +91290,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90624,111 +91353,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -90747,33 +91476,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -90781,28 +91510,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90813,7 +91542,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -90824,7 +91553,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90850,7 +91579,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90863,27 +91592,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90891,49 +91620,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90947,45 +91676,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -91004,16 +91733,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -91044,16 +91773,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -91066,98 +91795,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x8000>>15) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x2000>>13) == 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -91166,79 +91895,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91313,7 +92042,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -91335,7 +92064,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91431,7 +92160,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91523,7 +92252,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91568,7 +92297,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+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91612,7 +92341,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -91630,7 +92359,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91642,7 +92371,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91657,7 +92386,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91669,22 +92398,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91693,7 +92422,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91722,9 +92451,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91842,7 +92571,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91875,7 +92604,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91900,13 +92629,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*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+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92162,7 +92891,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92201,9 +92930,9 @@ 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 + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92215,7 +92944,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, 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) @@ -92329,12 +93058,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92448,7 +93177,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92499,7 +93228,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -92568,7 +93297,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92631,8 +93360,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92665,26 +93394,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92701,7 +93430,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92894,10 +93623,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -92906,7 +93637,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93268,7 +93999,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -93300,7 +94031,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, 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: @@ -93310,7 +94041,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -94180,7 +94911,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94486,10 +95217,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+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+216)) + ts+20503, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -94580,7 +95311,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+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94612,7 +95343,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94749,23 +95480,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94776,7 +95509,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94785,7 +95518,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94804,7 +95537,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94824,20 +95557,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94882,7 +95617,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94891,7 +95626,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94902,7 +95637,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94913,7 +95648,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -95035,7 +95770,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -95077,7 +95812,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95234,7 +95969,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -95258,7 +95993,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+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95342,11 +96077,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21083, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, 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, @@ -95356,7 +96091,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95390,7 +96125,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -95417,7 +96152,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+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95455,9 +96190,9 @@ 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+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95467,7 +96202,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 + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95479,12 +96214,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, 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 @@ -95537,17 +96272,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95596,10 +96331,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, 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) @@ -95619,8 +96354,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95633,7 +96368,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95675,7 +96410,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -96043,7 +96778,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -96086,7 +96821,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -96113,7 +96848,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96341,31 +97076,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -96374,35 +97091,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96419,29 +97136,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), 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))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96482,11 +97199,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96496,43 +97213,43 @@ 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 + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 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 + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, 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+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, 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+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96564,25 +97281,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, 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+21380, 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+21475, 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+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96943,7 +97660,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 7, 0x80) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 7, 0x80) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96996,104 +97713,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x20>>5) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -97132,7 +97751,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -97152,6 +97771,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97302,12 +97923,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97326,13 +97947,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -97345,7 +97966,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x400>>10)) != 0) { goto __7 @@ -97407,7 +98028,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97554,6 +98175,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97896,13 +98519,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97910,104 +98540,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -98016,92 +98655,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -98111,24 +98744,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -98148,152 +98781,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98302,121 +98936,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x40>>6)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x40>>6)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 7, 0x80) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 7, 0x80) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98425,36 +99059,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x200>>9)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98472,219 +99106,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 6, 0x40) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 6, 0x40) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98694,24 +99328,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98722,41 +99356,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98790,7 +99424,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98798,13 +99432,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -99083,7 +99717,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -99096,7 +99730,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -99120,11 +99754,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -99156,10 +99790,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99301,7 +99935,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99318,10 +99952,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99378,7 +100012,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99564,6 +100198,7 @@ __3: 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 @@ -99619,7 +100254,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99656,12 +100291,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99740,7 +100375,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99834,7 +100469,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -100028,7 +100663,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -100207,7 +100842,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100277,6 +100912,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100303,10 +100941,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x20>>5) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x20>>5) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100326,14 +100964,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x20>>5) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x20>>5) != 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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -100370,14 +101008,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x80 >> 7) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x80 >> 7) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100820,6 +101458,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100829,11 +101479,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100928,7 +101576,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100999,7 +101647,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101233,7 +101881,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101295,11 +101943,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -101367,7 +102013,7 @@ __3: 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+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -101489,9 +102135,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101559,7 +102205,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101908,9 +102554,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101934,7 +102583,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101950,32 +102600,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -102121,7 +102761,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102364,13 +103004,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -102381,7 +103018,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -102436,31 +103074,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -102663,6 +103303,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102794,6 +103492,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102808,6 +103509,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102838,7 +103542,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -102994,7 +103698,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+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103052,7 +103756,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103410,7 +104114,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103422,7 +104126,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103437,7 +104141,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103450,7 +104154,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103551,7 +104255,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103725,7 +104429,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103777,7 +104481,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x10 >> 4) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x10 >> 4) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103805,7 +104509,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103826,7 +104529,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103848,7 +104550,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103910,9 +104612,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103928,7 +104629,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103948,6 +104651,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -104044,8 +104752,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -104057,7 +104765,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -104072,7 +104780,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 5, 0x20) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -104092,7 +104800,7 @@ __3: 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), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 5, 0x20) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -104100,7 +104808,7 @@ __3: } 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), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 5, 0x20) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -104110,7 +104818,7 @@ __3: 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), 4, 0x10) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 4, 0x10) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -104118,7 +104826,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -104150,7 +104858,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104207,10 +104915,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -104254,16 +104962,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104296,7 +105004,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104308,9 +105016,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -104328,6 +105036,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -104414,7 +105174,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -104471,7 +105231,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -104494,31 +105254,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104536,13 +105295,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104553,169 +105312,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104724,26 +105488,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104751,37 +105515,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104789,92 +105553,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __57 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x10>>4)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104884,24 +105654,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104911,96 +105681,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x800>>11)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x1000>>12)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -105008,30 +105778,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -105051,7 +105819,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105187,11 +105955,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105230,6 +105995,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x10>>4)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -105402,7 +106177,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105535,7 +106310,7 @@ 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+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105625,17 +106400,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105681,7 +106456,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105725,12 +106500,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+22130, 0) + ts+22225, 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+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105753,7 +106528,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105923,7 +106698,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -105960,7 +106734,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -106076,7 +106850,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106190,7 +106964,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106255,15 +107029,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, 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 { @@ -106284,7 +107058,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+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106422,7 +107196,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106440,11 +107214,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106925,13 +107699,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107839,19 +108617,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), 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+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107919,7 +108697,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -109016,7 +109794,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109991,21 +110769,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16251, 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+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, 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)) @@ -110748,7 +111526,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110912,7 +111690,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111129,9 +111907,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -111410,19 +112188,19 @@ 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+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111801,9 +112579,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112571,7 +113349,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+2464)) break } } @@ -112592,9 +113370,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112607,7 +113385,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112767,7 +113545,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112780,11 +113558,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112797,9 +113575,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112914,36 +113692,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -113060,7 +113816,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -113331,16 +114087,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -113404,6 +114161,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -113454,6 +114212,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -113602,7 +114361,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -113632,7 +114391,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -113647,7 +114406,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23214, 0) + ts+23309, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113743,7 +114502,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -113754,8 +114513,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -113765,13 +114524,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -113838,23 +114597,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23282 + var zErr uintptr = ts + 23377 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23296 + zErr = ts + 23391 break } case SQLITE_ROW: { - zErr = ts + 23318 + zErr = ts + 23413 break } case SQLITE_DONE: { - zErr = ts + 23340 + zErr = ts + 23435 break } @@ -113872,35 +114631,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23363, - ts + 23376, + ts + 23458, + ts + 23471, uintptr(0), - ts + 23392, - ts + 23417, - ts + 23431, - ts + 23450, - ts + 1470, - ts + 23475, + ts + 23487, ts + 23512, - ts + 23524, - ts + 23539, - ts + 23572, - ts + 23590, - ts + 23615, - ts + 23644, + ts + 23526, + ts + 23545, + ts + 1490, + ts + 23570, + ts + 23607, + ts + 23619, + ts + 23634, + ts + 23667, + ts + 23685, + ts + 23710, + ts + 23739, uintptr(0), - ts + 5834, - ts + 5320, - ts + 23661, - ts + 23679, - ts + 23697, + ts + 5848, + ts + 5334, + ts + 23756, + ts + 23774, + ts + 23792, uintptr(0), - ts + 23731, + ts + 23826, uintptr(0), - ts + 23752, - ts + 23778, - ts + 23801, - ts + 23822, + ts + 23847, + ts + 23873, + ts + 23896, + ts + 23917, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -114015,7 +114774,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -114065,7 +114824,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+23838, 0) + ts+23933, 0) return SQLITE_BUSY } else { @@ -114187,7 +114946,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23901, libc.VaList(bp, zName)) + ts+23996, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114203,6 +114962,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -114212,7 +114974,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -114420,7 +115182,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+23952, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24047, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114513,7 +115275,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -114583,7 +115345,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114593,7 +115355,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -114630,20 +115392,20 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint }() } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23973, 0) + ts+24068, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -114767,7 +115529,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+24041, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24136, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114812,10 +115574,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24047, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24142, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24057, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24152, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114920,7 +115682,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24085, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24180, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114931,17 +115693,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24089, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24184, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24089 + zModeType = ts + 24184 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24095, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24190, zOpt, uint64(4)) == 0) { goto __32 } @@ -114949,7 +115711,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3258 + zModeType = ts + 3272 __32: ; if !(aMode != 0) { @@ -114979,7 +115741,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24195, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114987,7 +115749,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24120, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -115027,7 +115789,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24144, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24239, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -115051,15 +115813,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24160, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24167, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24255, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24262, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24175, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24178, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24181, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17299, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24270, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24273, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24276, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -115174,7 +115936,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -115193,8 +115955,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -115205,10 +115967,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+21707, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21802, 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+24185, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24280, 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) { @@ -115222,7 +115984,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -115239,7 +116001,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115273,9 +116035,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6367 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6381 (*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 + 23187 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23282 (*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) @@ -115380,7 +116142,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24191 + zFilename = ts + 24286 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, func() uint8 { @@ -115498,21 +116260,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24194, + Xsqlite3_log(tls, iErr, ts+24289, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24219) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24314) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24239) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24334) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24246) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24341) } // This is a convenience routine that makes sure that all thread-specific @@ -115623,7 +116385,7 @@ __4: 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 + 1099 + zDataType = ts + 1119 primarykey = 1 __13: ; @@ -115670,14 +116432,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24263, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24358, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115747,6 +116509,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -116323,7 +117088,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24291, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24386, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116356,7 +117121,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -116367,7 +117132,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -116441,7 +117206,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 + 24299 + return ts + 24394 } return uintptr(0) }(), 0) @@ -116536,7 +117301,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -116619,7 +117384,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6167, ts + 6690, ts + 6695, ts + 6177, ts + 6172, ts + 7931, ts + 24322, ts + 24328, + ts + 6181, ts + 6704, ts + 6709, ts + 6191, ts + 6186, ts + 7945, ts + 24417, ts + 24423, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116772,7 +117537,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)(unsafe.Pointer(ts + 24335 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24430 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -116798,7 +117563,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6167, uint32(4)) + jsonAppendRaw(tls, p, ts+6181, uint32(4)) break } @@ -116827,7 +117592,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24352, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24447, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116885,19 +117650,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6167, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6181, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6690, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6704, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6695, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6709, uint32(5)) break } @@ -117442,17 +118207,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6167, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6181, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6690, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6704, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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+6695, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6709, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*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)) @@ -117553,7 +118318,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+24381, -1) + Xsqlite3_result_error(tls, pCtx, ts+24476, -1) } } jsonParseReset(tls, pParse) @@ -117859,7 +118624,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+24396, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24491, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117874,7 +118639,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24400, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24495, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117928,7 +118693,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24426, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24521, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -118033,11 +118798,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24469, uint32(2)) + jsonAppendRaw(tls, bp, ts+24564, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4984, uint32(2)) + jsonAppendRaw(tls, bp, ts+4998, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24472, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24567, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -118078,7 +118843,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6167, uint32(4)) + jsonAppendRaw(tls, bp, ts+6181, uint32(4)) } } if i == argc { @@ -118194,14 +118959,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24475, -1) + ts+24570, -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+24526, -1) + Xsqlite3_result_error(tls, ctx, ts+24621, -1) jsonReset(tls, bp) return } @@ -118296,7 +119061,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118371,9 +119136,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24560 + return ts + 24655 } - return ts + 24564 + return ts + 24659 }()) return __2: @@ -118506,7 +119271,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24571, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24666, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118603,7 +119368,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24574, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24669, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118647,7 +119412,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24577) + ts+24672) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118778,7 +119543,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24660, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24755, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118797,7 +119562,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24666, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24761, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118893,7 +119658,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24666, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24761, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118917,7 +119682,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 + 24671 + zRoot = ts + 24766 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -119033,7 +119798,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+24381, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24476, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -119128,25 +119893,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24689}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24720}, - {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 + 24723}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24727}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24739}, - {FnArg: int8(2), 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 + 24762}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24773}, - {FnArg: int8(-1), 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), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24798}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24817}, - {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 + 24828}, - {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 + 24845}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24784}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24802}, + {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 + 24815}, + {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 + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24834}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24857}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24868}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24880}, + {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 + 24893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24912}, + {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 + 24923}, + {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 + 24940}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -119165,8 +119930,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24863, FpModule: 0}, - {FzName: ts + 24873, FpModule: 0}, + {FzName: ts + 24958, FpModule: 0}, + {FzName: ts + 24968, FpModule: 0}, } type Rtree1 = struct { @@ -119426,11 +120191,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+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24978, 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+24891, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24986, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -119641,7 +120406,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24896, + ts+24991, 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)) @@ -120339,7 +121104,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24978) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25073) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120551,7 +121316,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3649, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -121680,7 +122445,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24992, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25087, 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 { @@ -121692,12 +122457,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25012, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25107, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25139, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121738,7 +122503,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -121923,7 +122688,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25081, 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+25176, 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)) @@ -121946,14 +122711,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25226 + var zFmt uintptr = ts + 25321 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11272, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11286, 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 { @@ -121994,7 +122759,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25282, ts + 5046, ts + 16204, + ts + 25377, ts + 5060, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -122037,19 +122802,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+25287, + ts+25382, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25349, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25444, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25354, + ts+25449, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25418, + ts+25513, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25488, + ts+25583, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -122078,7 +122843,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25537 + zFormat = ts + 25632 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -122090,7 +122855,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+25645, + ts+25740, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122098,18 +122863,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+25690, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25785, 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+12743, 1) + Xsqlite3_str_append(tls, p, ts+12757, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25812, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25739, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25834, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25747, 0) + Xsqlite3_str_appendf(tls, p, ts+25842, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -122124,14 +122889,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25763, - ts + 25816, - ts + 25861, - ts + 25913, - ts + 25967, - ts + 26012, - ts + 26070, - ts + 26125, + ts + 25858, + ts + 25911, + ts + 25956, + ts + 26008, + ts + 26062, + ts + 26107, + ts + 26165, + ts + 26220, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -122160,7 +122925,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26172, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26267, 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 @@ -122168,19 +122933,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26192, + ts+26287, 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+3649, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+26249, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26344, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122222,16 +122987,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26284, - ts + 26327, - ts + 26362, - ts + 26398, + ts + 26379, + ts + 26422, + ts + 26457, + ts + 26493, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -122256,7 +123021,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26435, + Xsqlite3_str_appendf(tls, pSql, ts+26530, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -122268,7 +123033,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26459, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26554, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122291,7 +123056,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122302,14 +123067,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, 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+3649, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -122352,7 +123117,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -122369,7 +123134,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -122387,7 +123152,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26468, ts + 26479} +var azFormat = [2]uintptr{ts + 26563, ts + 26574} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -122425,13 +123190,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10844, 1) + Xsqlite3_str_append(tls, pOut, ts+10858, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26489, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26584, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26495, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26590, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26499, 1) + Xsqlite3_str_append(tls, pOut, ts+26594, 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}))) @@ -122442,7 +123207,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26501, -1) + Xsqlite3_result_error(tls, ctx, ts+26596, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122520,12 +123285,12 @@ 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+26534, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26629, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4048 + return ts + 4062 } - return ts + 1534 + return ts + 1554 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -122544,7 +123309,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+26541, + ts+26636, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122563,7 +123328,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+26586, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26681, libc.VaList(bp+16, iNode)) } } @@ -122577,8 +123342,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26618, - ts + 26672, + ts + 26713, + ts + 26767, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -122593,23 +123358,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+26720, + rtreeCheckAppendMsg(tls, pCheck, ts+26815, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26782, + ts+26877, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26765 + return ts + 26860 } - return ts + 26773 + return ts + 26868 }(), iKey, iVal)) } } @@ -122633,7 +123398,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+26840, libc.VaList(bp, i, iCell, iNode)) + ts+26935, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122653,7 +123418,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+26888, libc.VaList(bp+24, i, iCell, iNode)) + ts+26983, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122670,14 +123435,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+26955, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27050, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26989, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27084, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122685,7 +123450,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+27019, + ts+27114, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122714,14 +123479,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27074, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27169, 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+27105, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27200, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122743,12 +123508,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14479, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14493, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27172, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27267, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122757,12 +123522,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24992, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25087, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27200, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27295, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -122776,8 +123541,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+27231, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27238, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27333, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122785,7 +123550,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27246, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27341, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122800,7 +123565,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27250, -1) + ts+27345, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122808,7 +123573,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6367 + zDb = ts + 6381 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122818,7 +123583,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17841 + return ts + 17969 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -123187,11 +123952,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+27301, 1) + Xsqlite3_str_append(tls, x, ts+27396, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27303, 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+27398, 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+27314, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27409, 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) } @@ -123211,19 +123976,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+27325, 0) + Xsqlite3_str_appendf(tls, x, ts+27420, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27343, 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+27438, 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+27351, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27446, 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+27359, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27454, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27363, 0) + Xsqlite3_str_appendf(tls, x, ts+27458, 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) } @@ -124129,7 +124894,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27376, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27471, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -124138,7 +124903,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27398, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -124146,7 +124911,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26465, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26560, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -124157,7 +124922,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -124182,7 +124947,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -124371,7 +125136,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16204 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16251 (*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 @@ -124381,7 +125146,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27402 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27497 (*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 @@ -124389,7 +125154,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27408 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27503 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124501,7 +125266,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27417, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27512, 0) __4: ; goto geopoly_update_end @@ -124631,14 +125396,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 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+27473) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27568) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124703,7 +125468,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27488, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27583, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124715,25 +125480,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27522}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27535}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27473}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27547}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27570}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27611}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27627}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27604}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27617}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27630}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27568}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27642}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27665}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27679}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27692}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27722}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27639}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27734}, } // Register the r-tree module with database handle db. This creates the @@ -124743,26 +125508,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27658, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27753, 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+27668, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27763, 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+27679, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27774, -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+27402, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27497, 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+27690, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27785, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124816,7 +125581,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24978, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25073, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124883,6 +125648,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -125141,7 +125908,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) return } @@ -125152,7 +125919,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+27700, -1) + Xsqlite3_result_error(tls, context, ts+27795, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -125165,7 +125932,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -125177,7 +125944,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -125253,7 +126020,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27721, uintptr(0), uintptr(0), p+64) + ts+27816, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -125317,7 +126084,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+24891, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24986, 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++ { } @@ -125338,16 +126105,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27892, libc.VaList(bp, func() uintptr { + ts+27987, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28042 + return ts + 28137 } - return ts + 1534 + return ts + 1554 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28083) + ts+28178) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125445,7 +126212,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -125463,7 +126230,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+28208, libc.VaList(bp, zTab))) + ts+28303, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125481,7 +126248,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+28327, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28422, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125499,7 +126266,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28348, libc.VaList(bp+16, zIdx))) + ts+28443, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125522,7 +126289,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28494, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125568,7 +126335,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125583,7 +126350,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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)), 1) if iCid >= 0 { @@ -125623,7 +126390,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+19301, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19396, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125633,18 +126400,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28477, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28572, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28496, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28591, 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+28501, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28596, zName) { bRbuRowid = 1 } } @@ -125656,18 +126423,18 @@ 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+28511, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28606, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28540 + return ts + 28635 } - return ts + 28553 + return ts + 28648 }())) } 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+28562, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28657, 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)), 1) @@ -125681,7 +126448,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+28584, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28679, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -125724,12 +126491,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28611, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14590 + zList = rbuMPrintf(tls, p, ts+28706, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14604 } return zList } @@ -125740,13 +126507,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+28620, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28715, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125768,25 +126535,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+28633, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28728, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28665, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+28688) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28694, ts+28701, ts+4943) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+28783) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28789, ts+28796, ts+4957) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) 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+28709, + ts+28804, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28751, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28846, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125823,12 +126590,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1534 + zSep = ts + 1554 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, 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 @@ -125863,7 +126630,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28771 + zCol = ts + 28866 __7: ; goto __5 @@ -125871,13 +126638,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28779, + zLhs = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28800, + zOrder = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28836, + zSelect = rbuMPrintf(tls, p, ts+28931, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14590 + zSep = ts + 14604 iCol++ goto __1 __2: @@ -125895,12 +126662,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28863, + Xsqlite3_mprintf(tls, ts+28958, 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 + 1534 + zSep = ts + 1554 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -125922,8 +126689,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28911, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14590 + zVector = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14604 goto __15 __15: iCol++ @@ -125934,7 +126701,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28918, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29013, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125961,13 +126728,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1534 - var zAnd uintptr = ts + 1534 + var zCom uintptr = ts + 1554 + var zAnd uintptr = ts + 1554 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125979,9 +126746,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29025, 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 + zType = ts + 1554 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -125991,37 +126758,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 + 28771 + zCol = ts + 28866 } else { - zCol = ts + 28501 + zCol = ts + 28596 } - zType = ts + 1099 + zType = ts + 1119 } 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+28952, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29047, 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 + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28972, + zImpPK = Xsqlite3_mprintf(tls, ts+29067, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28993, + zImpCols = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29026, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29121, 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 + 14590 - zAnd = ts + 21369 + zCom = ts + 14604 + zAnd = ts + 21464 nBind++ } @@ -126055,16 +126822,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1534 + var zS uintptr = ts + 1554 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+29050, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29145, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29062, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29157, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14590 + zS = ts + 14604 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -126072,7 +126839,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29166, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -126084,27 +126851,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29086, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29181, 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 zSep uintptr = ts + 1554 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+29100, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29195, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21464 } } zList = rbuMPrintf(tls, p, - ts+29112, libc.VaList(bp+40, zList)) + ts+29207, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21369 + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21464 } } } @@ -126113,7 +126880,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29175, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29270, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -126127,21 +126894,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+29162, + zList = rbuMPrintf(tls, p, ts+29257, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14590 + zSep = ts + 14604 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29201, + zList = rbuMPrintf(tls, p, ts+29296, 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 + 14590 + zSep = ts + 14604 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29231, + zList = rbuMPrintf(tls, p, ts+29326, 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 + 14590 + zSep = ts + 14604 } } } @@ -126176,19 +126943,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29268 + var zSep uintptr = ts + 29363 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28515, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16092) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16139) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp+8, zIdx))) } break } @@ -126200,15 +126967,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28688 + zDesc = ts + 28783 } else { - zDesc = ts + 1534 + zDesc = ts + 1554 } - z = rbuMPrintf(tls, p, ts+29281, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14590 + z = rbuMPrintf(tls, p, ts+29376, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14604 } } - z = rbuMPrintf(tls, p, ts+29292, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29387, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -126223,12 +126990,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1534 + var zComma uintptr = ts + 1554 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29296) + ts+29391) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -126237,7 +127004,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28543, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126247,25 +127014,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29368, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29463, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28688 + return ts + 28783 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } } - zCols = rbuMPrintf(tls, p, ts+29378, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29473, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29393, + ts+29488, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126275,50 +127042,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1534 + var zComma uintptr = ts + 1554 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1534 + var zPk uintptr = ts + 1554 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, (*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 { - zPk = ts + 29455 + zPk = ts + 29550 } - zSql = rbuMPrintf(tls, p, ts+29468, + zSql = rbuMPrintf(tls, p, ts+29563, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29495 + return ts + 29590 } - return ts + 1534 + return ts + 1554 }())) - zComma = ts + 14590 + zComma = ts + 14604 } 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+29505, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29600, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29512, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29607, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) } } @@ -126331,7 +127098,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29559, + ts+29654, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126368,7 +127135,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29616) + ts+29711) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -126473,7 +127240,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+29682, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29777, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126493,24 +127260,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29702, + ts+29797, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29767, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29862, libc.VaList(bp+128, zTbl, zBind))) } 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+29803, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29898, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126526,7 +127293,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29837, + ts+29932, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126534,31 +127301,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }() } - return ts + 1534 + return ts + 1554 }(), 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+29908, + ts+30003, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29969, + ts+30064, 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 + 29898 + return ts + 29993 } - return ts + 29902 + return ts + 29997 }(), zCollist, zLimit)) } @@ -126583,8 +127350,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6378) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6374) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6392) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6388) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126593,52 +127360,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1534 + return ts + 1554 } - return ts + 30128 + return ts + 30223 }() 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+30137, + ts+30232, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30173 + return ts + 30268 } - return ts + 1534 + return ts + 1554 }(), zBindings))) } 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+30183, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30278, 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 + var zRbuRowid uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30211 + zRbuRowid = ts + 30306 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30223, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30318, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30299 + return ts + 30394 } - return ts + 1534 + return ts + 1554 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30316, + ts+30411, 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+30615, + ts+30710, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126646,14 +127413,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1534 + var zRbuRowid uintptr = ts + 1554 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30714 + zRbuRowid = ts + 30809 } else { - zRbuRowid = ts + 30724 + zRbuRowid = ts + 30819 } } @@ -126666,35 +127433,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28771, 0) + zOrder = rbuMPrintf(tls, p, ts+28866, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14590, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1554, ts+14604, ts+1554) } } 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+30735, + ts+30830, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30783 + return ts + 30878 } - return ts + 1534 + return ts + 1554 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zOrder != 0 { - return ts + 19655 + return ts + 19750 } - return ts + 1534 + return ts + 1554 }(), zOrder, zLimit))) } @@ -126757,12 +127524,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1534 + var zPrefix uintptr = ts + 1554 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30128 + zPrefix = ts + 30223 } - zUpdate = Xsqlite3_mprintf(tls, ts+30789, + zUpdate = Xsqlite3_mprintf(tls, ts+30884, 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) @@ -126789,7 +127556,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -126821,7 +127588,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30819, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30914, 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)), 0) { case RBU_STATE_STAGE: @@ -126891,28 +127658,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6367, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, 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+6367) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30944, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30876, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3272, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30972, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3286, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6367, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6381, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30894, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30990, 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+6367, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126945,11 +127712,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+30960, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31056, 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+24041, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24136, (*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)))) == '?' { @@ -126961,16 +127728,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30992, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367), + zTarget = Xsqlite3_mprintf(tls, ts+31088, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } - return ts + 31024 + return ts + 31120 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1534 + return ts + 1554 } return zExtra }())) @@ -126986,37 +127753,37 @@ 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+31026, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31122, -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+31041, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31137, 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+31058, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31154, -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+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31074, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381, 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+31102, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31198, 0) } } @@ -127045,14 +127812,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31074, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31170, uintptr(0), uintptr(0), uintptr(0)) } } 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+31120, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127161,7 +127928,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -127178,23 +127945,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31155, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31251, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6367) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6381) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6367) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6381) } - zOal = Xsqlite3_mprintf(tls, ts+31180, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31187, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31283, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -127215,12 +127982,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -127314,7 +128078,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23679, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23774, 0) return } @@ -127407,7 +128171,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31194) + ts+31290) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -127415,7 +128179,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31216, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31312, libc.VaList(bp, iCookie+1)) } } } @@ -127436,7 +128200,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31243, + ts+31339, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127466,9 +128230,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31401, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31497, 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+31416, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31512, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127482,10 +128246,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31436, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31532, 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+31461) + ts+31557) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127499,12 +128263,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31569) + ts+31665) } 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+31634) + ts+31730) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127516,7 +128280,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31678, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31774, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127536,15 +128300,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17177) - rbuCopyPragma(tls, p, ts+16288) + rbuCopyPragma(tls, p, ts+17224) + rbuCopyPragma(tls, p, ts+16335) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31703, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31799, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127568,10 +128332,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127666,7 +128430,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31731, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31827, 0) } if rc == SQLITE_OK { @@ -127682,7 +128446,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31180, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31276, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -127698,7 +128462,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31756, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31852, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -127732,7 +128496,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31767, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31863, 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)), -1) } else { @@ -127762,13 +128526,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31839, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31935, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31853) + ts+31949) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127779,7 +128543,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31910) + ts+32006) 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)), 0) @@ -127809,10 +128573,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -127823,7 +128588,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3649, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3663, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -127852,7 +128617,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+31984, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32080, 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 @@ -127870,12 +128635,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32016, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32112, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32048 + return ts + 32144 } - return ts + 32055 + return ts + 32151 }())) } } @@ -127883,7 +128648,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+14479, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14493, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127894,19 +128659,19 @@ 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+16891) - rbuCopyPragma(tls, p, ts+16303) + rbuCopyPragma(tls, p, ts+16938) + rbuCopyPragma(tls, p, ts+16350) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32062, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32158, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6367, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6381, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32078, uintptr(0), uintptr(0), p+64) + db, ts+32174, uintptr(0), uintptr(0), p+64) } } @@ -127960,7 +128725,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32102, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32198, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127987,7 +128752,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30128, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30223, 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++ @@ -128004,7 +128769,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -128017,13 +128782,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14494, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32110, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32206, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -128118,7 +128883,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128135,19 +128900,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14494, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14508, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14479 + zBegin = ts + 14493 } else { - zBegin = ts + 32062 + zBegin = ts + 32158 } 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+32062, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32158, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128155,6 +128920,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -128173,7 +128960,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -128468,7 +129255,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32137, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32233, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128493,7 +129280,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+32160, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32256, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128538,7 +129325,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -131349,7 +132136,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -131391,7 +132178,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -131452,7 +132239,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -131526,13 +132313,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -131594,7 +132381,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -131606,6 +132393,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -131958,7 +132754,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -132126,45 +132922,45 @@ 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+11272) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11286) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32843, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32760, bp+16) + sessionAppendStr(tls, bp, ts+32856, bp+16) 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14590 + zSep = ts + 14604 } } - zSep = ts + 1534 - sessionAppendStr(tls, bp, ts+32695, bp+16) + zSep = ts + 1554 + sessionAppendStr(tls, bp, ts+32791, 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+32771, bp+16) + ts+32867, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21369 + zSep = ts + 21464 } } @@ -132211,42 +133007,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32846, bp+16) + sessionAppendStr(tls, bp, ts+32942, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32695, bp+16) + sessionAppendStr(tls, bp, ts+32791, 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+32766, bp+16) + sessionAppendStr(tls, bp, ts+32862, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21369 + zSep = ts + 21464 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32864, bp+16) + sessionAppendStr(tls, bp, ts+32960, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32407, bp+16) + sessionAppendStr(tls, bp, ts+32503, bp+16) - zSep = ts + 1534 + zSep = ts + 1554 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+32703, bp+16) + sessionAppendStr(tls, bp, ts+32799, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32872 + zSep = ts + 32968 } } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -132259,7 +133055,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6367, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6381, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132270,21 +133066,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32877, bp+16) + sessionAppendStr(tls, bp, ts+32973, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21375, bp+16) + sessionAppendStr(tls, bp, ts+21470, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14590, bp+16) + sessionAppendStr(tls, bp, ts+14604, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32895, bp+16) + sessionAppendStr(tls, bp, ts+32991, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32906, bp+16) + sessionAppendStr(tls, bp, ts+33002, bp+16) } - sessionAppendStr(tls, bp, ts+4943, bp+16) + sessionAppendStr(tls, bp, ts+4957, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -132298,14 +133094,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11272, p) + var rc int32 = sessionSelectRow(tls, db, ts+11286, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32910) + ts+33006) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33023) + ts+33119) } return rc } @@ -132333,7 +133129,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -132586,7 +133382,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33263, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132602,7 +133398,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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33284, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132675,10 +133471,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33207, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33303, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33233, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -132711,7 +133507,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -132724,7 +133520,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6367, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6381, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -132737,19 +133533,19 @@ 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+33263, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33359, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33307, + ts+33403, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33378, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33474, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11272) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11286) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132800,14 +133596,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33492, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33468, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33564, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133321,7 +134117,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -134055,7 +134851,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33520, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33616, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134343,7 +135139,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33644, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134530,7 +135326,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+33579, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33675, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134598,7 +135394,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33586 + var zErr uintptr = ts + 33682 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134757,7 +135553,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1534 + return ts + 1554 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -134780,7 +135576,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33636 + var zErr uintptr = ts + 33732 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -135104,13 +135900,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33684, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33780, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33692, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33788, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33702, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33798, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135521,7 +136317,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6167, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6181, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -135661,7 +136457,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33707, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33803, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135688,14 +136484,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+33714, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33810, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33745, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33841, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135706,7 +136502,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33778, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33874, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135719,7 +136515,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33815, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33911, 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))) @@ -135728,7 +136524,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+33824, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33920, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135747,7 +136543,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33857, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33953, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135762,14 +136558,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33891, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33987, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33899, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33995, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33931, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34027, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135777,9 +136573,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33937, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34033, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33951, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34047, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135787,9 +136583,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33989, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34085, 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+34000, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34096, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -135797,21 +136593,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5061, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5075, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7944, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17282}, - {FzName: ts + 34035, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7958, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34131, 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+34043, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34139, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34170, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135858,15 +136654,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22035) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16204) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34102, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22130) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34198, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34132) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34228) { *(*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+34142, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34238, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135883,13 +136679,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34269, 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+34178, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34274, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34185, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34281, libc.VaList(bp+16, i)) } } } @@ -135927,8 +136723,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+22035) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 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+22130) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34289, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135960,7 +136756,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+34222, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34318, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135969,13 +136765,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1534 + return ts + 1554 }(), pzErr) } else { @@ -135997,19 +136793,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 + 33891 + zTail = ts + 33987 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34242 + zTail = ts + 34338 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34250, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34346, 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+16204, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -136053,18 +136849,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, 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 + 1554 } - return ts + 14590 + return ts + 14604 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34277, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34284, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22035)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34380, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22130)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -136174,7 +136970,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34310) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34406) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -136184,7 +136980,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34411) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -136194,7 +136990,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+34324) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34420) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -136207,7 +137003,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+34334) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34430) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -136217,7 +137013,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+34344) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34440) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -136233,7 +137029,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+22035) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22130) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -136256,7 +137052,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34356 + var zSelect uintptr = ts + 34452 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136278,7 +137074,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34388) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34484) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -136292,7 +137088,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34396, + ts+34492, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136390,7 +137186,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34461, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34557, 0) return FTS5_EOF } } @@ -136403,20 +137199,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+34481, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34577, 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+34512, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34608, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34515, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34611, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29898, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29993, uint64(3)) == 0 { tok = FTS5_AND } break @@ -138183,9 +138979,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34519, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34615, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33548, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33644, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -138201,7 +138997,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+34524, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34620, 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') @@ -138288,7 +139084,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20372, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20467, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138369,7 +139165,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34553, 0) + ts+34649, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138539,12 +139335,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+34606, + ts+34702, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34656 + return ts + 34752 } - return ts + 34519 + return ts + 34615 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139487,7 +140283,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34663, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34759, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -139566,7 +140362,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+34669, + ts+34765, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139591,7 +140387,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34720, + ts+34816, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -139614,7 +140410,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34769, + ts+34865, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139853,7 +140649,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34809, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34905, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -139926,13 +140722,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -141052,7 +141848,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34832, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142245,7 +143041,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1534 + return ts + 1554 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -142411,10 +143207,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -142442,7 +143238,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -142518,7 +143314,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+34916, + ts+35012, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142561,7 +143357,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -142573,7 +143369,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -142693,7 +143489,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -143092,12 +143888,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -143108,7 +143904,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -143289,7 +144085,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -143413,7 +144209,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -143422,7 +144218,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -143454,8 +144250,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -143508,8 +144304,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -143579,7 +144375,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1534, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1554, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -143595,13 +144391,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+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35069, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24891, ts+34981, 0, pzErr) + pConfig, ts+24986, ts+35077, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11412, - ts+35016, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11426, + ts+35112, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143854,7 +144650,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+34663, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34759, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -143968,7 +144764,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35060, + ts+35156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -144127,6 +144923,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -144134,7 +144934,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35146) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35242) 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)) @@ -144405,7 +145205,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR } @@ -144436,7 +145236,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } 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+4961, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -144451,7 +145251,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return uint8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4961, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4975, 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) @@ -144765,7 +145565,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -144797,7 +145597,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -144829,25 +145629,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35190, + ts+35286, 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 + 14590 + return ts + 14604 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bDesc != 0 { - return ts + 35245 + return ts + 35341 } - return ts + 35250 + return ts + 35346 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144893,12 +145693,12 @@ 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+35254, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35350, 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+5043, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5057, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35260, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35356, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144929,7 +145729,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35288, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35384, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144960,7 +145760,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35298, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35394, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144992,14 +145792,14 @@ 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+35319, libc.VaList(bp, z)) + ts+35415, 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 + 33702 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33798 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -145055,7 +145855,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+35151, 0) + ts+35247, 0) return SQLITE_ERROR __1: ; @@ -145098,7 +145898,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145272,7 +146072,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35448, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145393,7 +146193,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3649, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3663, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -145417,28 +146217,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35388, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35484, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35399, 0) + ts+35495, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35479, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35575, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35487, 0) + ts+35583, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16871, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16918, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35543, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35639, 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+35549, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35645, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145496,7 +146296,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17416, z) { + 0 == Xsqlite3_stricmp(tls, ts+17463, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -145509,12 +146309,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35565, + ts+35661, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20273 + return ts + 20368 } - return ts + 35602 + return ts + 35698 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -146144,7 +146944,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+35614, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35710, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146388,7 +147188,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+35635, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35731, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146407,7 +147207,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+35657, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35753, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146454,7 +147254,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35688) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35784) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146463,7 +147263,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35701, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35797, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146477,7 +147277,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35792, ts + 33891, ts + 24891, ts + 34242, ts + 11412, + ts + 35888, ts + 33987, ts + 24986, ts + 34338, ts + 11426, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146501,7 +147301,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35799, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35895, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146519,13 +147319,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35799, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35895, 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+35804, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35900, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146580,17 +147380,17 @@ 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)) = [11]uintptr{ - ts + 35819, - ts + 35887, - ts + 35956, - ts + 35989, - ts + 36028, - ts + 36068, - ts + 36107, - ts + 36148, - ts + 36187, - ts + 36229, - ts + 36269, + ts + 35915, + ts + 35983, + ts + 36052, + ts + 36085, + ts + 36124, + ts + 36164, + ts + 36203, + ts + 36244, + ts + 36283, + ts + 36325, + ts + 36365, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146657,7 +147457,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3649, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -146692,18 +147492,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36292, + ts+36388, 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+36396, + ts+36492, 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+36434, + ts+36530, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146715,7 +147515,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36472, + ts+36568, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146727,14 +147527,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24891, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11412, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35792, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24986, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11426, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35888, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34242, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34338, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33891, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33987, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146746,17 +147546,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36514, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29544 + return ts + 29639 } - return ts + 1534 + return ts + 1554 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36544, + ts+36640, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146793,27 +147593,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36588, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36684, 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+36611, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36707, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33891, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33987, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34242, ts+36617, 0, pzErr) + pConfig, ts+34338, ts+36713, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35792, ts+36649, 1, pzErr) + pConfig, ts+35888, ts+36745, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -147019,12 +147819,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36666, + ts+36762, 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+36716, + ts+36812, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -147032,7 +147832,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34388, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34484, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -147208,7 +148008,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36745, + zSql = Xsqlite3_mprintf(tls, ts+36841, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147390,14 +148190,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33891, bp+48) + rc = fts5StorageCount(tls, p, ts+33987, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34242, bp+56) + rc = fts5StorageCount(tls, p, ts+34338, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147592,9 +148392,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+36777) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147809,7 +148609,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 + 36799 + var zCat uintptr = ts + 36895 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147821,7 +148621,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147832,18 +148632,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+36819) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36915) { 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+36777) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36873) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36884) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36808) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36904) { } else { rc = SQLITE_ERROR } @@ -148119,7 +148919,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)) = uintptr(0) - var zBase uintptr = ts + 36837 + var zBase uintptr = ts + 36933 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148261,7 +149061,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148269,11 +149069,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148281,7 +149081,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148289,7 +149089,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148297,11 +149097,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, 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+36871, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148309,19 +149109,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, 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+36880, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36976, 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+36886, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36982, 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+36891, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148329,11 +149129,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, 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+36899, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148341,7 +149141,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148349,11 +149149,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, 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+36910, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148361,7 +149161,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148369,7 +149169,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148377,7 +149177,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148393,24 +149193,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36926, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36929, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36932, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36922, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148425,137 +149225,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36939, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36954, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37050, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36855, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36951, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36946, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15417, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15464, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 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+37079, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint64(5)) { + } else 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+36891, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36987, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { + } else 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+36998, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36922, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37110, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37121, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37047, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37143, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36914, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37155, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37161, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36918, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37014, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37028, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148570,16 +149370,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37078, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148587,21 +149387,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36959, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37047, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37143, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148609,7 +149409,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37196, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148617,9 +149417,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148634,12 +149434,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37112, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37116, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37212, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148648,7 +149448,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148804,7 +149604,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+37126) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37222) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148984,22 +149784,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36837, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36933, 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 + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37237, 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 + 37147, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37243, 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 + 37154, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37250, 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 @@ -150142,14 +150942,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+37162) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37258) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37166) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37262) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37170) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37266) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37179, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37275, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -150175,19 +150975,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37213, - ts + 37253, - ts + 37288, + ts + 37309, + ts + 37349, + ts + 37384, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23187, *(*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+23282, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37331, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37427, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -150320,11 +151120,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+37364, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37460, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37395, + ts+37491, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -150348,7 +151148,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37446, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37542, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150632,7 +151432,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1534 + zCopy = ts + 1554 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -150743,7 +151543,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37472, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37568, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150765,7 +151565,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37482 + return ts + 37578 } func init() { @@ -151309,7 +152109,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -151619,16 +152419,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -151685,12 +152485,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -151705,6 +152505,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -151726,5 +152527,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_netbsd_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_netbsd_amd64.go index 301e151cc3..7c17e3fa04 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_netbsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_netbsd_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_netbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -D__libc_cond_broadcast=pthread_cond_broadcast -D__libc_cond_destroy=pthread_cond_destroy -D__libc_cond_init=pthread_cond_init -D__libc_cond_signal=pthread_cond_signal -D__libc_cond_wait=pthread_cond_wait -D__libc_mutex_destroy=pthread_mutex_destroy -D__libc_mutex_init=pthread_mutex_init -D__libc_mutex_lock=pthread_mutex_lock -D__libc_mutex_trylock=pthread_mutex_trylock -D__libc_mutex_unlock=pthread_mutex_unlock -D__libc_mutexattr_destroy=pthread_mutexattr_destroy -D__libc_mutexattr_init=pthread_mutexattr_init -D__libc_mutexattr_settype=pthread_mutexattr_settype -D__libc_thr_yield=sched_yield', 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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_netbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400000/sqlite3.c -full-path-comments -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 -D__libc_cond_broadcast=pthread_cond_broadcast -D__libc_cond_destroy=pthread_cond_destroy -D__libc_cond_init=pthread_cond_init -D__libc_cond_signal=pthread_cond_signal -D__libc_cond_wait=pthread_cond_wait -D__libc_mutex_destroy=pthread_mutex_destroy -D__libc_mutex_init=pthread_mutex_init -D__libc_mutex_lock=pthread_mutex_lock -D__libc_mutex_trylock=pthread_mutex_trylock -D__libc_mutex_unlock=pthread_mutex_unlock -D__libc_mutexattr_destroy=pthread_mutexattr_destroy -D__libc_mutexattr_init=pthread_mutexattr_init -D__libc_mutexattr_settype=pthread_mutexattr_settype -D__libc_thr_yield=sched_yield', DO NOT EDIT. package sqlite3 @@ -296,7 +296,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -858,7 +857,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -871,49 +870,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -922,21 +921,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -948,8 +947,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -961,22 +960,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -984,13 +983,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -1005,13 +1004,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 OVERFLOW = 3 @@ -1747,6 +1746,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1777,6 +1777,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1878,6 +1879,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1951,7 +1954,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-11-16 12:10:08 89c459e766ea7e9165d0beeb124708b955a4950d0f4792f457465d71b158d318" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2059,8 +2062,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.0" + SQLITE_VERSION_NUMBER = 3040000 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2505,6 +2508,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3284,7 +3288,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3615,6 +3628,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3625,6 +3639,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5440,6 +5472,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5479,6 +5522,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5529,7 +5573,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5544,6 +5588,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5912,8 +5957,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5930,7 +5974,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -6192,8 +6235,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6538,17 +6581,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6578,6 +6610,13 @@ type RenameCtx1 = struct { FzOld uintptr } +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + var sqlite3azCompileOpt = [51]uintptr{ ts + 7, ts + 27, @@ -6778,7 +6817,7 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1060)) @@ -6793,10 +6832,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1060)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -6806,14 +6841,6 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ ts + 1067, ts + 1071, @@ -7119,7 +7146,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23131) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7256,6 +7283,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7279,6 +7308,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7293,9 +7323,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7664,7 +7697,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -8009,7 +8042,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i { if Xsqlite3_strnicmp(tls, z, ts+1238, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -8662,7 +8695,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -9370,7 +9403,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9406,7 +9439,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9426,7 +9459,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9475,24 +9508,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -11798,20 +11858,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11824,46 +11990,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -14254,183 +14420,183 @@ var azName = [187]uintptr{ ts + 1715, ts + 1723, ts + 1728, - ts + 1734, - ts + 1748, - ts + 1754, - ts + 1764, + ts + 1733, + ts + 1739, + ts + 1753, + ts + 1759, ts + 1769, ts + 1774, - ts + 1777, - ts + 1783, - ts + 1796, - ts + 1806, - ts + 1810, - ts + 1817, - ts + 1824, - ts + 1831, - ts + 1838, - ts + 1848, - ts + 1857, - ts + 1868, - ts + 1877, - ts + 1883, - ts + 1893, - ts + 1903, - ts + 1908, - ts + 1918, - ts + 1929, - ts + 1934, - ts + 1941, - ts + 1952, - ts + 1957, - ts + 1962, - ts + 1968, - ts + 1974, - ts + 1980, + ts + 1779, + ts + 1782, + ts + 1788, + ts + 1795, + ts + 1799, + ts + 1809, + ts + 1816, + ts + 1823, + ts + 1830, + ts + 1837, + ts + 1847, + ts + 1856, + ts + 1867, + ts + 1876, + ts + 1882, + ts + 1892, + ts + 1902, + ts + 1907, + ts + 1917, + ts + 1928, + ts + 1933, + ts + 1940, + ts + 1951, + ts + 1956, + ts + 1961, + ts + 1967, + ts + 1973, + ts + 1979, + ts + 1982, ts + 1986, - ts + 1989, - ts + 1993, - ts + 2004, - ts + 2015, - ts + 2023, - ts + 2032, + ts + 1992, + ts + 2003, + ts + 2014, + ts + 2022, + ts + 2031, ts + 2038, - ts + 2045, - ts + 2053, - ts + 2056, - ts + 2059, - ts + 2062, - ts + 2065, - ts + 2068, + ts + 2046, + ts + 2049, + ts + 2052, + ts + 2055, + ts + 2058, + ts + 2061, + ts + 2064, ts + 2071, - ts + 2078, - ts + 2088, - ts + 2101, - ts + 2112, - ts + 2118, - ts + 2125, - ts + 2130, - ts + 2139, - ts + 2148, - ts + 2155, - ts + 2168, - ts + 2179, - ts + 2184, + ts + 2077, + ts + 2087, + ts + 2100, + ts + 2111, + ts + 2117, + ts + 2124, + ts + 2133, + ts + 2142, + ts + 2149, + ts + 2162, + ts + 2173, + ts + 2178, + ts + 2186, ts + 2192, - ts + 2198, - ts + 2205, - ts + 2217, - ts + 2222, - ts + 2231, - ts + 2236, - ts + 2245, - ts + 2250, + ts + 2199, + ts + 2211, + ts + 2216, + ts + 2225, + ts + 2230, + ts + 2239, + ts + 2244, + ts + 2249, ts + 2255, - ts + 2261, - ts + 2269, - ts + 2277, - ts + 2287, - ts + 2295, - ts + 2302, - ts + 2315, - ts + 2320, - ts + 2332, - ts + 2340, - ts + 2347, - ts + 2358, - ts + 2365, - ts + 2372, - ts + 2382, - ts + 2391, + ts + 2263, + ts + 2271, + ts + 2281, + ts + 2289, + ts + 2296, + ts + 2309, + ts + 2314, + ts + 2326, + ts + 2334, + ts + 2341, + ts + 2352, + ts + 2359, + ts + 2366, + ts + 2376, + ts + 2385, + ts + 2396, ts + 2402, - ts + 2408, - ts + 2419, - ts + 2429, - ts + 2439, + ts + 2413, + ts + 2423, + ts + 2433, + ts + 2440, ts + 2446, - ts + 2452, - ts + 2462, - ts + 2473, - ts + 2477, - ts + 2486, - ts + 2495, - ts + 2502, - ts + 2512, - ts + 2519, - ts + 2528, - ts + 2538, - ts + 2545, - ts + 2553, - ts + 2567, - ts + 2575, - ts + 2589, - ts + 2600, - ts + 2613, + ts + 2456, + ts + 2467, + ts + 2471, + ts + 2480, + ts + 2489, + ts + 2496, + ts + 2506, + ts + 2513, + ts + 2522, + ts + 2532, + ts + 2539, + ts + 2547, + ts + 2561, + ts + 2569, + ts + 2583, + ts + 2594, + ts + 2607, + ts + 2618, ts + 2624, - ts + 2630, - ts + 2642, - ts + 2651, - ts + 2659, - ts + 2668, - ts + 2677, - ts + 2684, - ts + 2692, - ts + 2699, - ts + 2710, - ts + 2724, - ts + 2735, + ts + 2636, + ts + 2645, + ts + 2653, + ts + 2662, + ts + 2671, + ts + 2678, + ts + 2686, + ts + 2693, + ts + 2704, + ts + 2718, + ts + 2729, + ts + 2737, ts + 2743, - ts + 2749, - ts + 2757, - ts + 2765, - ts + 2775, - ts + 2788, - ts + 2798, - ts + 2811, - ts + 2820, - ts + 2831, + ts + 2751, + ts + 2759, + ts + 2769, + ts + 2782, + ts + 2792, + ts + 2805, + ts + 2814, + ts + 2825, + ts + 2833, ts + 2839, - ts + 2845, - ts + 2857, - ts + 2869, - ts + 2877, - ts + 2889, - ts + 2902, - ts + 2912, - ts + 2922, - ts + 2927, - ts + 2939, - ts + 2951, + ts + 2851, + ts + 2863, + ts + 2871, + ts + 2883, + ts + 2896, + ts + 2906, + ts + 2916, + ts + 2921, + ts + 2933, + ts + 2945, + ts + 2955, ts + 2961, - ts + 2967, - ts + 2977, - ts + 2984, - ts + 2996, - ts + 3007, - ts + 3015, - ts + 3024, - ts + 3033, - ts + 3042, - ts + 3049, - ts + 3060, - ts + 3073, - ts + 3083, - ts + 3090, - ts + 3098, + ts + 2971, + ts + 2978, + ts + 2990, + ts + 3001, + ts + 3009, + ts + 3018, + ts + 3027, + ts + 3036, + ts + 3043, + ts + 3054, + ts + 3067, + ts + 3077, + ts + 3084, + ts + 3092, + ts + 3101, ts + 3107, - ts + 3113, - ts + 3121, - ts + 3129, - ts + 3137, - ts + 3147, - ts + 3156, - ts + 3167, + ts + 3115, + ts + 3123, + ts + 3131, + ts + 3141, + ts + 3150, + ts + 3161, + ts + 3171, ts + 3177, - ts + 3183, - ts + 3194, - ts + 3205, - ts + 3210, - ts + 3218, + ts + 3188, + ts + 3199, + ts + 3204, + ts + 3212, } type stat = struct { @@ -14611,35 +14777,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3228, FpCurrent: 0}, + {FzName: ts + 3222, FpCurrent: 0}, + {FzName: ts + 3227, FpCurrent: 0}, {FzName: ts + 3233, FpCurrent: 0}, - {FzName: ts + 3239, FpCurrent: 0}, - {FzName: ts + 3246, FpCurrent: 0}, - {FzName: ts + 3253, FpCurrent: 0}, + {FzName: ts + 3240, FpCurrent: 0}, + {FzName: ts + 3247, FpCurrent: 0}, + {FzName: ts + 3252, FpCurrent: 0}, {FzName: ts + 3258, FpCurrent: 0}, - {FzName: ts + 3264, FpCurrent: 0}, + {FzName: ts + 3268, FpCurrent: 0}, {FzName: ts + 3274, FpCurrent: 0}, - {FzName: ts + 3280, FpCurrent: 0}, + {FzName: ts + 3279}, {FzName: ts + 3285}, - {FzName: ts + 3291}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3305}, - {FzName: ts + 3312}, - {FzName: ts + 3321, FpCurrent: 0}, - {FzName: ts + 3328}, - {FzName: ts + 3338, FpCurrent: 0}, - {FzName: ts + 3345, FpCurrent: 0}, + {FzName: ts + 3293, FpCurrent: 0}, + {FzName: ts + 3299}, + {FzName: ts + 3306}, + {FzName: ts + 3315, FpCurrent: 0}, + {FzName: ts + 3322}, + {FzName: ts + 3332, FpCurrent: 0}, + {FzName: ts + 3339, FpCurrent: 0}, + {FzName: ts + 3353, FpCurrent: 0}, {FzName: ts + 3359, FpCurrent: 0}, {FzName: ts + 3365, FpCurrent: 0}, - {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3378, FpCurrent: 0}, - {FzName: ts + 3386, FpCurrent: 0}, - {FzName: ts + 3391, FpCurrent: 0}, - {FzName: ts + 3398}, - {FzName: ts + 3405, FpCurrent: 0}, - {FzName: ts + 3417, FpCurrent: 0}, - {FzName: ts + 3426, FpCurrent: 0}, - {FzName: ts + 3432}, + {FzName: ts + 3372, FpCurrent: 0}, + {FzName: ts + 3380, FpCurrent: 0}, + {FzName: ts + 3385, FpCurrent: 0}, + {FzName: ts + 3392}, + {FzName: ts + 3399, FpCurrent: 0}, + {FzName: ts + 3411, FpCurrent: 0}, + {FzName: ts + 3420, FpCurrent: 0}, + {FzName: ts + 3426}, } func robustFchown(tls *libc.TLS, fd int32, uid X__uid_t, gid X__gid_t) int32 { @@ -14734,9 +14900,9 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m X__mode_t) int32 { } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3438, libc.VaList(bp, z, fd)) + ts+3432, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3481, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3475, O_RDONLY, int32(m)) < 0 { break } } @@ -14821,7 +14987,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp zPath = ts + 1515 } Xsqlite3_log(tls, errcode, - ts+3491, + ts+3485, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14829,7 +14995,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3233, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3227, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14850,7 +15016,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37964) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -14952,19 +15118,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3522, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3516, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == Nlink_t(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3546, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3540, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > Nlink_t(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3575, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3569, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3602, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3596, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15326,7 +15492,7 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38748) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15586,7 +15752,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3630, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3624, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15604,7 +15770,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3345, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40369), ts+3339, bp+8, 40369) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15621,14 +15787,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3633, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3627, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40410) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40424) } else { rc = SQLITE_OK } @@ -15648,7 +15814,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3264, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3258, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40455) } else { return SQLITE_OK } @@ -15767,7 +15933,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -15903,7 +16069,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41135) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -15931,7 +16097,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3264, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3258, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41192) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -15994,7 +16160,7 @@ __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+3644, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3638, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -16015,7 +16181,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3651, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3645, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -16030,7 +16196,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3228, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41317), ts+3222, zShm, 41317) goto shm_open_err __10: ; @@ -16160,7 +16326,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3299, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3293, zFile, 41461) goto shmpage_out __14: ; @@ -16206,7 +16372,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3386, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3380, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41488) goto shmpage_out __20: ; @@ -16459,10 +16625,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3664, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3658, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3669) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3663) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -16478,7 +16644,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42365) h = -1 } unixLeaveMutex(tls) @@ -16491,7 +16657,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3679, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3673, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16499,7 +16665,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, 41273) + robust_close(tls, pNew, h, 42450) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16512,15 +16678,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3687, - ts + 3696, - ts + 3705, + ts + 3681, + ts + 3690, + ts + 3699, ts + 1528, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3710) - azTempDirs[1] = libc.Xgetenv(tls, ts+3724) + azTempDirs[0] = libc.Xgetenv(tls, ts+3704) + azTempDirs[1] = libc.Xgetenv(tls, ts+3718) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16565,7 +16731,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3731, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3725, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16650,7 +16816,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*X__mode_t)(unsafe.Pointer(pMode)) = X__mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3748) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3742) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16698,10 +16864,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -16815,7 +16981,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3228, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42891), ts+3222, zName, 42891) if !(rc == SQLITE_OK) { goto __20 } @@ -16906,7 +17072,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+3338, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3332, zPath, 43030) } return rc } @@ -16914,9 +17080,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+3755, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3749, zPath, 43040) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43042) } else { rc = SQLITE_OK } @@ -16983,18 +17149,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3426, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43138), ts+3420, zIn, 43138) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(X_S_IFMT) == X__mode_t(X_S_IFLNK) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43144) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+152, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3417, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43149), ts+3411, zIn, 43149) return } *(*int8)(unsafe.Pointer(bp + 152 + uintptr(got))) = int8(0) @@ -17034,14 +17200,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3246, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43207), ts+3240, zPath, 43207) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43213) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17072,7 +17238,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3630, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3624, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -17100,11 +17266,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3761, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3755, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -17115,7 +17281,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, 42137) + robust_close(tls, uintptr(0), fd, 43314) } } @@ -17192,10 +17358,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3774, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3779, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3789, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3669, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3768, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3773, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3783, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3663, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -17250,7 +17416,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3802, + FzName: ts + 3796, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17461,7 +17627,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3808, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3802, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17593,7 +17759,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3630, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3624, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17714,7 +17880,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3823, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3817, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -17787,7 +17953,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3846, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3840, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18533,6 +18699,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18565,6 +18732,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -20991,7 +21159,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3861, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3855, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -22090,7 +22258,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59884) __12: ; if !(rc != SQLITE_OK) { @@ -22151,7 +22319,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3888, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3882, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -22164,7 +22332,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3897, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3891, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -22216,9 +22384,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3902, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3896, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3909, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3903, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22482,7 +22650,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60414) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22606,7 +22774,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60627) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22645,7 +22813,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60659) goto pager_acquire_err __7: ; @@ -22801,6 +22969,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -23674,7 +23843,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, 61071) + return Xsqlite3CorruptError(tls, 62279) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -23859,7 +24028,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3919, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3913, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24431,7 +24600,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64043) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24530,7 +24699,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64175) goto finished __7: ; @@ -24698,7 +24867,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3937, + ts+3931, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -25116,7 +25285,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 64989) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -25261,7 +25430,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3974, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+3968, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25391,7 +25560,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65338) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -25864,7 +26033,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66075) } iKey = walNextHash(tls, iKey) } @@ -26369,7 +26538,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, 65586) + rc = Xsqlite3CorruptError(tls, 66794) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -26760,7 +26929,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4000)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3994)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -27025,7 +27194,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, 67695) + rc = Xsqlite3CorruptError(tls, 68904) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -27162,7 +27331,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69085) return __2: ; @@ -27179,7 +27348,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69098) goto ptrmap_exit __4: ; @@ -27187,7 +27356,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69103) goto ptrmap_exit __5: ; @@ -27230,7 +27399,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69148) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -27240,7 +27409,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69156) } return SQLITE_OK } @@ -27490,7 +27659,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69548) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27522,8 +27691,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27538,7 +27706,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69606) __2: ; if !(iFree != 0) { @@ -27548,7 +27716,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69609) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27561,7 +27729,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69617) __6: ; if !(iFree2 != 0) { @@ -27570,14 +27738,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69620) __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, 68414) + return Xsqlite3CorruptError(tls, 69622) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -27587,7 +27755,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69626) __11: ; __8: @@ -27634,63 +27802,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69659) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69665) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69679) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -27722,10 +27884,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69736) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -27736,15 +27897,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69751) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69758) } return uintptr(0) } @@ -27769,7 +27930,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, 68601) + return Xsqlite3CorruptError(tls, 69807) } } @@ -27780,7 +27941,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, 68619) + return Xsqlite3CorruptError(tls, 69825) } else { return SQLITE_OK } @@ -27828,26 +27989,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69904) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69909) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69921) } 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, 68718) + return Xsqlite3CorruptError(tls, 69924) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -27857,7 +28018,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 69937) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -27865,7 +28026,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 69943) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -27873,10 +28034,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 69952) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 69953) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -27945,7 +28106,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70031) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -27975,11 +28136,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70082) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70087) } 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)))) @@ -27990,15 +28151,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70097) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70101) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70113) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -28026,14 +28187,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70144) } 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, 68943) + return Xsqlite3CorruptError(tls, 70149) } } return SQLITE_OK @@ -28047,7 +28208,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70181) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -28059,7 +28220,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70195) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -28162,7 +28323,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70350) goto getAndInitPage_error1 __1: ; @@ -28190,7 +28351,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, 69165) + rc = Xsqlite3CorruptError(tls, 70371) goto getAndInitPage_error2 __5: ; @@ -28229,7 +28390,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70437) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -28253,7 +28414,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -28302,7 +28463,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4016) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4010) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -29063,7 +29224,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4025, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4019, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -29101,7 +29262,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71372) goto page1_init_failed goto __19 __18: @@ -29516,7 +29677,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71793) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29542,7 +29703,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71812) } 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) @@ -29550,6 +29711,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71821) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29559,7 +29723,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, 70626) + return Xsqlite3CorruptError(tls, 71833) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29575,7 +29739,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71868) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29636,7 +29800,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, 70759) + return Xsqlite3CorruptError(tls, 71966) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -29671,7 +29835,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72018) } } @@ -29731,7 +29895,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72086) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -29770,7 +29934,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72137) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -29801,7 +29965,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72164) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -30142,7 +30306,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, 71421) + return Xsqlite3CorruptError(tls, 72628) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30386,14 +30550,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73035) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73050) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30438,7 +30602,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73112) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30487,7 +30651,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73197) } return rc } @@ -30566,10 +30730,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73334) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30577,7 +30739,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30639,7 +30802,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30659,7 +30822,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, 72267) + return Xsqlite3CorruptError(tls, 73473) __11: ; skip_init: @@ -30679,7 +30842,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73485) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -30891,7 +31054,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73727) __21: ; goto __19 @@ -31095,7 +31258,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73923) __4: ; goto bypass_moveto_root @@ -31160,7 +31323,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74010) goto moveto_index_finish __17: ; @@ -31208,7 +31371,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74042) __24: ; goto moveto_index_finish @@ -31327,7 +31490,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74158) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31487,7 +31650,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74338) __1: ; if !(n > U32(0)) { @@ -31552,7 +31715,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74394) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -31588,7 +31751,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74423) goto end_allocate_page goto __23 __22: @@ -31632,7 +31795,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74457) goto end_allocate_page __32: ; @@ -31744,7 +31907,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74522) goto end_allocate_page __51: ; @@ -31902,7 +32065,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, 73450) + return Xsqlite3CorruptError(tls, 74649) __1: ; if !(pMemPage != 0) { @@ -31959,7 +32122,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74696) goto freepage_out __10: ; @@ -31975,7 +32138,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74707) goto freepage_out __12: ; @@ -32049,7 +32212,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74796) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -32061,7 +32224,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74813) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -32072,7 +32235,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74833) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -32237,7 +32400,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75086) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32509,12 +32672,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, 74194) + return Xsqlite3CorruptError(tls, 75387) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75392) } pData -= uintptr(sz) @@ -32522,7 +32685,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, 74205) + return Xsqlite3CorruptError(tls, 75398) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -32582,7 +32745,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, 74290) + Xsqlite3CorruptError(tls, 75483) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -32671,7 +32834,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75594) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -32787,7 +32950,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75707) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -33105,7 +33268,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76128) goto balance_cleanup __25: ; @@ -33116,7 +33279,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76152) goto balance_cleanup __27: ; @@ -33274,7 +33437,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76253) goto balance_cleanup __55: ; @@ -33348,7 +33511,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76286) goto balance_cleanup __67: ; @@ -33410,7 +33573,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76328) goto balance_cleanup __75: ; @@ -33438,7 +33601,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76361) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -33699,7 +33862,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76561) goto balance_cleanup __121: ; @@ -33891,7 +34054,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76791) } } return SQLITE_OK @@ -33928,6 +34091,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76851) } 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))) @@ -34018,7 +34183,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 76996) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -34041,7 +34206,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77015) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -34121,7 +34286,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77102) __3: ; __1: @@ -34234,7 +34399,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77225) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -34295,7 +34460,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77261) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34333,13 +34498,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77288) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77291) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -34446,7 +34611,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, 76197) + return Xsqlite3CorruptError(tls, 77395) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34469,7 +34634,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, 76220) + return Xsqlite3CorruptError(tls, 77418) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34570,7 +34735,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77515) } } @@ -34578,11 +34743,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77524) } 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, 76330) + return Xsqlite3CorruptError(tls, 77528) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34657,7 +34822,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77619) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -34726,7 +34891,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77735) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -34755,7 +34920,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77783) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -34831,7 +34996,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77873) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -34845,7 +35010,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77880) goto cleardatabasepage_out __3: ; @@ -34979,7 +35144,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, 76786) + return Xsqlite3CorruptError(tls, 77984) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35167,7 +35332,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4029, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4023, 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)) @@ -35192,11 +35357,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4031, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4025, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4054, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4048, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -35217,13 +35382,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4079, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4108, + ts+4102, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -35242,7 +35407,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4162, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4156, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -35253,7 +35418,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4184, libc.VaList(bp+8, iPage)) + ts+4178, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35276,12 +35441,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4223, + ts+4217, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4249 + return ts + 4243 } - return ts + 4254 + return ts + 4248 }(), expected-N, expected)) } @@ -35388,13 +35553,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4275 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4269 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4285, libc.VaList(bp, rc)) + ts+4279, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35405,7 +35570,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4323, libc.VaList(bp+8, rc)) + ts+4317, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35413,14 +35578,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4361, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4355, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4383 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4377 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35437,7 +35602,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4409 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4403 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35462,7 +35627,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4437, + checkAppendMsg(tls, pCheck, ts+4431, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35475,7 +35640,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4467, 0) + checkAppendMsg(tls, pCheck, ts+4461, 0) doCoverageCheck = 0 goto __10 __13: @@ -35491,7 +35656,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4491, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4485, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -35529,7 +35694,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4515, 0) + checkAppendMsg(tls, pCheck, ts+4509, 0) depth = d2 __21: ; @@ -35602,7 +35767,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4540, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4534, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -35619,7 +35784,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4577, + ts+4571, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -35739,7 +35904,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4629 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4623 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)).FzPfx = uintptr(0) @@ -35775,7 +35940,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4645, + ts+4639, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -35785,7 +35950,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4690, 0) + ts+4684, 0) __16: ; __10: @@ -35832,13 +35997,13 @@ __23: 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+4745, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4739, 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+4767, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4761, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -36086,8 +36251,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -36095,7 +36260,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3630, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3624, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -36106,7 +36271,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4801, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4795, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -36121,7 +36286,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4821, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4815, 0) return SQLITE_ERROR } return SQLITE_OK @@ -36141,7 +36306,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4852, 0) + pDestDb, SQLITE_ERROR, ts+4846, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36590,7 +36755,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4892, + Xsqlite3_str_appendf(tls, bp+16, ts+4886, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -37007,6 +37172,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -37022,7 +37200,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -37082,6 +37260,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -37396,7 +37577,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81199) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37628,7 +37809,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3630, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3624, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -37731,7 +37912,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4899 + zNeg = ts + 4893 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -37750,7 +37931,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4901, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4895, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -38054,7 +38235,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, 80627) + return Xsqlite3CorruptError(tls, 81836) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -38069,14 +38250,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81842) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81848) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -38135,6 +38316,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -38159,10 +38343,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -38200,21 +38384,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38563,85 +38755,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 + } + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -38741,6 +38965,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -38768,7 +39002,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -38776,12 +39010,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -38800,7 +39034,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -38851,7 +39087,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -38980,8 +39216,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -38992,10 +39228,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -39006,6 +39238,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -39021,7 +39258,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4906, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4900, 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 @@ -39031,24 +39268,24 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { zColl = ts + 1515 } if libc.Xstrcmp(tls, zColl, ts+1060) == 0 { - zColl = ts + 4911 + zColl = ts + 4905 } - Xsqlite3_str_appendf(tls, bp+144, ts+4913, + Xsqlite3_str_appendf(tls, bp+144, ts+4907, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4899 + return ts + 4893 } return ts + 1515 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4921 + return ts + 4915 } return ts + 1515 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4924, 1) + Xsqlite3_str_append(tls, bp+144, ts+4918, 1) break } @@ -39056,7 +39293,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4926, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4920, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -39064,14 +39301,14 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4935, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4929, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4935, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4929, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } @@ -39083,7 +39320,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4942, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4936, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } @@ -39105,7 +39342,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { zP4 = ts + 1516 } else { - zP4 = ts + 4945 + zP4 = ts + 4939 } break @@ -39113,7 +39350,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+120, pVtab)) break } @@ -39124,20 +39361,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4960, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4954, 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+4965, 1) + Xsqlite3_str_append(tls, bp+144, ts+4959, 1) break } case -4: { - zP4 = ts + 4967 + zP4 = ts + 4961 break } @@ -39162,7 +39399,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4975, ts + 4977, ts + 4979, ts + 4984} +var encnames = [4]uintptr{ts + 4969, ts + 4971, ts + 4973, ts + 4978} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -39264,7 +39501,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39613,8 +39850,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 4989, ts + 4994, ts + 5001, ts + 5004, ts + 5007, ts + 5010, ts + 5013, ts + 5016, - ts + 5024, ts + 5027, ts + 5034, ts + 5042, + ts + 4983, ts + 4988, ts + 4995, ts + 4998, ts + 5001, ts + 5004, ts + 5007, ts + 5010, + ts + 5018, ts + 5021, ts + 5028, ts + 5036, } // Close a VDBE cursor and release all the resources that cursor @@ -39823,7 +40060,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5049, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5043, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -39831,16 +40068,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5061, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5055, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5075, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5069, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5090, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5084, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -39986,7 +40223,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5103, 0) + Xsqlite3VdbeError(tls, p, ts+5097, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -40266,7 +40503,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40276,14 +40513,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40294,16 +40533,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40320,7 +40555,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85570) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -40871,16 +41106,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86497)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -40898,7 +41137,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -40928,7 +41171,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -40962,7 +41205,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86604)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -40985,7 +41228,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -41007,7 +41250,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86648)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -41151,7 +41401,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86811)) return 0 __7: ; @@ -41322,7 +41572,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 86969) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41348,7 +41598,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87002) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41391,7 +41641,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -41459,13 +41709,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5133 + zContext = ts + 5127 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5152 + zContext = ts + 5146 } else { - zContext = ts + 5171 + zContext = ts + 5165 } - zMsg = Xsqlite3_mprintf(tls, ts+5180, + zMsg = Xsqlite3_mprintf(tls, ts+5174, 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) @@ -41496,7 +41746,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41551,7 +41801,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41570,7 +41820,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5216, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5210, 0) return 1 } else { return 0 @@ -41580,7 +41830,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5261, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5255, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41622,14 +41872,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87365) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -41841,6 +42092,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -42037,7 +42292,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5301, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5295, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -42228,7 +42483,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88052) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42303,7 +42558,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5324) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5318) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -42732,35 +42987,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88698) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5334, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5328, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88706) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -42775,7 +43029,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -42807,7 +43061,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42822,7 +43076,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42833,7 +43087,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -42843,7 +43097,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42919,7 +43173,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -43063,7 +43317,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -43081,8 +43335,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -43146,7 +43403,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, 87937) + rc = Xsqlite3MisuseError(tls, 89194) goto preupdate_old_out __1: ; @@ -43290,7 +43547,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, 88039) + rc = Xsqlite3MisuseError(tls, 89296) goto preupdate_new_out __1: ; @@ -43462,7 +43719,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5374, 3) + Xsqlite3_str_append(tls, bp+48, ts+5368, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -43502,7 +43759,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { Xsqlite3_str_appendf(tls, bp+48, ts+1295, 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+4892, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4886, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43517,21 +43774,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5378, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5372, 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+5385, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5379, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5398, 2) + Xsqlite3_str_append(tls, bp+48, ts+5392, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5401, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5395, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5406, 1) + Xsqlite3_str_append(tls, bp+48, ts+5400, 1) } } } @@ -43587,7 +43844,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -43691,12 +43949,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -43790,7 +44047,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -43819,11 +44075,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -43893,42 +44152,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -43936,52 +44196,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -44023,19 +44283,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -44044,7 +44304,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -44052,11 +44312,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44292,7 +44552,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -44787,20 +45047,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5408, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5402, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5429, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5423, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3630, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3624, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5436, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5430, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -45190,14 +45450,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45275,72 +45535,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45357,10 +45625,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -45372,33 +45640,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45407,43 +45675,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45459,26 +45727,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45486,12 +45754,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45506,17 +45774,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45531,163 +45799,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -45696,20 +45964,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -45719,15 +45987,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -45735,9 +46003,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -45749,52 +46017,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -45803,24 +46071,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -45834,13 +46102,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -45849,38 +46117,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -45889,10 +46157,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -45900,10 +46168,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -45911,35 +46179,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -45947,372 +46253,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46320,15 +46627,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92700) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46337,124 +46644,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5460, + Xsqlite3VdbeError(tls, p, ts+5454, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46464,40 +46771,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46515,339 +46822,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -46856,20 +47163,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -46880,244 +47187,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5501, 0) + Xsqlite3VdbeError(tls, p, ts+5495, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5552, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5546, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5574, 0) + ts+5568, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -47126,172 +47433,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5628, 0) + ts+5622, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5683 + return ts + 5677 } return func() uintptr { if iRollback != 0 { - return ts + 5731 + return ts + 5725 } - return ts + 5774 + return ts + 5768 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5815) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5809) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47311,36 +47618,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47348,22 +47655,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47374,24 +47681,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -47399,30 +47706,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47438,10 +47745,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47450,10 +47757,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47473,83 +47780,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 + 1515 -__592: +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47558,31 +47865,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47590,10 +47897,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47614,105 +47921,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -47724,231 +48031,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -47958,85 +48267,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -48044,59 +48353,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 94943) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -48111,121 +48420,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -48233,93 +48542,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48332,7 +48641,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -48347,81 +48656,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48431,38 +48740,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48470,205 +48779,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -48678,90 +48987,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -48770,36 +49079,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -48810,88 +49119,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5843) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96008, ts+5837) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -48903,35 +49212,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -48940,63 +49249,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96213) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -49005,13 +49314,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -49019,20 +49328,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -49042,45 +49351,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -49093,10 +49402,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -49107,10 +49416,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -49118,30 +49427,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5860 + goto __797 +__796: + zSchema = ts + 5854 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5874, + ts+5868, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -49151,36 +49460,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96465) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -49188,10 +49497,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -49223,22 +49532,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -49248,15 +49557,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -49266,17 +49575,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -49286,34 +49595,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49322,48 +49631,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5917, 0) + Xsqlite3VdbeError(tls, p, ts+5911, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -49371,10 +49680,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49396,24 +49705,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49445,78 +49754,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49524,11 +49833,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49544,14 +49853,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -49559,16 +49868,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49576,16 +49885,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49596,10 +49905,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -49622,73 +49931,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3630, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3624, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -49698,22 +50007,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3630, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3624, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -49726,32 +50035,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -49763,70 +50072,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5954, + ts+5948, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6006 + return ts + 6000 } - return ts + 6011 + return ts + 6005 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -49834,17 +50143,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -49854,10 +50163,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -49871,10 +50180,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -49884,69 +50193,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6018, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6012, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -49954,16 +50263,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -49976,17 +50285,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -49996,24 +50305,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50021,52 +50330,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5324, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5318, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -50075,54 +50384,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -50130,69 +50439,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3630, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3624, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -50204,27 +50513,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -50232,42 +50541,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50276,41 +50585,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50324,16 +50633,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50345,25 +50654,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50372,24 +50681,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3630, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3624, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50414,16 +50723,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -50438,66 +50747,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6047, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6041, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -50518,73 +50827,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98409) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3630, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3624, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6053, + Xsqlite3_log(tls, rc, ts+6047, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50592,7 +50901,7 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5301, 0) + Xsqlite3VdbeError(tls, p, ts+5295, 0) rc = SQLITE_TOOBIG goto abort_due_to_error @@ -50609,10 +50918,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6085, ts + 6094, ts + 6101, - ts + 6107} +var azType = [4]uintptr{ts + 6079, ts + 6088, ts + 6095, + ts + 6101} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -50661,16 +50974,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6119, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6113, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6148 + return ts + 6142 } return func() uintptr { if type1 == U32(7) { - return ts + 6153 + return ts + 6147 } - return ts + 6158 + return ts + 6152 }() }())) rc = SQLITE_ERROR @@ -50690,10 +51003,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6166, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6160, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3630, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3624, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -50703,8 +51016,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -50724,7 +51037,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -50744,8 +51057,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -50753,21 +51066,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6186, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6180, 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+6216, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6210, 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+6252, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6246, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -50776,8 +51089,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -50810,8 +51123,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6273, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6267, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -50838,7 +51151,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6294 + zFault = ts + 6288 __22: ; goto __20 @@ -50871,7 +51184,7 @@ __26: 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 + 6306 + zFault = ts + 6300 __29: ; goto __27 @@ -50891,8 +51204,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6314, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6308, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -50961,7 +51274,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -50989,12 +51302,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3630 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3624 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51038,7 +51351,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98880) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51121,7 +51434,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 98980) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51134,7 +51447,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3630 + return ts + 3624 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53555,11 +53868,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -53719,7 +54028,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6348, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6342, zDb) == 0) { goto __8 } @@ -53840,7 +54149,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6353) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6347) != 0) { goto __33 } goto __14 @@ -53996,14 +54305,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6355, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6349, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6359, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6353, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -54020,7 +54329,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6363, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6357, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -54114,7 +54423,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54123,7 +54432,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -54178,7 +54487,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6372, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6366, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -54186,14 +54495,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6403, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6397, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6440, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6434, 0) return WRC_Abort __87: ; @@ -54245,7 +54554,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6458, libc.VaList(bp+16, zCol)) + ts+6452, 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 @@ -54282,7 +54591,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6493 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6487 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54295,23 +54604,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6502 + zErr = ts + 6496 } else { - zErr = ts + 6517 + zErr = ts + 6511 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6539, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6533, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6552, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6546, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6562, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6556, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54414,15 +54723,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6569 + var zIn uintptr = ts + 6563 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6597 + zIn = ts + 6591 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6615 + zIn = ts + 6609 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6633 + zIn = ts + 6627 } - Xsqlite3ErrorMsg(tls, pParse, ts+6651, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6645, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54501,10 +54810,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6671 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6665 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6676 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6670 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54551,7 +54860,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6682, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6676, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54615,7 +54924,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6699, libc.VaList(bp, pExpr)) + ts+6693, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54631,7 +54940,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6763, + Xsqlite3ErrorMsg(tls, pParse, ts+6757, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54645,7 +54954,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6799, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6793, uintptr(0), pExpr) } } else { @@ -54668,30 +54977,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6827, libc.VaList(bp+16, pExpr)) + ts+6821, 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 + 6870 + zType = ts + 6864 } else { - zType = ts + 6877 + zType = ts + 6871 } - Xsqlite3ErrorMsg(tls, pParse, ts+6887, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6881, 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+6915, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6909, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6937, + Xsqlite3ErrorMsg(tls, pParse, ts+6931, 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+6981, + ts+6975, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54763,7 +55072,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7029, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7023, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -54779,7 +55088,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7040, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7034, pExpr, pExpr) } break @@ -54835,7 +55144,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6440, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6434, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -54910,7 +55219,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7051, libc.VaList(bp, i, zType, mx)) + ts+7045, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -54930,7 +55239,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7107, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7101, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -54965,7 +55274,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7141, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7135, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55022,7 +55331,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7147, libc.VaList(bp, i+1)) + ts+7141, libc.VaList(bp, i+1)) return 1 } } @@ -55050,7 +55359,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7208, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7202, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55264,7 +55573,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7239, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7233, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55304,7 +55613,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7141) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7135) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55315,7 +55624,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7278) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7272) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55327,7 +55636,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7284, 0) + ts+7278, 0) return WRC_Abort } @@ -55427,12 +55736,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -55468,12 +55777,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -55592,9 +55901,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -55682,14 +55989,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -56017,7 +56323,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6440, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6434, 0) return } @@ -56092,7 +56398,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7343, libc.VaList(bp, mxHeight)) + ts+7337, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -56260,12 +56566,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56336,10 +56647,10 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7391, + Xsqlite3ErrorMsg(tls, pParse, ts+7385, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7435 + return ts + 7429 } return ts + 1515 }(), nElem)) @@ -56380,7 +56691,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7437) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7431) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56406,7 +56717,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7439, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7433, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56434,7 +56745,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7473, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7467, libc.VaList(bp, pExpr)) } } } @@ -56481,7 +56792,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7493, + Xsqlite3ErrorMsg(tls, pParse, ts+7487, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56506,7 +56817,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7536, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7530, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56527,11 +56838,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56560,7 +56868,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -56656,7 +56968,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -57080,7 +57392,7 @@ __2: 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+7559, + Xsqlite3ErrorMsg(tls, pParse, ts+7553, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57203,7 +57515,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7589, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7583, libc.VaList(bp, zObject)) } } @@ -57213,10 +57525,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -57257,10 +57571,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6671) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6665) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6676) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6670) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -57690,13 +58004,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7612) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7606) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7620) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7614) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7626) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7620) == 0 { return 1 } return 0 @@ -57900,7 +58214,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7630, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7624, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -57978,7 +58292,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7877, + Xsqlite3ErrorMsg(tls, pParse, ts+7871, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59372,7 +59725,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59386,10 +59739,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59402,8 +59755,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59411,12 +59764,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59442,10 +59795,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59456,14 +59807,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59493,27 +59846,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59522,9 +59875,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59532,15 +59885,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7930, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7924, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59571,8 +59924,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7957, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7951, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -59694,8 +60047,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -59716,9 +60069,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -59731,13 +60084,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7559, + Xsqlite3ErrorMsg(tls, pParse, ts+7553, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -59748,11 +60101,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -59774,12 +60127,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -59794,14 +60147,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6440, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6434, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -59809,9 +60186,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -59821,15 +60198,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -59839,22 +60216,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -59863,51 +60240,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7981, 0) + ts+7975, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -59916,18 +60293,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8031)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8025)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -60139,7 +60516,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60376,6 +60753,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60600,6 +60978,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60745,7 +61124,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61272,7 +61655,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61290,8 +61675,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61359,6 +61743,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61382,7 +61768,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61405,7 +61793,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61418,7 +61806,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61438,7 +61828,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61578,7 +61970,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61586,7 +61978,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -61637,11 +62029,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8039, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8033, 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+8047, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8041, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -61653,13 +62045,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8075, + ts+8069, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8250, + ts+8244, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -61669,10 +62061,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8424, libc.VaList(bp, zDb, zDb)) + ts+8418, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8571, 0) + ts+8565, 0) } } @@ -61736,7 +62128,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8722, libc.VaList(bp, zName)) + ts+8716, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -61746,7 +62138,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8781, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8775, zName)) { goto __6 } goto exit_rename_table @@ -61755,7 +62147,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8787, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8781, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -61796,19 +62188,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8814, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8808, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+8998, + ts+8992, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9303, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9297, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9319, + ts+9313, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -61816,7 +62208,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9377, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9371, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -61828,7 +62220,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9642, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9636, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -61840,7 +62232,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9655, + ts+9649, libc.VaList(bp, zErr, zDb, zTab)) } @@ -61886,12 +62278,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9693, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9687, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9725, 0) + ts+9719, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -61901,11 +62293,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9752) + ts+9746) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9811) + ts+9805) } if pDflt != 0 { @@ -61918,12 +62310,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9864) + ts+9858) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9910) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9904) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -61934,7 +62326,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9937, + ts+9931, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -61956,7 +62348,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10083, + ts+10077, libc.VaList(bp+40, zTab, zDb)) } } @@ -62004,14 +62396,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10313, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10307, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10347, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10341, 0) goto exit_begin_add_column __4: ; @@ -62039,7 +62431,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10377, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10371, 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 } @@ -62079,18 +62471,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10396 + zType = ts + 10390 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10401 + zType = ts + 10395 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10415, + Xsqlite3ErrorMsg(tls, pParse, ts+10409, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10433 + return ts + 10427 } - return ts + 10450 + return ts + 10444 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62174,7 +62566,7 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10468, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10462, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; @@ -62191,17 +62583,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10489, + ts+10483, 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+10671, + ts+10665, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9642, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9636, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62396,7 +62788,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -62459,10 +62851,10 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10802, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10796, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10825 + return ts + 10819 } return ts + 1515 }(), zWhen, @@ -62504,8 +62896,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10827, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10821, 7) != 0 { + return Xsqlite3CorruptError(tls, 112700) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62522,7 +62914,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112711) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62544,7 +62936,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10835, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10829, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62584,10 +62976,10 @@ 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+10841, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10835, 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 + 10825 + return ts + 10819 } return ts + 1515 }())) @@ -62763,8 +63155,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -62847,15 +63239,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -62883,7 +63275,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -62916,13 +63308,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -62935,7 +63327,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -62950,7 +63342,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -63006,8 +63398,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -63055,7 +63447,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -63123,8 +63515,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63166,11 +63558,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -63263,8 +63655,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63282,16 +63674,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63306,31 +63698,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63348,8 +63740,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63375,9 +63767,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63405,8 +63797,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -63443,7 +63835,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113647) goto drop_column_done __2: ; @@ -63467,7 +63859,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10846, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10840, 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) @@ -63548,19 +63940,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10468, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10462, libc.VaList(bp, pName)) goto exit_drop_column __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+10853, + Xsqlite3ErrorMsg(tls, pParse, ts+10847, 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 + 10881 + return ts + 10875 } - return ts + 6094 + return ts + 6088 }(), zCol)) goto exit_drop_column @@ -63569,7 +63961,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10893, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10887, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63586,10 +63978,10 @@ __9: renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1515, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10941, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10935, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11062, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11056, 1) 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 @@ -63707,11 +64099,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11080}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11101}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11121}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}} + {FnArg: int8(9), 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 + 11095}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11115}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11153}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -63745,7 +64137,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11182, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11176, 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) } @@ -63754,10 +64146,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+11205, + ts+11199, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11235, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11229, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -63775,9 +64167,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11253, FzCols: ts + 11266}, - {FzName: ts + 11279, FzCols: ts + 11292}, - {FzName: ts + 11320}, + {FzName: ts + 11247, FzCols: ts + 11260}, + {FzName: ts + 11273, FzCols: ts + 11286}, + {FzName: ts + 11314}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -63968,7 +64360,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11333} + FzName: ts + 11327} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -64219,7 +64611,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11343} + FzName: ts + 11337} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -64233,7 +64625,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11353, + Xsqlite3_str_appendf(tls, bp+24, ts+11347, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -64246,7 +64638,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11358, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11352, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64288,7 +64680,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11364, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11358, 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)).FnChar-- @@ -64302,7 +64694,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11370} + FzName: ts + 11364} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64346,7 +64738,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11379, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11373, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64363,7 +64755,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+11253, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11247, 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, -6) @@ -64519,7 +64911,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11389, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11383, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64576,7 +64968,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+11389, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11383, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64623,9 +65015,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+11393) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11387) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11397) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11391) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -64730,15 +65122,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+11401, z) == 0 { + if Xsqlite3_strglob(tls, ts+11395, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11412, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11406, 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+11422, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11416, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -65014,11 +65406,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11279, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11273, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11434, - ts+11488, + ts+11428, + ts+11482, zDb) } return rc @@ -65065,10 +65457,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11253, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11247, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11540, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11534, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65126,7 +65518,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6348, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6342, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -65169,7 +65561,7 @@ __2: goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3802) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3796) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -65185,13 +65577,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11581, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11575, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11584, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11578, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -65205,7 +65597,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11621, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11615, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -65216,7 +65608,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -65269,7 +65661,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11651, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11645, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65286,7 +65678,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11680, 0) + ts+11674, 0) rc = SQLITE_ERROR __23: ; @@ -65358,7 +65750,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11748, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11742, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65436,14 +65828,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11776, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11770, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11797, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11791, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65451,7 +65843,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11823, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11817, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65562,7 +65954,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11845} + FzName: ts + 11839} // Called by the parser to compile an ATTACH statement. // @@ -65575,7 +65967,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11859} + FzName: ts + 11853} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65589,7 +65981,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11873, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11867, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65621,7 +66013,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+11897, + ts+11891, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -65796,7 +66188,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11943, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11937, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -65822,11 +66214,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+11966, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11960, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11972, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11966, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11978, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11972, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -65873,7 +66265,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7620 + zCol = ts + 7614 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -65897,7 +66289,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+12005, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11999, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -65991,6 +66383,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -66018,9 +66412,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -66039,62 +66432,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -66141,13 +66526,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66172,25 +66557,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6348) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6342) == 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+8039, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8033, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12020+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5860+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12014+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5854+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12053) + ts+12047) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5860) + ts+5854) } } } @@ -66211,12 +66596,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8039, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5860) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12020+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8033, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5854) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12014+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12053) + ts+12047) } } } @@ -66245,9 +66630,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12072, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12066, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -66258,21 +66643,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12080 + zMsg = ts + 12074 } else { - zMsg = ts + 12093 + zMsg = ts + 12087 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6552, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6546, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6562, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6556, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66302,12 +66687,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8039, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5860+7) == 0 { - return ts + 12039 + if Xsqlite3_strnicmp(tls, zName, ts+8033, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5854+7) == 0 { + return ts + 12033 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { - return ts + 12020 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12047+7) == 0 { + return ts + 12014 } } return zName @@ -66412,10 +66797,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -66571,11 +66956,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66592,7 +66977,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -66621,7 +67006,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -66665,7 +67050,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5860) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5854) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -66691,7 +67076,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6348, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6342, zName) { goto __3 } @@ -66744,13 +67129,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+12107, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12101, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12124, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12118, libc.VaList(bp, pName1)) return -1 } } else { @@ -66792,9 +67177,9 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8039, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8033, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12144, + Xsqlite3ErrorMsg(tls, pParse, ts+12138, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -66954,9 +67339,9 @@ 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 + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -66972,7 +67357,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12186, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12180, 0) return __4: ; @@ -67000,9 +67385,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10396 + return ts + 10390 } - return ts + 8781 + return ts + 8775 }(), zName) != 0) { goto __8 } @@ -67018,9 +67403,9 @@ __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 + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67051,12 +67436,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12227, + Xsqlite3ErrorMsg(tls, pParse, ts+12221, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10396 + return ts + 10390 } - return ts + 8781 + return ts + 8775 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67071,7 +67456,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12248, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12242, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67106,8 +67491,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -67128,7 +67513,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -67158,7 +67543,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12283, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12277, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67182,7 +67567,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12300, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12294, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67191,7 +67576,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -67202,7 +67587,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12283 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12277 (*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) @@ -67214,7 +67599,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12283, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12277, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -67248,7 +67633,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+12334, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12328, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -67256,13 +67641,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12357, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12351, 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)).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+12364, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12358, 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)).Fn-- @@ -67299,7 +67684,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+12374, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12368, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67463,10 +67848,10 @@ 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+12400, + Xsqlite3ErrorMsg(tls, pParse, ts+12394, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12445, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12439, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -67497,7 +67882,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12486, 0) + ts+12480, 0) } } @@ -67542,7 +67927,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12538, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12532, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67631,7 +68016,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12579, 0) + ts+12573, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -67657,7 +68042,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -67726,7 +68111,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12635, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12629, 0) goto generated_done __2: ; @@ -67739,13 +68124,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12678, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12672, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12686, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12680, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -67778,7 +68163,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12693, + Xsqlite3ErrorMsg(tls, pParse, ts+12687, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -67900,12 +68285,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1515 - zSep2 = ts + 12724 - zEnd = ts + 4924 + zSep2 = ts + 12718 + zEnd = ts + 4918 } else { - zSep = ts + 12726 - zSep2 = ts + 12730 - zEnd = ts + 12735 + zSep = ts + 12720 + zSep2 = ts + 12724 + zEnd = ts + 12729 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -67913,7 +68298,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12738, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12732, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -67947,16 +68332,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3630, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3624, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ ts + 1515, + ts + 12746, ts + 12752, - ts + 12758, - ts + 12763, - ts + 12768, + ts + 12757, + ts + 12762, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -68095,8 +68480,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -68223,7 +68608,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -68247,7 +68632,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -68363,10 +68748,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+12774, + ts+12768, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1515))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12807, + Xsqlite3ErrorMsg(tls, pParse, ts+12801, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68385,11 +68770,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+12834, 0) + ts+12828, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12884, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12878, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68423,7 +68808,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12916, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12910, 0) return } } @@ -68448,11 +68833,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8781 - zType2 = ts + 12960 + zType = ts + 8775 + zType2 = ts + 12954 } else { - zType = ts + 10396 - zType2 = ts + 12966 + zType = ts + 10390 + zType2 = ts + 12960 } if pSelect != 0 { @@ -68514,7 +68899,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -68523,11 +68908,11 @@ 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+12971, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12965, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12986, + ts+12980, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68543,13 +68928,13 @@ 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+13084, + ts+13078, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13126, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13120, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68564,7 +68949,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9303) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9297) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68594,7 +68979,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+13160, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13154, 0) goto create_view_fail __1: ; @@ -68610,7 +68995,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10396, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10390, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -68673,10 +69058,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -68694,12 +69076,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13196, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13190, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -68759,6 +69137,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -68818,13 +69203,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13226, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13220, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13241, + ts+13235, 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) } @@ -68865,10 +69250,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13308, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13302, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11205, + ts+11199, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -68900,12 +69285,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13322, + ts+13316, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13367, + ts+13361, 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) @@ -68933,11 +69318,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8039, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3253, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8033, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3247, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7040, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7034, 10) == 0 { return 0 } return 1 @@ -69015,9 +69400,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -69076,21 +69461,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13434, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13428, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13462, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13456, 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+13496, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13490, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69102,7 +69487,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11397, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11391, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69166,7 +69551,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13528, + ts+13522, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -69178,7 +69563,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13591, 0) + ts+13585, 0) goto fk_end goto __7 __6: @@ -69263,7 +69648,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13685, + ts+13679, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -69490,12 +69875,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13731, + Xsqlite3ErrorMsg(tls, pParse, ts+13725, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13759 + return ts + 13753 } - return ts + 13765 + return ts + 13759 }())) return 1 } @@ -69616,7 +70001,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13770, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13764, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -69635,7 +70020,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13776, + ts+13770, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -69661,26 +70046,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8039, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8033, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13826, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13820, 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+13854, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13848, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13879, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13873, 0) goto exit_create_index __17: ; @@ -69694,7 +70079,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13770, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13764, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -69706,10 +70091,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13913, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13907, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -69721,7 +70106,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13947, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13941, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -69750,7 +70135,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13971, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13965, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -69771,9 +70156,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -69812,7 +70197,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13770) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13764) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -69913,7 +70298,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13994, 0) + ts+13988, 0) goto exit_create_index __56: ; @@ -69927,6 +70312,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -69947,6 +70333,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -70128,7 +70515,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14055, libc.VaList(bp+48, 0)) + ts+14049, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70180,8 +70567,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14097, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14091, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121013) goto exit_create_index __101: ; @@ -70227,12 +70614,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14114, + zStmt = Xsqlite3MPrintf(tls, db, ts+14108, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1515 } - return ts + 14134 + return ts + 14128 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70240,7 +70627,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14142, + ts+14136, 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, @@ -70254,7 +70641,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14201, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14195, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70415,7 +70802,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14228, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14222, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70430,7 +70817,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14246, libc.VaList(bp+8, 0)) + ts+14240, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70441,9 +70828,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70469,9 +70856,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14319, + ts+14313, 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+11393, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11387, (*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) @@ -70552,6 +70939,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70559,7 +70947,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70605,7 +70993,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+14379, + Xsqlite3ErrorMsg(tls, pParse, ts+14373, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -70740,6 +71128,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -70751,11 +71140,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -70782,7 +71173,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -70810,12 +71201,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14415, + Xsqlite3ErrorMsg(tls, pParse, ts+14409, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14451 + return ts + 14445 } - return ts + 14454 + return ts + 14448 }())) goto append_from_error __1: @@ -70984,7 +71375,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14460, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14454, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71020,9 +71411,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14466 + return ts + 14460 } - return ts + 14475 + return ts + 14469 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71047,7 +71438,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14460, ts + 14482, ts + 14466} +var az = [3]uintptr{ts + 14454, ts + 14476, ts + 14460} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71062,7 +71453,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14490, 0) + ts+14484, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71080,7 +71471,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11966, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11960, 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+14574, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14568, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71366,7 +71757,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14583, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14577, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71462,7 +71853,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+14629, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14623, libc.VaList(bp, zName)) } } } @@ -71562,7 +71953,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71576,7 +71967,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -71655,7 +72046,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14659, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14653, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -71782,7 +72173,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -71816,7 +72207,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -71839,26 +72230,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -71924,10 +72316,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14684, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -71940,19 +72348,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14690, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14717, 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+14719, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14746, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -72179,17 +72589,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -72202,10 +72614,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -72214,15 +72626,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -72231,98 +72643,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72330,138 +72742,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14757) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14784) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72564,7 +72981,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+11253) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11247) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -72794,7 +73211,7 @@ 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 + 6158, ts + 6153, ts + 7912, ts + 7907, ts + 6148} +var azType2 = [5]uintptr{ts + 6152, ts + 6147, ts + 7906, ts + 7901, ts + 6142} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -72853,7 +73270,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14770, -1) + Xsqlite3_result_error(tls, context, ts+14797, -1) return } iVal = -iVal @@ -73157,7 +73574,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14787, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14814, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73347,7 +73764,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73460,13 +73877,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73489,7 +73920,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14792, -1) + Xsqlite3_result_error(tls, context, ts+14819, -1) return } if argc == 3 { @@ -73499,7 +73930,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14825, -1) + ts+14852, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73552,7 +73983,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3630, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3624, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73592,13 +74023,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4892, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4886, 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+14870, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14897, libc.VaList(bp+8, r1)) } } break @@ -73635,7 +74066,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14877, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14904, libc.VaList(bp+24, zArg)) break } @@ -73951,7 +74382,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10825} +var azOne = [1]uintptr{ts + 10819} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -73987,7 +74418,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14880, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14907, 4, uintptr(0)) } } @@ -74012,7 +74443,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12005, -1) + Xsqlite3_result_error(tls, context, ts+11999, -1) return } @@ -74090,7 +74521,7 @@ func sumFinalize(tls *libc.TLS, context 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+14770, -1) + Xsqlite3_result_error(tls, context, ts+14797, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74352,7 +74783,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14885, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14912, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74372,14 +74803,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14891, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14918, 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+14891, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14918, 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+14891, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14891, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14918, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14918, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74619,107 +75050,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 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_compare)), FxSFunc: 0, FzName: ts + 14916}, - {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 + 14929}, - {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 + 14947}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14956}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14964}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14964}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14979}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15005}, - {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(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 + 15039}, - {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 + 15050}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), 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(1)), FxSFunc: 0, FzName: ts + 15071}, - {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 + 15071}, - {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 + 15077}, - {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 + 15077}, - {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 + 15083}, - {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 + 15083}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15088}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15088}, - {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 + 15088}, - {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 + 15092}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15092}, - {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 + 15092}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), 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 + 15118}, - {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 + 15131}, - {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 + 15146}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15151}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15155}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15155}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15161}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15177}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15191}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15202}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15209}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15224}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | 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 + 15252}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15258}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15276}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15284}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15298}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15306}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15315}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15315}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15322}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15322}, - {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(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15336}, - {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 + 15342}, - {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 + 15346}, - {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 + 15346}, - {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 + 15352}, - {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 + 15352}, - {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 + 15365}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14891}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14891}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6493}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6493}, - {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), FpUserData: 0, FxSFunc: 0, FzName: ts + 15375}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15383}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15395}, - {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 + 15398}, - {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 + 15402}, - {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 + 15408}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15398}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15413}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(2), 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 + 15427}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15431}, - {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 + 15441}, - {FnArg: int8(2), 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 + 15452}, - {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 + 15460}, - {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 + 15469}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15474}, + {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 + 14923}, + {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 + 14943}, + {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 + 14956}, + {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 + 14974}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14983}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14991}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14991}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15032}, + {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 + 15057}, + {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 + 15066}, + {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 + 15077}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15084}, + {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 + 15098}, + {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 + 15098}, + {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 + 15104}, + {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 + 15104}, + {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 + 15110}, + {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 + 15110}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15115}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15115}, + {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 + 15115}, + {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 + 15119}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15119}, + {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 + 15119}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15123}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15130}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15138}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15145}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15151}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15178}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15188}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15194}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15200}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15204}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15211}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15218}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15229}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15236}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15251}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15285}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15311}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15333}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15349}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15349}, + {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 + 15359}, + {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 + 15363}, + {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 + 15369}, + {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 + 15373}, + {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 + 15373}, + {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 + 15379}, + {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 + 15379}, + {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 + 15392}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14918}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14918}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6487}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6487}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, + {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 + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15422}, + {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 + 15425}, + {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 + 15429}, + {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 + 15435}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15444}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15448}, + {FnArg: int8(2), 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 + 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(2), 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 + 15485}, + {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 + 15487}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15518}, - {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_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6493}, - {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 + 15526}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15496}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15501}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15506}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15524}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15537}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15548}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6487}, + {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 + 15553}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -74840,7 +75271,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+15530, + ts+15557, 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) @@ -75500,8 +75931,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6359, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6355, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6353, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6349, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75580,7 +76011,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5103) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5097) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -75683,7 +76114,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -75791,6 +76222,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -75831,13 +76283,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -75849,21 +76300,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -75934,7 +76375,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -75992,7 +76433,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7877, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7871, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76295,6 +76736,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76458,7 +76901,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15575, + ts+15602, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -76483,7 +76926,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15616, + Xsqlite3ErrorMsg(tls, pParse, ts+15643, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76632,7 +77075,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15648, + ts+15675, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -76642,7 +77085,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15700, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15727, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -76694,7 +77137,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15725, + Xsqlite3ErrorMsg(tls, pParse, ts+15752, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -76702,7 +77145,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15771, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15798, 0) goto insert_cleanup __57: ; @@ -76884,7 +77327,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -76899,137 +77355,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -77041,64 +77497,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15792) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15819) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -77106,7 +77566,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77409,7 +77873,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11966, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11960, 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) @@ -78500,7 +78964,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 130978) __1: ; if !(zSql == uintptr(0)) { @@ -78945,6 +79409,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -78983,7 +79448,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12005, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11999, 0) __3: ; return SQLITE_ERROR @@ -78992,7 +79457,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15806 + zEntry = ts + 15833 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79007,7 +79472,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11966, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11960, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79043,7 +79508,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15829, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15856, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79057,7 +79522,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15838, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15865, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79081,7 +79546,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15842, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15869, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79099,7 +79564,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15848, libc.VaList(bp+16, zEntry, zFile)) + ts+15875, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -79126,7 +79591,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15891, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15918, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -79164,7 +79629,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15923, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15950, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -79174,7 +79639,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15960, + ts + 15987, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79330,7 +79795,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15963, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+15990, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79338,63 +79803,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5024, - ts + 16002, - ts + 8781, - ts + 16006, - ts + 16011, - ts + 16014, - ts + 16024, - ts + 16034, - ts + 16040, - ts + 16044, - ts + 16049, - ts + 16054, - ts + 16062, - ts + 16073, + ts + 5018, + ts + 16029, + ts + 8775, + ts + 16033, + ts + 16038, + ts + 16041, + ts + 16051, + ts + 16061, + ts + 16067, + ts + 16071, + ts + 16076, + ts + 16081, + ts + 16089, + ts + 16100, + ts + 16103, + ts + 16110, + ts + 16071, ts + 16076, - ts + 16083, - ts + 16044, - ts + 16049, - ts + 16090, - ts + 16095, - ts + 16098, - ts + 16105, - ts + 16040, - ts + 16044, - ts + 16111, - ts + 16116, - ts + 16121, - ts + 16044, + ts + 16117, + ts + 16122, ts + 16125, - ts + 16049, - ts + 16133, - ts + 16137, - ts + 16142, - ts + 11397, - ts + 11393, + ts + 16132, + ts + 16067, + ts + 16071, + ts + 16138, + ts + 16143, ts + 16148, - ts + 16153, - ts + 16158, - ts + 16002, - ts + 16044, - ts + 16163, - ts + 16170, - ts + 16177, - ts + 8781, + ts + 16071, + ts + 16152, + ts + 16076, + ts + 16160, + ts + 16164, + ts + 16169, + ts + 11391, + ts + 11387, + ts + 16175, + ts + 16180, ts + 16185, - ts + 5027, - ts + 16191, - ts + 16002, - ts + 16044, - ts + 16196, - ts + 16201, - ts + 15398, - ts + 16206, - ts + 16219, + ts + 16029, + ts + 16071, + ts + 16190, + ts + 16197, + ts + 16204, + ts + 8775, + ts + 16212, + ts + 5021, + ts + 16218, + ts + 16029, + ts + 16071, + ts + 16223, ts + 16228, - ts + 16235, + ts + 15425, + ts + 16233, ts + 16246, + ts + 16255, + ts + 16262, + ts + 16273, } // Definitions of all built-in pragmas @@ -79412,238 +79877,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16254, + {FzName: ts + 16281, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16269, + {FzName: ts + 16296, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16284, + {FzName: ts + 16311, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16296, + {FzName: ts + 16323, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16312, + {FzName: ts + 16339, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16235, + {FzName: ts + 16262, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16325, + {FzName: ts + 16352, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16337, + {FzName: ts + 16364, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16357, + {FzName: ts + 16384, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16373, + {FzName: ts + 16400, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16394, + {FzName: ts + 16421, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16409, + {FzName: ts + 16436, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16425, + {FzName: ts + 16452, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16439, + {FzName: ts + 16466, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16452, + {FzName: ts + 16479, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16466, + {FzName: ts + 16493, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16485, + {FzName: ts + 16512, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16504, + {FzName: ts + 16531, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16527, + {FzName: ts + 16554, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16536, + {FzName: ts + 16563, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16554, + {FzName: ts + 16581, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16571, + {FzName: ts + 16598, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16584, + {FzName: ts + 16611, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16599, + {FzName: ts + 16626, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16617, + {FzName: ts + 16644, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16627, + {FzName: ts + 16654, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16641, + {FzName: ts + 16668, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16657, + {FzName: ts + 16684, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16682, + {FzName: ts + 16709, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16701, + {FzName: ts + 16728, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16712, + {FzName: ts + 16739, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16723, + {FzName: ts + 16750, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16735, + {FzName: ts + 16762, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16751, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16764, + {FzName: ts + 16791, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16810, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16802, + {FzName: ts + 16829, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16815, + {FzName: ts + 16842, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16830, + {FzName: ts + 16857, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16840, + {FzName: ts + 16867, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16852, + {FzName: ts + 16879, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16861, + {FzName: ts + 16888, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16872, + {FzName: ts + 16899, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16882, + {FzName: ts + 16909, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16894, + {FzName: ts + 16921, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16905, + {FzName: ts + 16932, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16917, + {FzName: ts + 16944, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16934, + {FzName: ts + 16961, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16953, + {FzName: ts + 16980, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16979, + {FzName: ts + 17006, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 16994, + {FzName: ts + 17021, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17008, + {FzName: ts + 17035, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17027, + {FzName: ts + 17054, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17041, + {FzName: ts + 17068, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17057, + {FzName: ts + 17084, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17069, + {FzName: ts + 17096, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17080, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17091, + {FzName: ts + 17118, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17103, + {FzName: ts + 17130, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17114, + {FzName: ts + 17141, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17135, + {FzName: ts + 17162, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17143, + {FzName: ts + 17170, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17158, + {FzName: ts + 17185, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17171, + {FzName: ts + 17198, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17190, + {FzName: ts + 17217, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17205, + {FzName: ts + 17232, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -79665,7 +80130,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17221)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17248)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -79677,10 +80142,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17246) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17273) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17256) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17283) { return PAGER_LOCKINGMODE_NORMAL } } @@ -79689,13 +80154,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7925) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7919) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17263) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17290) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17268) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17295) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -79710,9 +80175,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16196) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16223) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17280) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17307) == 0 { return 2 } else { return 0 @@ -79726,7 +80191,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17287, 0) + ts+17314, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -79817,19 +80282,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17349 + zName = ts + 17376 break case OE_SetDflt: - zName = ts + 17358 + zName = ts + 17385 break case OE_Cascade: - zName = ts + 17370 + zName = ts + 17397 break case OE_Restrict: - zName = ts + 17378 + zName = ts + 17405 break default: - zName = ts + 17387 + zName = ts + 17414 break } return zName @@ -79846,7 +80311,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17397, ts + 17404, ts + 17412, ts + 17416, ts + 17280, ts + 17425, + ts + 17424, ts + 17431, ts + 17439, ts + 17443, ts + 17307, ts + 17452, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -79893,13 +80358,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17429 + zType = ts + 17456 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17431 + zType = ts + 17458 } else { - zType = ts + 7435 + zType = ts + 7429 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17433, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17460, 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), @@ -79907,7 +80372,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17440, ts + 17445, ts + 17453} +var azEnc = [4]uintptr{uintptr(0), ts + 17467, ts + 17472, ts + 17480} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -79932,8 +80397,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(608) - defer tls.Free(608) + bp := tls.Alloc(664) + defer tls.Free(664) var zLeft uintptr var zRight uintptr @@ -80040,13 +80505,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -80066,6 +80540,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -80116,7 +80592,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -80131,7 +80607,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -80141,7 +80617,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17461, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17488, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -80158,30 +80634,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3630, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3624, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80402,7 +80878,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17465) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17492) == 0) { goto __64 } b = 2 @@ -80436,7 +80912,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -80445,36 +80921,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17256 + zRet = ts + 17283 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80512,7 +80988,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17246 + zRet = ts + 17273 __83: ; returnSingleText(tls, v, zRet) @@ -80593,21 +81069,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -80649,15 +81125,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -80694,14 +81170,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -80758,11 +81234,11 @@ __116: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __118 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+504) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 504)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+544) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 544)) == 0) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+17470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17497, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __119: @@ -80781,7 +81257,7 @@ __120: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __121 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+16, zRight)) goto __122 __121: Xsqlite3_temp_directory = uintptr(0) @@ -80803,7 +81279,7 @@ __123: goto __125 } Xsqlite3ErrorMsg(tls, pParse, - ts+17495, 0) + ts+17522, 0) goto __126 __125: if !(iDb != 1) { @@ -80857,7 +81333,7 @@ __132: __134: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17548) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17575) == 0) { goto __135 } @@ -80954,9 +81430,9 @@ __148: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17554 + return ts + 17581 } - return ts + 17562 + return ts + 17589 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -81025,13 +81501,13 @@ __163: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __164 } - zSql = Xsqlite3MPrintf(tls, db, ts+17569, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17596, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __165 } - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+512, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 512))) + *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+552, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 552))) Xsqlite3DbFree(tls, db, zSql) __165: ; @@ -81071,29 +81547,29 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __171 } - zType = ts + 10396 + zType = ts + 10390 goto __172 __171: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __173 } - zType = ts + 12678 + zType = ts + 12672 goto __174 __173: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __175 } - zType = ts + 17585 + zType = ts + 17612 goto __176 __175: - zType = ts + 8781 + zType = ts + 8775 __176: ; __174: ; __172: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17592, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17619, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -81159,7 +81635,7 @@ __183: goto __185 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17599, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17626, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -81169,7 +81645,7 @@ __183: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __186 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17604, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17631, 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)))) @@ -81206,12 +81682,12 @@ __189: if !(pIdx1 != 0) { goto __191 } - *(*[3]uintptr)(unsafe.Pointer(bp + 520)) = [3]uintptr{ts + 17609, ts + 17611, ts + 16073} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17613, + *(*[3]uintptr)(unsafe.Pointer(bp + 560)) = [3]uintptr{ts + 17636, ts + 17638, ts + 16100} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17640, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 520 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 560 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __190 __190: @@ -81240,7 +81716,7 @@ __192: goto __193 __195: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17619, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17646, 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))) @@ -81256,13 +81732,13 @@ __194: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __196: if !(p != 0) { goto __198 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17623, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17650, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __197 __197: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81301,7 +81777,7 @@ __200: goto __201 __201: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __205: if !(j != 0) { goto __207 @@ -81320,13 +81796,13 @@ __207: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __208: if !(j1 != 0) { goto __210 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7435, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7429, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __209 __209: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81342,7 +81818,7 @@ __211: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __213 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7435, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7429, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __212 __212: i6++ @@ -81377,7 +81853,7 @@ __219: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __221 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17626, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17653, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81385,7 +81861,7 @@ __219: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17635)) + ts+17662)) goto __220 __220: j2++ @@ -81458,20 +81934,20 @@ __228: goto __229 __231: ; - *(*uintptr)(unsafe.Pointer(bp + 544)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 584)) = 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+544, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+584, uintptr(0)) if !(x1 == 0) { goto __232 } - if !(*(*uintptr)(unsafe.Pointer(bp + 544)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 584)) == uintptr(0)) { goto __234 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __235 __234: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 544)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 544))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 584)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 584))) __235: ; goto __233 @@ -81509,12 +81985,12 @@ __238: goto __240 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 544)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 584)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) if !(pParent != 0) { goto __241 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+544, bp+552) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+584, bp+592) __241: ; @@ -81531,8 +82007,8 @@ __243: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __245 } - if *(*uintptr)(unsafe.Pointer(bp + 552)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 592)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -81545,11 +82021,11 @@ __244: goto __245 __245: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 544)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 584)) != 0) { goto __246 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 544))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 584))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __247 @@ -81574,10 +82050,10 @@ __249: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __250: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17640, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17667, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))) goto __239 __239: i8++ @@ -81615,17 +82091,17 @@ __252: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 600)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __253 } - if !(Xsqlite3GetInt32(tls, zRight, bp+560) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+600) != 0) { goto __254 } - if !(*(*int32)(unsafe.Pointer(bp + 560)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 600)) <= 0) { goto __256 } - *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 600)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __256: ; goto __255 @@ -81641,7 +82117,7 @@ __255: ; __253: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 560))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 600))-1, 1) i9 = 0 __257: @@ -81791,7 +82267,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+17644, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17671, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -81818,178 +82294,307 @@ __286: goto __284 __287: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __288 } + pPk1 = uintptr(0) + r2 = 0 + goto __289 +__288: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__289: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+564, bp+568) + 1, uintptr(0), bp+604, bp+608) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__288: +__290: if !(pIdx5 != 0) { - goto __290 + goto __292 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __289 -__289: + goto __291 +__291: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __288 goto __290 -__290: + goto __292 +__292: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 564)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 604)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__293: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __294 + } + mxCol-- + goto __293 +__294: + ; + if !(mxCol >= 0) { + goto __295 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__295: + ; if !!(isQuick != 0) { - goto __291 + goto __296 } + if !(pPk1 != 0) { + goto __297 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 604)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 564)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__291: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17695, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__298: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __300 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 604)), j4, r2+j4) + goto __299 +__299: + j4++ + goto __298 + goto __300 +__300: + ; +__297: + ; +__296: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__292: +__301: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __294 + goto __303 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __295 + goto __304 } - goto __293 -__295: + goto __302 +__304: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __296 + if !(bStrict != 0) { + goto __305 } - goto __293 -__296: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __306 +__305: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__306: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __307 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __297 + goto __302 +__307: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __308 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__297: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) + p11 = -1 + p3 = 3 + goto __309 +__308: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __310 + } + *(*uintptr)(unsafe.Pointer(bp + 616)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+616) + if !(*(*uintptr)(unsafe.Pointer(bp + 616)) != 0) { + goto __311 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) +__311: ; +__310: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 604)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __312 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __313 +__312: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__313: + ; +__309: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __298 + goto __314 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17668, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17731, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __299 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __315 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __300 -__299: - integrityCheckResultRow(tls, v) -__300: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__298: + goto __316 +__315: + ; +__316: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __301 +__314: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __317 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17688, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17751, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__301: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __318 +__317: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __319 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17773, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __320 +__319: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __321 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __322 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) +__322: ; - goto __293 -__293: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17796, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17798, + libc.VaList(bp+432, (*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, zErr1, -6) +__321: + ; +__320: + ; +__318: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __302 +__302: j4++ - goto __292 - goto __294 -__294: + goto __301 + goto __303 +__303: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __302 + goto __323 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __303 + goto __324 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 564)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 604)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__304: +__325: if !(k3 > 0) { - goto __306 + goto __327 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __305 -__305: + goto __326 +__326: k3-- - goto __304 - goto __306 -__306: + goto __325 + goto __327 +__327: ; 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+17710, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17818, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__303: +__324: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__302: +__323: ; if !!(isQuick != 0) { - goto __307 + goto __328 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__308: +__329: if !(pIdx5 != 0) { - goto __310 + goto __331 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __311 + goto __332 } - goto __309 -__311: + goto __330 +__332: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 564)), 0, 0, bp+572, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 604)), 0, 0, bp+624, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 568))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 608))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17740) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17848) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17745) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17853) 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) @@ -81997,87 +82602,93 @@ __311: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __312 + goto __333 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__313: +__334: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __315 + goto __336 } 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 __316 + goto __337 } - goto __314 -__316: + goto __335 +__337: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __314 -__314: + goto __335 +__335: kk++ - goto __313 - goto __315 -__315: + goto __334 + goto __336 +__336: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 608))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 608))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17766) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17874) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__312: +__333: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 572))) - goto __309 -__309: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 624))) + goto __330 +__330: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __308 - goto __310 -__310: + goto __329 + goto __331 +__331: ; -__307: +__328: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 564)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 604)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __317 + goto __338 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17793) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17901) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__318: +__339: if !(pIdx5 != 0) { - goto __320 + goto __341 } if !(pPk1 == pIdx5) { - goto __321 + goto __342 } - goto __319 -__321: + goto __340 +__342: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 568))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 608))+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 __319 -__319: + goto __340 +__340: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __318 - goto __320 -__320: + goto __339 + goto __341 +__341: ; -__317: + if !(pPk1 != 0) { + goto __343 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__343: + ; +__338: ; goto __284 __284: @@ -82095,14 +82706,14 @@ __259: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __322 + goto __344 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 560)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 600)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17822 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17930 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__322: +__344: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -82110,27 +82721,27 @@ __322: __45: if !!(zRight != 0) { - goto __323 + goto __345 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __325 + goto __347 } goto pragma_out -__325: +__347: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __324 -__323: + goto __346 +__345: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __326 + goto __348 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__327: +__349: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __329 + goto __351 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __330 + goto __352 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -82139,25 +82750,25 @@ __327: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __329 -__330: + goto __351 +__352: ; - goto __328 -__328: + goto __350 +__350: pEnc += 16 - goto __327 - goto __329 -__329: + goto __349 + goto __351 +__351: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __331 + goto __353 } - Xsqlite3ErrorMsg(tls, pParse, ts+17825, libc.VaList(bp+416, zRight)) -__331: + Xsqlite3ErrorMsg(tls, pParse, ts+17933, libc.VaList(bp+456, zRight)) +__353: ; -__326: +__348: ; -__324: +__346: ; goto __15 @@ -82165,50 +82776,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __332 + goto __354 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __334 + goto __356 } goto __15 -__334: +__356: ; (*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 __333 -__332: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __357 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__357: + ; + goto __355 +__354: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __335 + goto __358 } goto __15 -__335: +__358: ; (*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) -__333: +__355: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__336: +__359: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __337 + goto __360 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __336 -__337: + goto __359 +__360: ; Xsqlite3VdbeReusable(tls, v) @@ -82223,31 +82841,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __338 + goto __361 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17263) == 0) { - goto __339 + if !(Xsqlite3StrICmp(tls, zRight, ts+17290) == 0) { + goto __362 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __340 -__339: - if !(Xsqlite3StrICmp(tls, zRight, ts+17850) == 0) { - goto __341 + goto __363 +__362: + if !(Xsqlite3StrICmp(tls, zRight, ts+17958) == 0) { + goto __364 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __342 -__341: - if !(Xsqlite3StrICmp(tls, zRight, ts+17416) == 0) { - goto __343 + goto __365 +__364: + if !(Xsqlite3StrICmp(tls, zRight, ts+17443) == 0) { + goto __366 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__343: +__366: ; -__342: +__365: ; -__340: +__363: ; -__338: +__361: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -82257,10 +82875,10 @@ __338: __49: if !(zRight != 0) { - goto __344 + goto __367 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__344: +__367: ; returnSingleInt(tls, v, func() int64 { @@ -82280,19 +82898,19 @@ __50: __51: if !(zRight != 0) { - goto __345 + goto __368 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __347 + goto __370 } goto __15 -__347: +__370: ; - goto __346 -__345: + goto __369 +__368: opMask = U32(0xfffe) -__346: +__369: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82301,86 +82919,86 @@ __346: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__348: +__371: if !(iDb <= iDbLast) { - goto __350 + goto __373 } if !(iDb == 1) { - goto __351 + goto __374 } - goto __349 -__351: + goto __372 +__374: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__352: +__375: if !(k4 != 0) { - goto __354 + goto __377 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __355 + goto __378 } - goto __353 -__355: + goto __376 +__378: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__356: +__379: if !(pIdx6 != 0) { - goto __358 + goto __381 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __359 + goto __382 } szThreshold = int16(0) - goto __358 -__359: + goto __381 +__382: ; - goto __357 -__357: + goto __380 +__380: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __356 - goto __358 -__358: + goto __379 + goto __381 +__381: ; if !(szThreshold != 0) { - goto __360 + goto __383 } 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)) -__360: +__383: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17858, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17966, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __361 + goto __384 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __362 -__361: + goto __385 +__384: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__362: +__385: ; - goto __353 -__353: + goto __376 +__376: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __352 - goto __354 -__354: + goto __375 + goto __377 +__377: ; - goto __349 -__349: + goto __372 +__372: iDb++ - goto __348 - goto __350 -__350: + goto __371 + goto __373 +__373: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82388,60 +83006,60 @@ __350: __52: ; if !(zRight != 0) { - goto __363 + goto __386 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__363: +__386: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+576) == SQLITE_OK) { - goto __364 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+632) == SQLITE_OK) { + goto __387 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 576))) -__364: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 632))) +__387: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __365 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __388 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 584)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 584)))) { - goto __366 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 640)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 640)))) { + goto __389 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__366: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__389: ; -__365: +__388: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) >= int64(0)) { - goto __367 + Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) >= int64(0)) { + goto __390 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592))&int64(0x7fffffff))) -__367: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648))&int64(0x7fffffff))) +__390: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __368 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __391 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) & int64(0x7fffffff)) -__368: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) & int64(0x7fffffff)) +__391: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82449,10 +83067,10 @@ __368: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __369 + goto __392 } -__369: +__392: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82485,6 +83103,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82496,14 +83122,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17876, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17881, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17887, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17896, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17905, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17913, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17921}, - {FzName: ts + 17928}, + {FzName: ts + 17984, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17989, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17995, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18004, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18013, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18021, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18029}, + {FzName: ts + 18036}, {}, } var setCookie = [2]VdbeOpList{ @@ -82555,7 +83181,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+17934) + Xsqlite3_str_appendall(tls, bp+32, ts+18042) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82563,7 +83189,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17949, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18057, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -82576,19 +83202,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17956, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18064, 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+17962) + Xsqlite3_str_appendall(tls, bp+32, ts+18070) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17974) + Xsqlite3_str_appendall(tls, bp+32, ts+18082) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4924, 1) + Xsqlite3_str_append(tls, bp+32, ts+4918, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -82604,7 +83230,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -82752,7 +83378,7 @@ __1: 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+3630, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -82768,13 +83394,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+17989) + Xsqlite3_str_appendall(tls, bp+32, ts+18097) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17997, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18105, 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+18001, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18109, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -82783,7 +83409,7 @@ __3: 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+3630, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -82851,33 +83477,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18005, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18113, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136244) } 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 + 4975 + zObj = ts + 4969 } - z = Xsqlite3MPrintf(tls, db, ts+18033, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18141, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18064, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18172, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136251) } } var azAlterType = [3]uintptr{ - ts + 18072, - ts + 18079, - ts + 18091, + ts + 18180, + ts + 18187, + ts + 18199, } // Check to see if any sibling index (another index on the same table) @@ -82937,7 +83563,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+14097) + corruptSchema(tls, pData, argv, ts+14091) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -82969,13 +83595,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+18102) + corruptSchema(tls, pData, argv, ts+18210) } 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+14097) + corruptSchema(tls, pData, argv, ts+14091) } } } @@ -83008,16 +83634,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8781 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8775 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7845 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18115 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7839 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18223 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -83102,7 +83728,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11680) + ts+11674) rc = SQLITE_ERROR goto initone_error_out __13: @@ -83137,7 +83763,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+18187) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18295) rc = SQLITE_ERROR goto initone_error_out __17: @@ -83151,7 +83777,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18211, + ts+18319, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83334,16 +83960,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83411,8 +84041,8 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse @@ -83423,8 +84053,8 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -83436,8 +84066,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83457,7 +84087,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83477,7 +84107,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18245, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18353, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83493,100 +84123,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18275, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18383, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3630, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3624, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83599,7 +84233,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137038) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -83698,7 +84332,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, 135516) + return Xsqlite3MisuseError(tls, 137186) } if nBytes >= 0 { var sz int32 @@ -83841,7 +84475,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -84016,8 +84650,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10825 - var zSp2 uintptr = ts + 10825 + var zSp1 uintptr = ts + 10819 + var zSp2 uintptr = ts + 10819 if pB == uintptr(0) { zSp1++ } @@ -84025,13 +84659,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18294, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18402, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18324)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18432)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -84206,7 +84840,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18358, libc.VaList(bp, 0)) + ts+18466, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -84251,7 +84885,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18408, libc.VaList(bp+8, zName)) + ts+18516, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -84262,7 +84896,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18472, + Xsqlite3ErrorMsg(tls, pParse, ts+18580, libc.VaList(bp+16, zName)) break } @@ -84306,7 +84940,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6493, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6487, Fn: uint32(8)} // 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. @@ -84653,6 +85287,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -84828,7 +85465,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -84890,16 +85527,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18509 + z = ts + 18617 break case TK_INTERSECT: - z = ts + 18519 + z = ts + 18627 break case TK_EXCEPT: - z = ts + 18529 + z = ts + 18637 break default: - z = ts + 18536 + z = ts + 18644 break } return z @@ -84909,7 +85546,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18542, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18650, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -85116,7 +85753,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1080 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16185 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16212 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -85255,13 +85892,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16185 + zCol = ts + 16212 } 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+11966, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11960, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85269,7 +85906,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+18565, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18673, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85359,7 +85996,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16185 + zName = ts + 16212 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85369,7 +86006,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18565, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18673, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -85385,7 +86022,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18574, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18682, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -85672,7 +86309,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18582, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18690, 0) return __1: ; @@ -85763,7 +86400,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18631, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18739, 0) goto end_of_recursive_query __15: ; @@ -85783,7 +86420,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18673, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18781, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -85820,7 +86457,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18679, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18787, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -85854,11 +86491,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+18694, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18802, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1515 } - return ts + 18717 + return ts + 18825 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -85959,8 +86596,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18719, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18734, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18827, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18842, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -86007,7 +86644,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18509, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18617, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -86074,7 +86711,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18861, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -86136,7 +86773,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18861, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -86289,10 +86926,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18882, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18820, + ts+18928, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86546,8 +87183,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7141) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7141) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7135) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7135) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86574,13 +87211,13 @@ 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+18902, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19010, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18913, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19021, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86592,7 +87229,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+18918, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19026, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -86693,7 +87330,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -86719,6 +87356,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -86735,7 +87373,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -86772,7 +87410,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -86783,6 +87422,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -86807,15 +87447,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1060 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1060 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -86992,9 +87637,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -87063,7 +87715,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -87079,17 +87730,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -87110,7 +87752,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -87122,6 +87763,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87277,6 +87929,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87300,8 +87953,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87477,8 +88130,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -87495,6 +88148,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87524,6 +88182,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87557,12 +88216,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15088) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15115) == 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+15092) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15119) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -87628,7 +88287,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+18924, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19032, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -87711,7 +88370,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18942, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19050, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -87840,7 +88499,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+18965, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19073, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -87866,7 +88525,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18985, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19093, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -87882,7 +88541,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19028 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19136 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -87908,7 +88567,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+19051, + Xsqlite3ErrorMsg(tls, pParse, ts+19159, 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 @@ -87919,9 +88578,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 + 19089 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19197 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19123 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19231 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -87948,9 +88607,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -87968,7 +88627,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+19161, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19269, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -88080,7 +88739,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19165, + Xsqlite3ErrorMsg(tls, pParse, ts+19273, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -88099,7 +88758,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+19204, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -88107,7 +88766,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19235, + Xsqlite3ErrorMsg(tls, pParse, ts+14684, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -88208,7 +88867,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6353 + zSchemaName = ts + 6347 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -88223,7 +88882,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19268, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19343, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -88288,7 +88947,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19273, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19348, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88300,7 +88959,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11966, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11960, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88319,9 +88978,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19282, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19357, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19300, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19375, 0) } } } @@ -88331,7 +88990,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+19320, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19395, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88481,13 +89140,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19351, 0) + ts+19426, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19402, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19477, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -88668,11 +89327,11 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19435, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19510, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19447 + return ts + 19522 } return ts + 1515 }(), @@ -88693,7 +89352,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7845) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7839) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -88851,7 +89510,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -88950,7 +89608,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19470, + ts+19545, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -89011,7 +89669,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19524, + Xsqlite3ErrorMsg(tls, pParse, ts+19599, 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 __15: @@ -89125,7 +89783,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -89157,7 +89815,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19564, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19639, 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), 5, 0x20) @@ -89215,8 +89873,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19579, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19654, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -89250,7 +89911,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89343,16 +90004,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89361,13 +90027,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89379,52 +90045,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89442,111 +90108,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -89565,33 +90231,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -89599,28 +90265,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -89631,7 +90297,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -89642,7 +90308,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -89668,7 +90334,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -89681,27 +90347,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19595 + return ts + 19670 } - return ts + 19604 + return ts + 19679 }()) groupBySort = 1 @@ -89709,49 +90375,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -89765,45 +90431,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -89822,16 +90488,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -89862,16 +90528,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -89884,98 +90550,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -89984,79 +90650,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19595) -__147: + explainTempTable(tls, pParse, ts+19670) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19613 + return ts + 19688 } - return ts + 19636 + return ts + 19711 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -90131,7 +90797,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -90153,7 +90819,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19645, 0) + ts+19720, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -90249,7 +90915,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3630, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90386,7 +91052,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+19710, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19785, 0) goto trigger_cleanup __3: ; @@ -90430,7 +91096,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19756, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19831, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -90448,7 +91114,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19764, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19839, 0) goto trigger_orphan_error __11: ; @@ -90460,7 +91126,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19756, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19831, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90475,7 +91141,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19805, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19880, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90487,22 +91153,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8039, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8033, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19831, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19906, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19869, + Xsqlite3ErrorMsg(tls, pParse, ts+19944, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19906 + return ts + 19981 } - return ts + 19913 + return ts + 19988 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90511,7 +91177,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19919, libc.VaList(bp+24, pTableName+8)) + ts+19994, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90540,9 +91206,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -90660,7 +91326,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19756, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19831, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -90693,7 +91359,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19965, + ts+20040, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -90718,13 +91384,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20013, + ts+20088, libc.VaList(bp+16, (*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+20088, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20163, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -90980,7 +91646,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20117, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20192, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -91019,9 +91685,9 @@ 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 + 12053 + return ts + 12047 } - return ts + 5860 + return ts + 5854 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -91033,7 +91699,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20137, + ts+20212, 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) @@ -91147,12 +91813,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20199, + ts+20274, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20247 + return ts + 20322 } - return ts + 20254 + return ts + 20329 }())) __15: ; @@ -91266,7 +91932,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20261, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20336, 0) return 1 } @@ -91317,7 +91983,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -91386,7 +92052,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6047, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6041, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91449,8 +92115,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91483,26 +92149,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20303, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20378, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91519,7 +92185,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -91712,10 +92378,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -91724,7 +92392,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -92086,7 +92754,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20317, + ts+20392, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -92118,7 +92786,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20353, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20428, 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: @@ -92128,7 +92796,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7620 + return ts + 7614 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -92998,7 +93666,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20372) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20447) __169: ; update_cleanup: @@ -93304,10 +93972,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+20385, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20460, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20389, libc.VaList(bp+8, bp+216)) + ts+20464, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -93398,7 +94066,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+12107, -1) + ts+12101, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93430,7 +94098,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20462, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20466, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20537, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20541, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93567,23 +94235,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20470) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20545) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20510) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20585) return SQLITE_ERROR __2: ; @@ -93594,7 +94264,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20553) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20628) return SQLITE_ERROR __5: ; @@ -93622,7 +94292,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20571, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20646, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -93642,20 +94312,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20594) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20669) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14460) + rc = execSql(tls, db, pzErrMsg, ts+14454) if !(rc != SQLITE_OK) { goto __9 } @@ -93700,7 +94372,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20621, + ts+20696, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -93709,7 +94381,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20729, + ts+20804, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -93720,7 +94392,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20783, + ts+20858, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -93731,7 +94403,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20934, + ts+21009, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -93853,7 +94525,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -93895,7 +94567,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -94052,7 +94724,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -94076,7 +94748,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+12334, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12328, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -94160,11 +94832,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21064, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21139, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21088, + ts+21163, 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, @@ -94174,7 +94846,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21187, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21262, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -94208,7 +94880,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -94235,7 +94907,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+21206, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21281, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94273,9 +94945,9 @@ 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+21248, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21323, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3630, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3624, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94285,7 +94957,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 + 21278 + var zFormat uintptr = ts + 21353 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94302,7 +94974,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+16076, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16103, 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 @@ -94355,17 +95027,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21324, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21399, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3630, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3624, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94414,10 +95086,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21324, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21399, 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) @@ -94437,8 +95109,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94451,7 +95123,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, 148074) + return Xsqlite3MisuseError(tls, 149766) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94493,7 +95165,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3630 + return ts + 3624 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -94861,7 +95533,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3630, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3624, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -94904,7 +95576,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, 148565) + rc = Xsqlite3MisuseError(tls, 150257) } else { ap = va switch op { @@ -94931,7 +95603,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150275) break } @@ -95159,31 +95831,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21343 + return ts + 21418 } if i == -1 { - return ts + 16185 + return ts + 16212 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -95192,35 +95846,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21350, 5) + Xsqlite3_str_append(tls, pStr, ts+21425, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21356, 1) + Xsqlite3_str_append(tls, pStr, ts+21431, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12724, 1) + Xsqlite3_str_append(tls, pStr, ts+12718, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4924, 1) + Xsqlite3_str_append(tls, pStr, ts+4918, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21356, 1) + Xsqlite3_str_append(tls, pStr, ts+21431, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12724, 1) + Xsqlite3_str_append(tls, pStr, ts+12718, 1) } - Xsqlite3_str_append(tls, pStr, ts+4975, 1) + Xsqlite3_str_append(tls, pStr, ts+4969, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4924, 1) + Xsqlite3_str_append(tls, pStr, ts+4918, 1) } } @@ -95237,29 +95891,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21358, 2) + Xsqlite3_str_append(tls, pStr, ts+21433, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21350, 5) + Xsqlite3_str_append(tls, pStr, ts+21425, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21361 + return ts + 21436 } - return ts + 21366 + return ts + 21441 }(), 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))), j, i, ts+21374) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21449) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21376) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21451) } - Xsqlite3_str_append(tls, pStr, ts+4924, 1) + Xsqlite3_str_append(tls, pStr, ts+4918, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95300,11 +95954,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21378, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21453, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21384 + return ts + 21459 } - return ts + 21391 + return ts + 21466 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95314,43 +95968,43 @@ 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 + 10881 + zFmt = ts + 10875 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21396 + zFmt = ts + 21471 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21429 + zFmt = ts + 21504 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21454 + zFmt = ts + 21529 } else { - zFmt = ts + 21472 + zFmt = ts + 21547 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21481, 7) + Xsqlite3_str_append(tls, bp+64, ts+21556, 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 + 16185 - Xsqlite3_str_appendf(tls, bp+64, ts+21489, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16212 + Xsqlite3_str_appendf(tls, bp+64, ts+21564, 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+21520, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21595, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21530, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21605, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21535, + Xsqlite3_str_appendf(tls, bp+64, ts+21610, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21562, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21637, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95382,25 +96036,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21573, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21648, 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+21361, 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+21436, 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+21594, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21669, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21350, 5) + Xsqlite3_str_append(tls, bp+24, ts+21425, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21361, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21436, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4924, 1) + Xsqlite3_str_append(tls, bp+24, ts+4918, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -95761,7 +96415,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -95814,104 +96468,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -95950,7 +96506,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -95970,6 +96526,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -96120,12 +96678,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -96144,13 +96702,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -96163,7 +96721,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -96225,7 +96783,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96372,6 +96930,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -96714,13 +97274,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -96728,104 +97295,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -96834,92 +97410,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -96929,24 +97499,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -96966,152 +97536,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21602, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21677, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21617, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21692, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -97120,121 +97691,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -97243,36 +97814,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97290,219 +97861,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97512,24 +98083,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97540,41 +98111,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -97608,7 +98179,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -97616,13 +98187,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21626, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21701, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -97901,7 +98472,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -97914,7 +98485,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -97938,11 +98509,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -97974,10 +98545,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16034, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15365, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14891, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21640, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16061, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15392, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14918, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21715, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -98119,7 +98690,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -98136,10 +98707,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -98196,7 +98767,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98382,6 +98953,7 @@ __3: 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 @@ -98437,7 +99009,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98474,12 +99046,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21647, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21722, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21647, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21722, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98558,7 +99130,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6676 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6670 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -98652,7 +99224,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21688 + return ts + 21763 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -98846,7 +99418,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -99025,7 +99597,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21695, + Xsqlite3ErrorMsg(tls, pParse, ts+21770, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -99121,10 +99693,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -99144,14 +99716,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -99188,14 +99760,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -99638,6 +100210,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -99647,11 +100231,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -99746,7 +100328,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21731, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21806, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -99817,7 +100399,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21757 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21832 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -100051,7 +100633,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -100113,11 +100695,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -100307,9 +100887,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3630, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3624, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3630, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3624, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100377,7 +100957,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -100726,9 +101306,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -100752,7 +101335,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -100768,32 +101352,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -100939,7 +101513,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -101182,13 +101756,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -101199,7 +101770,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -101254,31 +101826,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -101481,6 +102055,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -101612,6 +102244,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -101626,6 +102261,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -101656,7 +102294,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -101812,7 +102450,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+21768, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21843, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -101870,7 +102508,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21768, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21843, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102228,7 +102866,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -102240,7 +102878,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -102255,7 +102893,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102268,7 +102906,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21794, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21869, 0) rc = SQLITE_OK } else { goto __3 @@ -102369,7 +103007,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102543,7 +103181,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102595,7 +103233,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -102623,7 +103261,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -102644,7 +103281,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -102666,7 +103302,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -102728,9 +103364,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -102746,7 +103381,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -102766,6 +103403,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -102862,8 +103504,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21829, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21904, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -102875,7 +103517,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -102890,7 +103532,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -102910,7 +103552,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -102918,7 +103560,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -102928,7 +103570,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -102936,7 +103578,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -102968,7 +103610,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -103025,10 +103667,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -103072,16 +103714,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -103114,7 +103756,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -103126,9 +103768,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -103146,6 +103788,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -103232,7 +103926,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -103289,7 +103983,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21847, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21922, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -103312,31 +104006,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103354,13 +104047,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21875, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21950, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103371,169 +104064,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103542,26 +104240,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -103569,37 +104267,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -103607,92 +104305,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -103702,24 +104406,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -103729,96 +104433,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -103826,30 +104530,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -103869,7 +104571,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -104005,11 +104707,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -104048,6 +104747,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -104220,7 +104929,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21893, -1) + pCtx, ts+21968, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104353,7 +105062,7 @@ 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+21949, -1) + pCtx, ts+22024, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104443,17 +105152,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21994)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22005)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22016)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22021)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22034)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22044)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22050)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22061)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22071)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22083)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22088)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22069)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22080)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22091)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22096)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22109)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22119)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22125)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22136)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22146)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22158)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22163)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104499,7 +105208,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22092, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22167, libc.VaList(bp, zName)) } return p } @@ -104543,12 +105252,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+22111, 0) + ts+22186, 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+22182, 0) + ts+22257, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104571,7 +105280,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7845) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7839) } break } @@ -104741,7 +105450,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -104778,7 +105486,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22245, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22320, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -104894,7 +105602,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7437)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7431)) } pSub = Xsqlite3SelectNew(tls, @@ -105008,7 +105716,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22271, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22346, 0) goto windowAllocErr __2: ; @@ -105073,15 +105781,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22303 + zErr = ts + 22378 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22320 + zErr = ts + 22395 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22336 + zErr = ts + 22411 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22356, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22431, 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 { @@ -105102,7 +105810,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+22389, 0) + ts+22464, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -105258,11 +105966,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22436, - ts + 22489, - ts + 21893, - ts + 22540, - ts + 22592, + ts + 22511, + ts + 22564, + ts + 21968, + ts + 22615, + ts + 22667, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -105743,10 +106451,14 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1515, -1) @@ -106657,19 +107369,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22642, + Xsqlite3ErrorMsg(tls, pParse, ts+22717, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19636 + return ts + 19711 } - return ts + 22684 + return ts + 22759 }(), 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+22690, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22765, 0) } } @@ -106737,7 +107449,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22724, + Xsqlite3ErrorMsg(tls, pParse, ts+22799, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -107834,7 +108546,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22762, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22837, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -108809,21 +109521,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16185, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16212, 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+22784, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22859, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16098, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16125, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22784, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22859, 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)) @@ -109566,7 +110278,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22811) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22886) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -109730,7 +110442,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22820, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22895, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -109947,9 +110659,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6671 + return ts + 6665 } - return ts + 6676 + return ts + 6670 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -110228,19 +110940,19 @@ 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+22844, 0) + ts+22919, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22939, 0) + ts+23014, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23023, 0) + ts+23098, 0) } break case uint32(273): @@ -110619,9 +111331,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22820, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22895, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23108, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23183, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111389,7 +112101,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23125, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23200, libc.VaList(bp, bp+2464)) break } } @@ -111410,9 +112122,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3630, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3624, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23150, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23225, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111425,7 +112137,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111585,7 +112297,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23161, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23236, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111598,11 +112310,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19756, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19831, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23168, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23243, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23173, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23248, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -111615,9 +112327,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23183, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23258, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23262, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -111727,36 +112439,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -111873,7 +112563,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172848) } ap = va @@ -112144,16 +112834,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -112217,6 +112908,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -112267,6 +112959,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112415,7 +113108,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -112445,7 +113138,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112460,7 +113153,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23195, 0) + ts+23270, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112556,7 +113249,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112567,8 +113260,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112578,13 +113271,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -112651,23 +113344,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23263 + var zErr uintptr = ts + 23338 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23277 + zErr = ts + 23352 break } case SQLITE_ROW: { - zErr = ts + 23299 + zErr = ts + 23374 break } case SQLITE_DONE: { - zErr = ts + 23321 + zErr = ts + 23396 break } @@ -112685,35 +113378,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23344, - ts + 23357, + ts + 23419, + ts + 23432, uintptr(0), - ts + 23373, - ts + 23398, - ts + 23412, - ts + 23431, + ts + 23448, + ts + 23473, + ts + 23487, + ts + 23506, ts + 1451, - ts + 23456, - ts + 23493, - ts + 23505, - ts + 23520, - ts + 23553, - ts + 23571, - ts + 23596, - ts + 23625, + ts + 23531, + ts + 23568, + ts + 23580, + ts + 23595, + ts + 23628, + ts + 23646, + ts + 23671, + ts + 23700, uintptr(0), - ts + 5815, - ts + 5301, - ts + 23642, - ts + 23660, - ts + 23678, + ts + 5809, + ts + 5295, + ts + 23717, + ts + 23735, + ts + 23753, uintptr(0), - ts + 23712, + ts + 23787, uintptr(0), - ts + 23733, - ts + 23759, - ts + 23782, - ts + 23803, + ts + 23808, + ts + 23834, + ts + 23857, + ts + 23878, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -112828,7 +113521,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, 172531) + return Xsqlite3MisuseError(tls, 174251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -112873,7 +113566,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+23819, 0) + ts+23894, 0) return SQLITE_BUSY } else { @@ -112990,7 +113683,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23882, libc.VaList(bp, zName)) + ts+23957, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113223,7 +113916,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+23933, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24008, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113316,7 +114009,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 174996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113386,7 +114079,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113396,7 +114089,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113428,20 +114121,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175132) } 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+23954, 0) + ts+24029, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -113565,7 +114258,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+24022, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24097, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -113610,10 +114303,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24028, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24103, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24038, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24113, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -113718,7 +114411,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24066, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24141, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -113729,17 +114422,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24070, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24145, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24070 + zModeType = ts + 24145 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24076, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24151, zOpt, uint64(4)) == 0) { goto __32 } @@ -113747,7 +114440,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3239 + zModeType = ts + 3233 __32: ; if !(aMode != 0) { @@ -113777,7 +114470,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24081, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24156, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -113785,7 +114478,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24101, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24176, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -113825,7 +114518,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24125, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24200, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -113849,15 +114542,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24141, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24148, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24216, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24223, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24156, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24159, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24162, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17280, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24231, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24234, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24237, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17307, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -113972,7 +114665,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -113991,8 +114684,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -114003,10 +114696,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+21688, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21763, 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+24166, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24241, 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) { @@ -114020,7 +114713,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175801) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -114037,7 +114730,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3630 + return ts + 3624 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114071,9 +114764,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6348 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6342 (*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 + 23168 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23243 (*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) @@ -114178,7 +114871,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24172 + zFilename = ts + 24247 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114281,21 +114974,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24175, + Xsqlite3_log(tls, iErr, ts+24250, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24200) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24275) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24220) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24295) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24227) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24302) } // This is a convenience routine that makes sure that all thread-specific @@ -114453,14 +115146,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24244, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24319, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3630 + return ts + 3624 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -115106,7 +115799,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24272, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24347, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -115139,7 +115832,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -115150,7 +115843,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -115224,7 +115917,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 + 24280 + return ts + 24355 } return uintptr(0) }(), 0) @@ -115319,7 +116012,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -115402,7 +116095,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6148, ts + 6671, ts + 6676, ts + 6158, ts + 6153, ts + 7912, ts + 24303, ts + 24309, + ts + 6142, ts + 6665, ts + 6670, ts + 6152, ts + 6147, ts + 7906, ts + 24378, ts + 24384, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115555,7 +116248,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 + 24316 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24391 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -115581,7 +116274,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6148, uint32(4)) + jsonAppendRaw(tls, p, ts+6142, uint32(4)) break } @@ -115610,7 +116303,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24333, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24408, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -115668,19 +116361,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6148, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6142, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6671, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6665, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6676, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6670, uint32(5)) break } @@ -116225,17 +116918,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6148, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6142, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6671, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6665, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6676, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6670, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116336,7 +117029,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+24362, -1) + Xsqlite3_result_error(tls, pCtx, ts+24437, -1) } } jsonParseReset(tls, pParse) @@ -116642,7 +117335,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+24377, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24452, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -116657,7 +117350,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24381, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24456, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -116711,7 +117404,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24407, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24482, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -116816,11 +117509,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24450, uint32(2)) + jsonAppendRaw(tls, bp, ts+24525, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4965, uint32(2)) + jsonAppendRaw(tls, bp, ts+4959, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24453, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24528, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -116861,7 +117554,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6148, uint32(4)) + jsonAppendRaw(tls, bp, ts+6142, uint32(4)) } } if i == argc { @@ -116977,14 +117670,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24456, -1) + ts+24531, -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+24507, -1) + Xsqlite3_result_error(tls, ctx, ts+24582, -1) jsonReset(tls, bp) return } @@ -117079,7 +117772,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15298) + jsonWrongNumArgs(tls, ctx, ts+15325) return __2: ; @@ -117154,9 +117847,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24541 + return ts + 24616 } - return ts + 24545 + return ts + 24620 }()) return __2: @@ -117289,7 +117982,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24552, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24627, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117386,7 +118079,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24555, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24630, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117430,7 +118123,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24558) + ts+24633) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117561,7 +118254,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24641, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24716, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117580,7 +118273,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24647, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24722, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -117676,7 +118369,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24647, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24722, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -117700,7 +118393,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 + 24652 + zRoot = ts + 24727 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -117816,7 +118509,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+24362, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24437, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -117911,25 +118604,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24654}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24659}, - {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), FxSFunc: 0, FzName: ts + 24670}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24688}, - {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 + 24701}, - {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 + 24704}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24708}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24720}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24732}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24743}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24754}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24766}, - {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 + 24779}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24788}, - {FnArg: int8(2), 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_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24798}, - {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 + 24809}, - {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 + 24826}} + {FnArg: int8(1), 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 + 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(2), 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 + 24763}, + {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 + 24776}, + {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 + 24779}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24783}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24795}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24807}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24818}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24829}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24841}, + {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 + 24854}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24863}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24863}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24873}, + {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 + 24884}, + {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 + 24901}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -117948,8 +118641,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24844, FpModule: 0}, - {FzName: ts + 24854, FpModule: 0}, + {FzName: ts + 24919, FpModule: 0}, + {FzName: ts + 24929, FpModule: 0}, } type Rtree1 = struct { @@ -118209,11 +118902,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+24864, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24939, 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+24872, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24947, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -118424,7 +119117,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24877, + ts+24952, 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)) @@ -119122,7 +119815,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24959) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25034) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119334,7 +120027,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3630, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120463,7 +121156,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24973, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25048, 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 { @@ -120475,12 +121168,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24993, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25068, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25025, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25100, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120521,7 +121214,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -120706,7 +121399,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25062, 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+25137, 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)) @@ -120729,14 +121422,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25207 + var zFmt uintptr = ts + 25282 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11253, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11247, 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 { @@ -120777,7 +121470,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25263, ts + 5027, ts + 16185, + ts + 25338, ts + 5021, ts + 16212, } var rtreeModule = Sqlite3_module{ @@ -120820,19 +121513,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+25268, + ts+25343, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25330, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25405, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25335, + ts+25410, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25399, + ts+25474, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25469, + ts+25544, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -120861,7 +121554,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25518 + zFormat = ts + 25593 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -120873,7 +121566,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+25626, + ts+25701, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -120881,18 +121574,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+25671, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25746, 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+12724, 1) + Xsqlite3_str_append(tls, p, ts+12718, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25698, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25773, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25720, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25795, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25728, 0) + Xsqlite3_str_appendf(tls, p, ts+25803, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -120907,14 +121600,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25744, - ts + 25797, - ts + 25842, - ts + 25894, - ts + 25948, - ts + 25993, - ts + 26051, - ts + 26106, + ts + 25819, + ts + 25872, + ts + 25917, + ts + 25969, + ts + 26023, + ts + 26068, + ts + 26126, + ts + 26181, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -120943,7 +121636,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26153, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26228, 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 @@ -120951,19 +121644,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26173, + ts+26248, 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+3630, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, 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+26230, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26305, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121005,16 +121698,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26265, - ts + 26308, - ts + 26343, - ts + 26379, + ts + 26340, + ts + 26383, + ts + 26418, + ts + 26454, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -121039,7 +121732,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26416, + Xsqlite3_str_appendf(tls, pSql, ts+26491, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -121051,7 +121744,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26440, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26515, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -121074,7 +121767,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26446, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26521, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -121085,14 +121778,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, 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+3630, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -121135,7 +121828,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -121152,7 +121845,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -121170,7 +121863,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26449, ts + 26460} +var azFormat = [2]uintptr{ts + 26524, ts + 26535} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -121208,13 +121901,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10825, 1) + Xsqlite3_str_append(tls, pOut, ts+10819, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26470, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26545, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26476, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26551, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26480, 1) + Xsqlite3_str_append(tls, pOut, ts+26555, 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}))) @@ -121225,7 +121918,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26482, -1) + Xsqlite3_result_error(tls, ctx, ts+26557, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121303,10 +121996,10 @@ 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+26515, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26590, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4029 + return ts + 4023 } return ts + 1515 }(), z)) @@ -121327,7 +122020,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+26522, + ts+26597, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121346,7 +122039,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+26567, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26642, libc.VaList(bp+16, iNode)) } } @@ -121360,8 +122053,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26599, - ts + 26653, + ts + 26674, + ts + 26728, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -121376,23 +122069,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+26701, + rtreeCheckAppendMsg(tls, pCheck, ts+26776, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26746 + return ts + 26821 } - return ts + 26754 + return ts + 26829 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26763, + ts+26838, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26746 + return ts + 26821 } - return ts + 26754 + return ts + 26829 }(), iKey, iVal)) } } @@ -121416,7 +122109,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+26821, libc.VaList(bp, i, iCell, iNode)) + ts+26896, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121436,7 +122129,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+26869, libc.VaList(bp+24, i, iCell, iNode)) + ts+26944, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121453,14 +122146,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+26936, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27011, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26970, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27045, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121468,7 +122161,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+27000, + ts+27075, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121497,14 +122190,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27055, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27130, 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+27086, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27161, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121526,12 +122219,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14460, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14454, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27153, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27228, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121540,12 +122233,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24973, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25048, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27181, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27256, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121559,8 +122252,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+27212, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27219, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27287, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27294, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121568,7 +122261,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27227, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27302, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121583,7 +122276,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27231, -1) + ts+27306, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121591,7 +122284,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6348 + zDb = ts + 6342 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -121601,7 +122294,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17822 + return ts + 17930 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -121970,11 +122663,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+27282, 1) + Xsqlite3_str_append(tls, x, ts+27357, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27284, 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+27359, 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+27295, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27370, 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) } @@ -121994,19 +122687,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+27306, 0) + Xsqlite3_str_appendf(tls, x, ts+27381, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27324, 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+27399, 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+27332, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27407, 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+27340, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27415, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27344, 0) + Xsqlite3_str_appendf(tls, x, ts+27419, 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) } @@ -122912,7 +123605,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27357, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27432, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -122921,7 +123614,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27379, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27454, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -122929,7 +123622,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26446, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26521, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -122940,7 +123633,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -122965,7 +123658,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -123154,7 +123847,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16185 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16212 (*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 @@ -123164,7 +123857,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27383 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27458 (*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 @@ -123172,7 +123865,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27389 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27464 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123284,7 +123977,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27398, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27473, 0) __4: ; goto geopoly_update_end @@ -123414,14 +124107,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27438) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27513) == 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+27454) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27529) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123486,7 +124179,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27469, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27544, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123498,25 +124191,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27477}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27490}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27503}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27516}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27454}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27528}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27438}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27551}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27552}, {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27565}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27578}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27592}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27608}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27578}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27591}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27529}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27603}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27513}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27626}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27640}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27653}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27667}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27683}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27620}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27695}, } // Register the r-tree module with database handle db. This creates the @@ -123526,26 +124219,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27639, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27714, 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+27649, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27724, 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+27660, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27735, -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+27383, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27458, 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+27671, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27746, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -123599,7 +124292,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24959, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25034, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -123666,6 +124359,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -123924,7 +124619,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27681, -1) + Xsqlite3_result_error(tls, context, ts+27756, -1) return } @@ -123935,7 +124630,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+27681, -1) + Xsqlite3_result_error(tls, context, ts+27756, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -123948,7 +124643,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -123960,7 +124655,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -124036,7 +124731,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27702, uintptr(0), uintptr(0), p+64) + ts+27777, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -124100,7 +124795,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+24872, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24947, 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++ { } @@ -124121,16 +124816,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27873, libc.VaList(bp, func() uintptr { + ts+27948, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28023 + return ts + 28098 } return ts + 1515 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28064) + ts+28139) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -124228,7 +124923,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -124246,7 +124941,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+28189, libc.VaList(bp, zTab))) + ts+28264, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124264,7 +124959,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+28308, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28383, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124282,7 +124977,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28329, libc.VaList(bp+16, zIdx))) + ts+28404, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124305,7 +125000,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28380, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28455, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124351,7 +125046,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28401, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28476, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124366,7 +125061,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28429, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28504, 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)), 1) if iCid >= 0 { @@ -124406,7 +125101,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+19282, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19357, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124416,18 +125111,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28458, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28533, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28477, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28552, 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+28482, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28557, zName) { bRbuRowid = 1 } } @@ -124439,18 +125134,18 @@ 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+28492, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28567, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28521 + return ts + 28596 } - return ts + 28534 + return ts + 28609 }())) } 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+28543, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28618, 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)), 1) @@ -124464,7 +125159,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+28565, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28640, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -124511,8 +125206,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+28592, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14571 + zList = rbuMPrintf(tls, p, ts+28667, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14565 } return zList } @@ -124529,7 +125224,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+28601, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28676, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124551,25 +125246,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+28614, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28689, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28646, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28721, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1515, ts+14571, ts+28669) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28675, ts+28682, ts+4924) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1515, ts+14571, ts+1515) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1515, ts+14565, ts+28744) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28750, ts+28757, ts+4918) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1515, ts+14565, ts+1515) 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+28690, + ts+28765, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28732, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28807, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -124611,7 +125306,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28429, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28504, 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 @@ -124646,7 +125341,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28752 + zCol = ts + 28827 __7: ; goto __5 @@ -124654,13 +125349,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28760, + zLhs = rbuMPrintf(tls, p, ts+28835, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28781, + zOrder = rbuMPrintf(tls, p, ts+28856, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28817, + zSelect = rbuMPrintf(tls, p, ts+28892, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14571 + zSep = ts + 14565 iCol++ goto __1 __2: @@ -124678,7 +125373,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28844, + Xsqlite3_mprintf(tls, ts+28919, 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 @@ -124705,8 +125400,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28892, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14571 + zVector = rbuMPrintf(tls, p, ts+28967, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14565 goto __15 __15: iCol++ @@ -124717,7 +125412,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28899, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28974, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -124750,7 +125445,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+28429, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28504, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -124762,7 +125457,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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28911, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28986, 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 + 1515 } else { @@ -124774,37 +125469,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 + 28752 + zCol = ts + 28827 } else { - zCol = ts + 28482 + zCol = ts + 28557 } zType = ts + 1080 } 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+28933, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29008, 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 + 28669 + return ts + 28744 } return ts + 1515 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28953, + zImpPK = Xsqlite3_mprintf(tls, ts+29028, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28974, + zImpCols = Xsqlite3_mprintf(tls, ts+29049, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29007, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29082, 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 + 14571 - zAnd = ts + 21350 + zCom = ts + 14565 + zAnd = ts + 21425 nBind++ } @@ -124843,11 +125538,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+29031, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29106, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29043, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29118, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14571 + zS = ts + 14565 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -124855,7 +125550,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29052, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29127, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -124867,18 +125562,18 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29067, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29142, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1515 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+29081, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21350 + zList = rbuMPrintf(tls, p, ts+29156, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21425 } } zList = rbuMPrintf(tls, p, - ts+29093, libc.VaList(bp+40, zList)) + ts+29168, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1515 @@ -124886,8 +125581,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29143, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21350 + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21425 } } } @@ -124896,7 +125591,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29156, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29231, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -124914,17 +125609,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+29143, + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14571 + zSep = ts + 14565 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29182, + zList = rbuMPrintf(tls, p, ts+29257, 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 + 14571 + zSep = ts + 14565 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29212, + zList = rbuMPrintf(tls, p, ts+29287, 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 + 14571 + zSep = ts + 14565 } } } @@ -124959,19 +125654,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29249 + var zSep uintptr = ts + 29324 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28401, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28476, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16073) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16100) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28429, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28504, libc.VaList(bp+8, zIdx))) } break } @@ -124983,15 +125678,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28669 + zDesc = ts + 28744 } else { zDesc = ts + 1515 } - z = rbuMPrintf(tls, p, ts+29262, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14571 + z = rbuMPrintf(tls, p, ts+29337, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14565 } } - z = rbuMPrintf(tls, p, ts+29273, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29348, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -125011,7 +125706,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29277) + ts+29352) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -125020,7 +125715,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28429, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28504, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125030,25 +125725,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29327, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29402, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29349, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29424, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28669 + return ts + 28744 } return ts + 1515 }())) - zComma = ts + 14571 + zComma = ts + 14565 } } - zCols = rbuMPrintf(tls, p, ts+29359, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29434, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29374, + ts+29449, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 0, 0)) } } @@ -125061,7 +125756,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { var zComma uintptr = ts + 1515 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { var zPk uintptr = ts + 1515 @@ -125069,39 +125764,39 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, (*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 { - zPk = ts + 29436 + zPk = ts + 29511 } - zSql = rbuMPrintf(tls, p, ts+29449, + zSql = rbuMPrintf(tls, p, ts+29524, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29476 + return ts + 29551 } return ts + 1515 }())) - zComma = ts + 14571 + zComma = ts + 14565 } 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+29486, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29561, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29493, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29568, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29525 + return ts + 29600 } return ts + 1515 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 0, 0)) } } @@ -125114,7 +125809,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29540, + ts+29615, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -125151,7 +125846,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29597) + ts+29672) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -125256,7 +125951,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+29663, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29738, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125276,24 +125971,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29683, + ts+29758, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29748, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29823, libc.VaList(bp+128, zTbl, zBind))) } 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+29784, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29859, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125309,7 +126004,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29818, + ts+29893, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125317,9 +126012,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29879 + return ts + 29954 } - return ts + 29883 + return ts + 29958 }() } return ts + 1515 @@ -125328,20 +126023,20 @@ 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+29889, + ts+29964, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29950, + ts+30025, 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 + 29879 + return ts + 29954 } - return ts + 29883 + return ts + 29958 }(), zCollist, zLimit)) } @@ -125366,8 +126061,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6359) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6355) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6353) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6349) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125378,16 +126073,16 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1515 } - return ts + 30109 + return ts + 30184 }() 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+30118, + ts+30193, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30154 + return ts + 30229 } return ts + 1515 }(), zBindings))) @@ -125396,32 +126091,32 @@ 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+30164, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30239, 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 + 1515 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30192 + zRbuRowid = ts + 30267 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30204, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30279, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30280 + return ts + 30355 } return ts + 1515 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30297, + ts+30372, 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+30596, + ts+30671, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125434,9 +126129,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 + 30695 + zRbuRowid = ts + 30770 } else { - zRbuRowid = ts + 30705 + zRbuRowid = ts + 30780 } } @@ -125449,20 +126144,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28752, 0) + zOrder = rbuMPrintf(tls, p, ts+28827, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1515, ts+14571, ts+1515) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1515, ts+14565, ts+1515) } } 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+30716, + ts+30791, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30764 + return ts + 30839 } return ts + 1515 }(), @@ -125475,7 +126170,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19636 + return ts + 19711 } return ts + 1515 }(), zOrder, @@ -125543,9 +126238,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1515 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30109 + zPrefix = ts + 30184 } - zUpdate = Xsqlite3_mprintf(tls, ts+30770, + zUpdate = Xsqlite3_mprintf(tls, ts+30845, 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) @@ -125572,7 +126267,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -125604,7 +126299,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30800, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30875, 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)), 0) { case RBU_STATE_STAGE: @@ -125674,28 +126369,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6348, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6342, 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+6348) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30830, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6342) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30905, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30857, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3253, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30933, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3247, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6348, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6342, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30875, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30951, 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+6348, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6342, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -125728,11 +126423,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+30941, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31017, 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+24022, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24097, (*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)))) == '?' { @@ -125744,13 +126439,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30973, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6348), + zTarget = Xsqlite3_mprintf(tls, ts+31049, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6342), func() uintptr { if zExtra == uintptr(0) { return ts + 1515 } - return ts + 31005 + return ts + 31081 }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1515 @@ -125769,37 +126464,37 @@ 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+31007, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31083, -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+31022, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31098, 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+31039, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31115, -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+6348, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31055, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31131, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342, 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+31083, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31159, 0) } } @@ -125828,14 +126523,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31055, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31131, uintptr(0), uintptr(0), uintptr(0)) } } 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+31101, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31177, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -125944,7 +126639,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6348, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6342, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -125961,23 +126656,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31136, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31212, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6348) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6342) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6348) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6342) } - zOal = Xsqlite3_mprintf(tls, ts+31161, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31168, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31237, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31244, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -125998,12 +126693,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -126097,7 +126789,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23660, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23735, 0) return } @@ -126190,7 +126882,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31175) + ts+31251) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -126198,7 +126890,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31197, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31273, libc.VaList(bp, iCookie+1)) } } } @@ -126219,7 +126911,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31224, + ts+31300, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -126249,9 +126941,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31382, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31458, 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+31397, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31473, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126265,10 +126957,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31417, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31493, 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+31442) + ts+31518) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126282,12 +126974,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31550) + ts+31626) } 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+31615) + ts+31691) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126299,7 +126991,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31659, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31735, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126319,15 +127011,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17158) - rbuCopyPragma(tls, p, ts+16269) + rbuCopyPragma(tls, p, ts+17185) + rbuCopyPragma(tls, p, ts+16296) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31684, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31760, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126351,10 +127043,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14475, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14469, 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+14475, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14469, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126449,7 +127141,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31712, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31788, 0) } if rc == SQLITE_OK { @@ -126465,7 +127157,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31161, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31237, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126481,7 +127173,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31737, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31813, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126515,7 +127207,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31748, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31824, 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)), -1) } else { @@ -126545,13 +127237,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31820, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31896, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31834) + ts+31910) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126562,7 +127254,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31891) + ts+31967) 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)), 0) @@ -126592,10 +127284,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -126606,7 +127299,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3630, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3624, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -126635,7 +127328,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+31965, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32041, 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 @@ -126653,12 +127346,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31997, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32073, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32029 + return ts + 32105 } - return ts + 32036 + return ts + 32112 }())) } } @@ -126666,7 +127359,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+14460, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14454, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -126677,19 +127370,19 @@ 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+16872) - rbuCopyPragma(tls, p, ts+16284) + rbuCopyPragma(tls, p, ts+16899) + rbuCopyPragma(tls, p, ts+16311) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32043, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32119, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6348, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6342, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32059, uintptr(0), uintptr(0), p+64) + db, ts+32135, uintptr(0), uintptr(0), p+64) } } @@ -126743,7 +127436,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32083, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32159, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -126770,7 +127463,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30109, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30184, 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++ @@ -126787,7 +127480,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14475, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14469, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -126800,13 +127493,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14475, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14469, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32091, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32167, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126901,7 +127594,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14475, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14469, uintptr(0), uintptr(0), uintptr(0)) } } @@ -126918,19 +127611,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14475, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14469, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14460 + zBegin = ts + 14454 } else { - zBegin = ts + 32043 + zBegin = ts + 32119 } 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+32043, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32119, uintptr(0), uintptr(0), uintptr(0)) } } @@ -126938,6 +127631,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -126956,7 +127671,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -127251,7 +127966,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32118, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32194, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127276,7 +127991,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+32141, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32217, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127321,7 +128036,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217475) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -130132,7 +130847,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217495) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -130174,7 +130889,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217549) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -130235,7 +130950,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217637) } } @@ -130309,13 +131024,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217723)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217729)) } if paRec != 0 { @@ -130377,7 +131092,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217773)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -130741,7 +131456,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218122) goto finished_invert __6: ; @@ -130909,7 +131624,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+11253) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11247) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM @@ -130920,34 +131635,34 @@ 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+32728, bp+16) + sessionAppendStr(tls, bp, ts+32804, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32741, bp+16) + sessionAppendStr(tls, bp, ts+32817, bp+16) 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32823, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14571 + zSep = ts + 14565 } } zSep = ts + 1515 - sessionAppendStr(tls, bp, ts+32676, bp+16) + sessionAppendStr(tls, bp, ts+32752, 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+32752, bp+16) + ts+32828, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32684, bp+16) + sessionAppendStr(tls, bp, ts+32760, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21350 + zSep = ts + 21425 } } @@ -130999,37 +131714,37 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32827, bp+16) + sessionAppendStr(tls, bp, ts+32903, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32676, bp+16) + sessionAppendStr(tls, bp, ts+32752, 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+32747, bp+16) + sessionAppendStr(tls, bp, ts+32823, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21350 + zSep = ts + 21425 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32845, bp+16) + sessionAppendStr(tls, bp, ts+32921, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32388, bp+16) + sessionAppendStr(tls, bp, ts+32464, bp+16) zSep = ts + 1515 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+32684, bp+16) + sessionAppendStr(tls, bp, ts+32760, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32853 + zSep = ts + 32929 } } - sessionAppendStr(tls, bp, ts+4924, bp+16) + sessionAppendStr(tls, bp, ts+4918, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -131042,7 +131757,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6348, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6342, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -131053,21 +131768,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32858, bp+16) + sessionAppendStr(tls, bp, ts+32934, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21356, bp+16) + sessionAppendStr(tls, bp, ts+21431, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14571, bp+16) + sessionAppendStr(tls, bp, ts+14565, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32876, bp+16) + sessionAppendStr(tls, bp, ts+32952, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32887, bp+16) + sessionAppendStr(tls, bp, ts+32963, bp+16) } - sessionAppendStr(tls, bp, ts+4924, bp+16) + sessionAppendStr(tls, bp, ts+4918, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -131081,14 +131796,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11253, p) + var rc int32 = sessionSelectRow(tls, db, ts+11247, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32891) + ts+32967) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33004) + ts+33080) } return rc } @@ -131116,7 +131831,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218600) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131369,7 +132084,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33148, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33224, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131385,7 +132100,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+33169, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33245, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131458,10 +132173,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33188, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33264, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33214, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33290, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -131494,7 +132209,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3630, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131507,7 +132222,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6348, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6342, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -131520,19 +132235,19 @@ 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+33244, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33320, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33288, + ts+33364, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33359, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33435, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11253) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11247) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131583,14 +132298,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33419, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33495, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33449, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33525, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33473, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33449, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33549, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33525, uintptr(0), uintptr(0), uintptr(0)) } } @@ -132838,7 +133553,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33501, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33577, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133126,7 +133841,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33529, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33605, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133313,7 +134028,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+33560, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33636, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133381,7 +134096,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33567 + var zErr uintptr = ts + 33643 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133563,7 +134278,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33617 + var zErr uintptr = ts + 33693 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133887,13 +134602,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33665, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33741, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33673, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33749, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33683, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33759, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134304,7 +135019,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6148, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6142, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134444,7 +135159,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33688, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33764, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134471,14 +135186,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+33695, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33771, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33726, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33802, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134489,7 +135204,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33759, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33835, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134502,7 +135217,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33796, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33872, 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))) @@ -134511,7 +135226,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+33805, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33881, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134530,7 +135245,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33838, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33914, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134545,14 +135260,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33872, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33948, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33880, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33956, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33912, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33988, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134560,9 +135275,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33918, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33994, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33932, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34008, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134570,9 +135285,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33970, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34046, 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+33981, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34057, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -134580,21 +135295,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5042, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5036, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7925, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17263}, - {FzName: ts + 34016, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7919, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17290}, + {FzName: ts + 34092, 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+34024, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34100, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34055, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34131, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -134641,15 +135356,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22016) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16185) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34083, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22091) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16212) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34159, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34113) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34189) { *(*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+34123, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34199, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -134666,13 +135381,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34154, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34230, 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+34159, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34235, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34166, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34242, libc.VaList(bp+16, i)) } } } @@ -134710,8 +135425,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+22016) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34174, 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+22091) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34250, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -134743,7 +135458,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+34203, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34279, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -134780,19 +135495,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 + 33872 + zTail = ts + 33948 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34223 + zTail = ts + 34299 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34231, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34307, 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+16185, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16212, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -134836,18 +135551,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34242, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34318, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1515 } - return ts + 14571 + return ts + 14565 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34258, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34334, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34265, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22016)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34341, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22091)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -134957,7 +135672,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34291) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34367) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -134967,7 +135682,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+34296) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34372) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -134977,7 +135692,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+34305) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34381) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -134990,7 +135705,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+34315) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34391) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135000,7 +135715,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+34325) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34401) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135016,7 +135731,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+22016) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22091) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -135039,7 +135754,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34337 + var zSelect uintptr = ts + 34413 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -135061,7 +135776,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34369) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34445) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -135075,7 +135790,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34377, + ts+34453, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -135173,7 +135888,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34442, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34518, 0) return FTS5_EOF } } @@ -135186,20 +135901,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+34462, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34538, 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+34493, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34569, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34496, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34572, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29879, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29954, uint64(3)) == 0 { tok = FTS5_AND } break @@ -136966,9 +137681,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34500, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34576, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33529, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33605, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -136984,7 +137699,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+34505, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34581, 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') @@ -137071,7 +137786,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20353, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20428, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -137152,7 +137867,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34534, 0) + ts+34610, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137322,12 +138037,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+34587, + ts+34663, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34637 + return ts + 34713 } - return ts + 34500 + return ts + 34576 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138270,7 +138985,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34644, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34720, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -138349,7 +139064,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+34650, + ts+34726, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138374,7 +139089,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34701, + ts+34777, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -138397,7 +139112,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34750, + ts+34826, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -138636,7 +139351,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34790, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34866, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -138709,13 +139424,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -139835,7 +140550,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34813, + ts+34889, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141194,10 +141909,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -141225,7 +141940,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141301,7 +142016,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+34897, + ts+34973, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141344,7 +142059,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -141356,7 +142071,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -141476,7 +142191,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -141875,12 +142590,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -141891,7 +142606,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -142072,7 +142787,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -142196,7 +142911,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -142205,7 +142920,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -142237,8 +142952,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -142291,8 +143006,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -142378,13 +143093,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+34954, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35030, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24872, ts+34962, 0, pzErr) + pConfig, ts+24947, ts+35038, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11393, - ts+34997, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11387, + ts+35073, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -142637,7 +143352,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+34644, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34720, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -142751,7 +143466,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35041, + ts+35117, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -142910,6 +143625,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -142917,7 +143636,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35127) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35203) 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)) @@ -143188,7 +143907,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+35132, 0) + ts+35208, 0) return SQLITE_ERROR } @@ -143219,7 +143938,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4942, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4936, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -143234,7 +143953,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4942, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4936, 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) @@ -143548,7 +144267,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143580,7 +144299,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -143612,11 +144331,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35171, + ts+35247, 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 + 14571 + return ts + 14565 } return ts + 1515 }(), @@ -143628,9 +144347,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35226 + return ts + 35302 } - return ts + 35231 + return ts + 35307 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -143676,12 +144395,12 @@ 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+35235, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35311, 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+5024, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5018, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35241, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35317, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -143712,7 +144431,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35269, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35345, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -143743,7 +144462,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35279, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35355, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -143775,14 +144494,14 @@ 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+35300, libc.VaList(bp, z)) + ts+35376, 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 + 33683 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33759 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -143838,7 +144557,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+35132, 0) + ts+35208, 0) return SQLITE_ERROR __1: ; @@ -144055,7 +144774,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35333, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35409, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -144176,7 +144895,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3630, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3624, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -144200,28 +144919,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35369, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35445, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35380, 0) + ts+35456, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35460, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35468, 0) + ts+35544, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16852, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16879, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35524, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35600, 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+35530, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35606, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144279,7 +144998,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17397, z) { + 0 == Xsqlite3_stricmp(tls, ts+17424, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -144292,12 +145011,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35546, + ts+35622, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20254 + return ts + 20329 } - return ts + 35583 + return ts + 35659 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -144927,7 +145646,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+35595, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35671, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -145171,7 +145890,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+35616, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35692, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -145190,7 +145909,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+35638, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35714, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -145237,7 +145956,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35669) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35745) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -145246,7 +145965,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35682, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35758, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145260,7 +145979,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35773, ts + 33872, ts + 24872, ts + 34223, ts + 11393, + ts + 35849, ts + 33948, ts + 24947, ts + 34299, ts + 11387, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145284,7 +146003,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35780, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35856, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145302,13 +146021,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35780, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35856, 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+35785, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35861, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145363,17 +146082,17 @@ 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)) = [11]uintptr{ - ts + 35800, - ts + 35868, - ts + 35937, - ts + 35970, - ts + 36009, - ts + 36049, - ts + 36088, - ts + 36129, - ts + 36168, - ts + 36210, - ts + 36250, + ts + 35876, + ts + 35944, + ts + 36013, + ts + 36046, + ts + 36085, + ts + 36125, + ts + 36164, + ts + 36205, + ts + 36244, + ts + 36286, + ts + 36326, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145440,7 +146159,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3630, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3624, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145475,18 +146194,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36273, + ts+36349, 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+36377, + ts+36453, 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+36415, + ts+36491, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145498,7 +146217,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36453, + ts+36529, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145510,14 +146229,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24872, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11393, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35773, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24947, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11387, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35849, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34223, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34299, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33872, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33948, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145529,17 +146248,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36495, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36571, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29525 + return ts + 29600 } return ts + 1515 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36525, + ts+36601, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145576,27 +146295,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36569, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36645, 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+36592, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36668, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33872, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33948, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34223, ts+36598, 0, pzErr) + pConfig, ts+34299, ts+36674, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35773, ts+36630, 1, pzErr) + pConfig, ts+35849, ts+36706, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34369, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34445, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -145802,12 +146521,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36647, + ts+36723, 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+36697, + ts+36773, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -145815,7 +146534,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34369, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34445, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -145991,7 +146710,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36726, + zSql = Xsqlite3_mprintf(tls, ts+36802, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -146173,14 +146892,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33872, bp+48) + rc = fts5StorageCount(tls, p, ts+33948, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34223, bp+56) + rc = fts5StorageCount(tls, p, ts+34299, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146375,9 +147094,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+36758) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36834) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36769) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36845) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146592,7 +147311,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 + 36780 + var zCat uintptr = ts + 36856 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -146604,7 +147323,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36789) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36865) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -146615,18 +147334,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+36800) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36876) { 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+36758) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36834) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36769) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36845) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36789) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36865) { } else { rc = SQLITE_ERROR } @@ -146902,7 +147621,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)) = uintptr(0) - var zBase uintptr = ts + 36818 + var zBase uintptr = ts + 36894 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147044,7 +147763,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36828, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36904, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147052,11 +147771,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36831, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36907, 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+36836, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36912, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147064,7 +147783,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36841, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36917, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147072,7 +147791,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36844, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36920, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147080,11 +147799,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36923, 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+36852, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36928, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147092,19 +147811,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36857, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36933, 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+36861, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36937, 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+36867, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, 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+36872, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147112,11 +147831,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36876, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36952, 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+36880, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147124,7 +147843,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36883, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147132,11 +147851,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36887, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36963, 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+36891, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147144,7 +147863,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36895, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36971, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147152,7 +147871,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36899, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147160,7 +147879,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36903, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147176,24 +147895,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36907, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36887, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36983, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36963, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36910, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36913, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36986, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36989, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36917, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36903, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36979, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -147208,137 +147927,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36920, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36996, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36887, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36963, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36928, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36935, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37011, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37016, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36836, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36912, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36945, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37021, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36831, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36907, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36950, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36903, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36979, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15398, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15425, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36913, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36989, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36964, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37040, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36828, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36904, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36969, 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+36872, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36948, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36979, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37055, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36895, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36971, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36903, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36979, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36887, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36963, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37001, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37077, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36887, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36963, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37082, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36828, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36904, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37012, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36975, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37020, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37096, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37028, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37104, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37032, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37108, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36895, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36971, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37040, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37116, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36828, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36904, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37122, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36899, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36975, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36913, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36989, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147353,16 +148072,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37059, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37135, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36844, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36920, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37064, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37140, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147370,21 +148089,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37069, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37145, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36844, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36920, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37151, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36844, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36920, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37104, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147392,7 +148111,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37157, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147400,9 +148119,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37163, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36828, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36904, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147417,12 +148136,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37093, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37169, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37097, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37173, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37176, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147431,7 +148150,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147587,7 +148306,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+37107) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37183) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -147767,22 +148486,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36818, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36894, 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 + 37122, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37198, 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 + 37128, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37204, 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 + 37135, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37211, 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 @@ -148925,14 +149644,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+37143) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37219) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37147) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37223) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37151) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37227) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37160, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37236, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -148958,19 +149677,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37194, - ts + 37234, - ts + 37269, + ts + 37270, + ts + 37310, + ts + 37345, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23168, *(*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+23243, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37312, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37388, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -149103,11 +149822,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+37345, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37421, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37376, + ts+37452, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -149131,7 +149850,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37427, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37503, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149526,7 +150245,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37453, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37529, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149548,7 +150267,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37463 + return ts + 37539 } func init() { @@ -150399,16 +151118,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -150465,12 +151184,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -150485,6 +151204,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_type *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -150506,5 +151226,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-7.5.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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-7.5.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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-11-16 12:10:08 89c459e766ea7e9165d0beeb124708b955a4950d0f4792f457465d71b158d318\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-11-16 12:10:08 89c459e766ea7e9165d0beeb124708b955a4950d0f4792f457465d71b158d318\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 69b763a42c..a58faba5f9 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -290,7 +290,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -760,7 +759,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -773,49 +772,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -824,21 +823,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -850,8 +849,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -863,22 +862,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -886,13 +885,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -907,13 +906,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0x0003 @@ -1388,7 +1387,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1484,6 +1483,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1619,6 +1619,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1649,6 +1650,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1749,6 +1751,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1822,7 +1826,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -1930,8 +1934,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2353,6 +2357,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3105,7 +3110,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3436,6 +3450,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3446,6 +3461,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5163,6 +5196,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5202,6 +5246,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5252,7 +5297,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5267,6 +5312,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5635,8 +5681,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5653,7 +5698,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -5915,8 +5959,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6261,17 +6305,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6301,7 +6334,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -6310,49 +6350,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 840, - ts + 866, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 860, ts + 886, - ts + 912, - ts + 935, - ts + 961, - ts + 983, - ts + 1004, - ts + 1015, - ts + 1023, - ts + 1037, - ts + 1050, + ts + 906, + ts + 932, + ts + 955, + ts + 981, + ts + 1003, + ts + 1024, + ts + 1035, + ts + 1043, + ts + 1057, + ts + 1070, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -6454,7 +6495,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -6501,10 +6541,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1083)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -6516,10 +6556,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -6529,21 +6565,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1070, - ts + 1074, - ts + 1079, - ts + 1083, - ts + 1091, - ts + 1096, + ts + 1090, + ts + 1094, + ts + 1099, + ts + 1103, + ts + 1111, + ts + 1116, } // SQL is translated into a sequence of instructions to be @@ -6842,7 +6870,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -6978,6 +7006,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7001,6 +7031,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7015,9 +7046,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7229,7 +7263,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1101, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1121, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -7255,13 +7289,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1109, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1129, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1117, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1137, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -7337,7 +7371,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -7359,7 +7393,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1121, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1141, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -7416,7 +7450,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1133) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1153) == 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))) @@ -7549,7 +7583,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1137, -1) + Xsqlite3_result_error(tls, pCtx, ts+1157, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -7573,12 +7607,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1160)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1167)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1174)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1181)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1188)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1195)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1180)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1187)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1194)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1201)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1208)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1215)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -7590,7 +7624,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1202) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1222) == 0 { if idx > 1 { return 1 } @@ -7612,7 +7646,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1207) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1227) == 0 { if idx > 1 { return 1 } @@ -7626,7 +7660,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1217) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1237) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -7634,7 +7668,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1227) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1247) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -7646,7 +7680,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1237) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1257) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -7680,9 +7714,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1241, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1261, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -7701,7 +7735,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { @@ -7715,14 +7749,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1260) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1286) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1271) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1291) == 0 { rc = 0 } break @@ -8048,7 +8082,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8058,13 +8092,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1280, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1300, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8082,41 +8116,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1287, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1307, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1292, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1298, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1318, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8129,7 +8163,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -8179,15 +8213,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1207}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1227}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1308}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1313}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1318}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1247}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1328}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1333}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1338}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {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 + 1369}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1387}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -8335,7 +8369,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -8599,7 +8633,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1380, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1400, libc.VaList(bp, nByte)) } return p } @@ -8632,7 +8666,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1418, + ts+1438, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9043,7 +9077,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9079,7 +9113,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9099,7 +9133,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9148,24 +9182,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -9481,7 +9542,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1454, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1474, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -9554,8 +9615,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1468)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1501)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1488)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1521)) 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)}, @@ -9767,7 +9828,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1508, 1) + Xsqlite3_str_append(tls, pAccum, ts+1528, 1) goto __5 __11: ; @@ -10328,7 +10389,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1510 + bufpt = ts + 1530 length = 3 goto __58 __127: @@ -10388,7 +10449,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1514, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1534, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -10729,7 +10790,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1518 + bufpt = ts + 1538 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -10853,9 +10914,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1519 + return ts + 1539 } - return ts + 1524 + return ts + 1544 }() __220: ; @@ -11003,7 +11064,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1531, 1) + Xsqlite3_str_append(tls, pAccum, ts+1551, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11020,10 +11081,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1533, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1553, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1543, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1563, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11078,7 +11139,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1557)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1577)) // 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 @@ -11243,7 +11304,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1518, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1538, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -11475,20 +11536,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11501,46 +11668,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -12836,7 +13003,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1566 + var pow63 uintptr = ts + 1586 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -13382,7 +13549,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1585, + ts+1605, libc.VaList(bp, zType)) } @@ -13401,13 +13568,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1519) + logBadConnection(tls, ts+1539) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1630) + logBadConnection(tls, ts+1650) } return 0 } else { @@ -13420,7 +13587,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1639) + logBadConnection(tls, ts+1659) return 0 } else { return 1 @@ -13945,193 +14112,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1647, - ts + 1657, - ts + 1668, - ts + 1680, - ts + 1691, - ts + 1703, - ts + 1710, - ts + 1718, - ts + 1726, - ts + 1731, - ts + 1737, + ts + 1667, + ts + 1677, + ts + 1688, + ts + 1700, + ts + 1711, + ts + 1723, + ts + 1730, + ts + 1738, + ts + 1746, ts + 1751, - ts + 1757, - ts + 1767, - ts + 1772, - ts + 1777, - ts + 1780, - ts + 1786, - ts + 1799, - ts + 1809, - ts + 1813, - ts + 1820, - ts + 1827, - ts + 1834, - ts + 1841, - ts + 1851, + ts + 1756, + ts + 1762, + ts + 1776, + ts + 1782, + ts + 1792, + ts + 1797, + ts + 1802, + ts + 1805, + ts + 1811, + ts + 1818, + ts + 1822, + ts + 1832, + ts + 1839, + ts + 1846, + ts + 1853, ts + 1860, - ts + 1871, - ts + 1880, - ts + 1886, - ts + 1896, - ts + 1906, - ts + 1911, - ts + 1921, - ts + 1932, - ts + 1937, - ts + 1944, - ts + 1955, - ts + 1960, - ts + 1965, - ts + 1971, - ts + 1977, - ts + 1983, - ts + 1989, - ts + 1992, + ts + 1870, + ts + 1879, + ts + 1890, + ts + 1899, + ts + 1905, + ts + 1915, + ts + 1925, + ts + 1930, + ts + 1940, + ts + 1951, + ts + 1956, + ts + 1963, + ts + 1974, + ts + 1979, + ts + 1984, + ts + 1990, ts + 1996, - ts + 2007, - ts + 2018, + ts + 2002, + ts + 2005, + ts + 2009, + ts + 2015, ts + 2026, - ts + 2035, - ts + 2041, - ts + 2048, - ts + 2056, - ts + 2059, - ts + 2062, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, + ts + 2037, + ts + 2045, + ts + 2054, + ts + 2061, + ts + 2069, + ts + 2072, + ts + 2075, + ts + 2078, ts + 2081, - ts + 2091, - ts + 2104, - ts + 2115, - ts + 2121, - ts + 2128, - ts + 2133, - ts + 2142, - ts + 2151, - ts + 2158, - ts + 2171, - ts + 2182, - ts + 2187, - ts + 2195, + ts + 2084, + ts + 2087, + ts + 2094, + ts + 2100, + ts + 2110, + ts + 2123, + ts + 2134, + ts + 2140, + ts + 2147, + ts + 2156, + ts + 2165, + ts + 2172, + ts + 2185, + ts + 2196, ts + 2201, - ts + 2208, - ts + 2220, - ts + 2225, + ts + 2209, + ts + 2215, + ts + 2222, ts + 2234, ts + 2239, ts + 2248, ts + 2253, - ts + 2258, - ts + 2264, + ts + 2262, + ts + 2267, ts + 2272, - ts + 2280, - ts + 2290, - ts + 2298, - ts + 2305, - ts + 2318, - ts + 2323, - ts + 2335, - ts + 2343, - ts + 2350, - ts + 2361, - ts + 2368, + ts + 2278, + ts + 2286, + ts + 2294, + ts + 2304, + ts + 2312, + ts + 2319, + ts + 2332, + ts + 2337, + ts + 2349, + ts + 2357, + ts + 2364, ts + 2375, - ts + 2385, - ts + 2394, - ts + 2405, - ts + 2411, - ts + 2422, - ts + 2432, - ts + 2442, - ts + 2449, - ts + 2455, - ts + 2465, - ts + 2476, - ts + 2480, - ts + 2489, - ts + 2498, - ts + 2505, - ts + 2515, - ts + 2522, - ts + 2531, - ts + 2541, - ts + 2548, - ts + 2556, + ts + 2382, + ts + 2389, + ts + 2399, + ts + 2408, + ts + 2419, + ts + 2425, + ts + 2436, + ts + 2446, + ts + 2456, + ts + 2463, + ts + 2469, + ts + 2479, + ts + 2490, + ts + 2494, + ts + 2503, + ts + 2512, + ts + 2519, + ts + 2529, + ts + 2536, + ts + 2545, + ts + 2555, + ts + 2562, ts + 2570, - ts + 2578, + ts + 2584, ts + 2592, - ts + 2603, - ts + 2616, - ts + 2627, - ts + 2633, - ts + 2645, - ts + 2654, - ts + 2662, - ts + 2671, - ts + 2680, - ts + 2687, - ts + 2695, - ts + 2702, - ts + 2713, + ts + 2606, + ts + 2617, + ts + 2630, + ts + 2641, + ts + 2647, + ts + 2659, + ts + 2668, + ts + 2676, + ts + 2685, + ts + 2694, + ts + 2701, + ts + 2709, + ts + 2716, ts + 2727, - ts + 2738, - ts + 2746, + ts + 2741, ts + 2752, ts + 2760, - ts + 2768, - ts + 2778, - ts + 2791, - ts + 2801, - ts + 2814, - ts + 2823, - ts + 2834, - ts + 2842, + ts + 2766, + ts + 2774, + ts + 2782, + ts + 2792, + ts + 2805, + ts + 2815, + ts + 2828, + ts + 2837, ts + 2848, - ts + 2860, - ts + 2872, - ts + 2880, - ts + 2892, - ts + 2905, - ts + 2915, - ts + 2925, - ts + 2930, - ts + 2942, - ts + 2954, - ts + 2964, - ts + 2970, - ts + 2980, - ts + 2987, - ts + 2999, - ts + 3010, - ts + 3018, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3052, - ts + 3063, - ts + 3076, - ts + 3086, - ts + 3093, - ts + 3101, - ts + 3110, - ts + 3116, + ts + 2856, + ts + 2862, + ts + 2874, + ts + 2886, + ts + 2894, + ts + 2906, + ts + 2919, + ts + 2929, + ts + 2939, + ts + 2944, + ts + 2956, + ts + 2968, + ts + 2978, + ts + 2984, + ts + 2994, + ts + 3001, + ts + 3013, + ts + 3024, + ts + 3032, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3066, + ts + 3077, + ts + 3090, + ts + 3100, + ts + 3107, + ts + 3115, ts + 3124, - ts + 3132, - ts + 3140, - ts + 3150, - ts + 3159, - ts + 3170, - ts + 3180, - ts + 3186, - ts + 3197, - ts + 3208, - ts + 3213, - ts + 3221, + ts + 3130, + ts + 3138, + ts + 3146, + ts + 3154, + ts + 3164, + ts + 3173, + ts + 3184, + ts + 3194, + ts + 3200, + ts + 3211, + ts + 3222, + ts + 3227, + ts + 3235, } type timeval = struct { @@ -14339,35 +14506,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3231, FpCurrent: 0}, - {FzName: ts + 3236, FpCurrent: 0}, - {FzName: ts + 3242, FpCurrent: 0}, - {FzName: ts + 3249, FpCurrent: 0}, + {FzName: ts + 3245, FpCurrent: 0}, + {FzName: ts + 3250, FpCurrent: 0}, {FzName: ts + 3256, FpCurrent: 0}, - {FzName: ts + 3261, FpCurrent: 0}, - {FzName: ts + 3267, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3288}, - {FzName: ts + 3294}, - {FzName: ts + 3302, FpCurrent: 0}, + {FzName: ts + 3263, FpCurrent: 0}, + {FzName: ts + 3270, FpCurrent: 0}, + {FzName: ts + 3275, FpCurrent: 0}, + {FzName: ts + 3281, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3302}, {FzName: ts + 3308}, - {FzName: ts + 3315}, - {FzName: ts + 3324, FpCurrent: 0}, - {FzName: ts + 3331}, - {FzName: ts + 3341, FpCurrent: 0}, - {FzName: ts + 3348, FpCurrent: 0}, + {FzName: ts + 3316, FpCurrent: 0}, + {FzName: ts + 3322}, + {FzName: ts + 3329}, + {FzName: ts + 3338, FpCurrent: 0}, + {FzName: ts + 3345}, + {FzName: ts + 3355, FpCurrent: 0}, {FzName: ts + 3362, FpCurrent: 0}, - {FzName: ts + 3368, FpCurrent: 0}, - {FzName: ts + 3374, FpCurrent: 0}, - {FzName: ts + 3381, FpCurrent: 0}, - {FzName: ts + 3389, FpCurrent: 0}, - {FzName: ts + 3394, FpCurrent: 0}, - {FzName: ts + 3401}, + {FzName: ts + 3376, FpCurrent: 0}, + {FzName: ts + 3382, FpCurrent: 0}, + {FzName: ts + 3388, FpCurrent: 0}, + {FzName: ts + 3395, FpCurrent: 0}, + {FzName: ts + 3403, FpCurrent: 0}, {FzName: ts + 3408, FpCurrent: 0}, - {FzName: ts + 3420, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3435}, + {FzName: ts + 3415}, + {FzName: ts + 3422, FpCurrent: 0}, + {FzName: ts + 3434, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3449}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -14460,11 +14627,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3441, libc.VaList(bp, z, fd)) + ts+3455, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3484, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3498, O_RDONLY, int32(m)) < 0 { break } } @@ -14544,13 +14714,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno(tls))) - zErr = ts + 1518 + zErr = ts + 1538 if zPath == uintptr(0) { - zPath = ts + 1518 + zPath = ts + 1538 } Xsqlite3_log(tls, errcode, - ts+3494, + ts+3508, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14558,7 +14728,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3236, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3250, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14579,7 +14749,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -14681,19 +14851,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3525, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3539, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == Nlink_t(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3549, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3563, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > Nlink_t(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3578, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3592, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3605, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3619, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15055,7 +15225,7 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15315,7 +15485,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3633, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3647, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15333,7 +15503,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3348, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3362, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15350,14 +15520,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3636, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3650, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -15377,7 +15547,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3267, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3281, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { return SQLITE_OK } @@ -15428,7 +15598,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1518, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1538, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -15496,7 +15666,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -15632,7 +15802,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -15660,7 +15830,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3267, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3281, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -15723,7 +15893,7 @@ __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+3647, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3661, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -15744,7 +15914,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3654, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3668, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -15759,7 +15929,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3231, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3245, zShm, 41333) goto shm_open_err __10: ; @@ -15885,11 +16055,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 128)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1518, 1, bp+128) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1538, 1, bp+128) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3302, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3316, zFile, 41477) goto shmpage_out __14: ; @@ -15935,7 +16105,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3389, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3403, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -16188,10 +16358,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3667, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3681, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3672) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3686) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -16207,7 +16377,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -16220,7 +16390,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3682, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3696, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16228,7 +16398,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16241,15 +16411,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3690, - ts + 3699, - ts + 3708, - ts + 1531, + ts + 3704, + ts + 3713, + ts + 3722, + ts + 1551, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3713) - azTempDirs[1] = libc.Xgetenv(tls, ts+3727) + azTempDirs[0] = libc.Xgetenv(tls, ts+3727) + azTempDirs[1] = libc.Xgetenv(tls, ts+3741) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16294,7 +16464,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3734, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3748, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16379,7 +16549,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3751) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3765) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16427,10 +16597,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -16544,7 +16714,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3231, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3245, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -16635,7 +16805,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+3341, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3355, zPath, 43046) } return rc } @@ -16643,9 +16813,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+3758, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3772, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -16712,18 +16882,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3429, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3443, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&Mode_t(0170000) == Mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+128, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3420, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3434, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 128 + uintptr(got))) = int8(0) @@ -16763,14 +16933,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3249, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3263, zPath, 43223) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -16802,7 +16972,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3633, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3647, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -16830,11 +17000,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3764, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3778, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -16845,7 +17015,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -16922,10 +17092,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3777, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3782, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3792, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3672, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3791, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3796, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3806, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3686, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -16980,7 +17150,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3805, + FzName: ts + 3819, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17147,40 +17317,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -17191,7 +17406,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3811, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3825, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17247,7 +17462,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -17323,7 +17538,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3633, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3647, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17444,7 +17659,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3826, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3840, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -17517,7 +17732,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3849, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3863, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -17580,6 +17795,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -18263,6 +18483,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18295,6 +18516,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -20721,7 +20943,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3864, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3878, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -21820,7 +22042,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -21881,7 +22103,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3891, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3905, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -21894,7 +22116,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3900, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3914, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -21946,9 +22168,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3905, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3919, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3912, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3926, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22212,7 +22434,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22336,7 +22558,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22375,7 +22597,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -22531,6 +22753,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -23404,7 +23627,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -23589,7 +23812,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3922, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3936, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24161,7 +24384,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24260,7 +24483,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -24428,7 +24651,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3940, + ts+3954, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -24846,7 +25069,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -24991,7 +25214,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3977, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+3991, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25121,7 +25344,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -25594,7 +25817,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -26099,7 +26322,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -26490,7 +26713,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4003)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4017)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -26755,7 +26978,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -26892,7 +27115,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -26909,7 +27132,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -26917,7 +27140,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -26960,7 +27183,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -26970,7 +27193,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -27220,7 +27443,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27252,8 +27475,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27268,7 +27490,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -27278,7 +27500,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27291,7 +27513,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -27300,14 +27522,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -27317,7 +27539,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -27364,63 +27586,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -27452,10 +27668,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -27466,15 +27681,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -27499,7 +27714,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -27510,7 +27725,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -27558,26 +27773,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -27587,7 +27802,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -27595,7 +27810,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -27603,10 +27818,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -27675,7 +27890,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -27705,11 +27920,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -27720,15 +27935,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -27756,14 +27971,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -27777,7 +27992,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -27789,7 +28004,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -27892,7 +28107,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -27920,7 +28135,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -27959,7 +28174,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -27983,7 +28198,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -28032,7 +28247,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4019) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4033) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -28793,7 +29008,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4028, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4042, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -28831,7 +29046,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -29246,7 +29461,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29272,7 +29487,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -29280,6 +29495,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29289,7 +29507,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29305,7 +29523,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29366,7 +29584,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -29401,7 +29619,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -29461,7 +29679,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -29500,7 +29718,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -29531,7 +29749,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -29872,7 +30090,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30116,14 +30334,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30168,7 +30386,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30217,7 +30435,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -30296,10 +30514,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30307,7 +30523,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30369,7 +30586,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30389,7 +30606,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -30409,7 +30626,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -30621,7 +30838,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -30825,7 +31042,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -30890,7 +31107,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -30938,7 +31155,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -31057,7 +31274,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31217,7 +31434,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -31282,7 +31499,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -31318,7 +31535,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -31362,7 +31579,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -31474,7 +31691,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -31632,7 +31849,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -31689,7 +31906,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -31705,7 +31922,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -31779,7 +31996,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -31791,7 +32008,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -31802,7 +32019,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -31967,7 +32184,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32239,12 +32456,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -32252,7 +32469,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -32312,7 +32529,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -32401,7 +32618,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -32517,7 +32734,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -32835,7 +33052,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -32846,7 +33063,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -33004,7 +33221,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -33078,7 +33295,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -33140,7 +33357,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -33168,7 +33385,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -33429,7 +33646,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -33621,7 +33838,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -33658,6 +33875,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -33748,7 +33967,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -33771,7 +33990,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -33851,7 +34070,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -33964,7 +34183,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -34025,7 +34244,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34063,13 +34282,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -34176,7 +34395,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34199,7 +34418,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34300,7 +34519,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -34308,11 +34527,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34387,7 +34606,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -34456,7 +34675,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -34485,7 +34704,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -34561,7 +34780,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -34575,7 +34794,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -34709,7 +34928,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -34897,7 +35116,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4032, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4046, 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)) @@ -34922,11 +35141,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4034, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4048, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4057, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4071, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { @@ -34947,13 +35166,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4082, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4096, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4111, + ts+4125, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -34972,7 +35191,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4165, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4179, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -34983,7 +35202,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4187, libc.VaList(bp+8, iPage)) + ts+4201, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35006,12 +35225,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4226, + ts+4240, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4252 + return ts + 4266 } - return ts + 4257 + return ts + 4271 }(), expected-N, expected)) } @@ -35118,13 +35337,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4278 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4292 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4288, libc.VaList(bp, rc)) + ts+4302, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35135,7 +35354,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4326, libc.VaList(bp+8, rc)) + ts+4340, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35143,14 +35362,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4364, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4378, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4386 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4400 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35167,7 +35386,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4412 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4426 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35192,7 +35411,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4440, + checkAppendMsg(tls, pCheck, ts+4454, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35205,7 +35424,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4470, 0) + checkAppendMsg(tls, pCheck, ts+4484, 0) doCoverageCheck = 0 goto __10 __13: @@ -35221,7 +35440,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4494, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4508, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -35259,7 +35478,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4518, 0) + checkAppendMsg(tls, pCheck, ts+4532, 0) depth = d2 __21: ; @@ -35332,7 +35551,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4543, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4557, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -35349,7 +35568,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4580, + ts+4594, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -35469,7 +35688,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4632 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4646 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)).FzPfx = uintptr(0) @@ -35505,7 +35724,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4648, + ts+4662, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -35515,7 +35734,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4693, 0) + ts+4707, 0) __16: ; __10: @@ -35562,13 +35781,13 @@ __23: 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+4748, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4762, 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+4770, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4784, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -35803,6 +36022,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -35816,8 +36044,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -35825,7 +36053,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3633, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3647, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -35836,7 +36064,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4804, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4818, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -35851,7 +36079,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4824, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4838, 0) return SQLITE_ERROR } return SQLITE_OK @@ -35871,7 +36099,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4855, 0) + pDestDb, SQLITE_ERROR, ts+4869, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36319,7 +36547,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+4895, + Xsqlite3_str_appendf(tls, bp+8, ts+4909, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -36736,6 +36964,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -36751,7 +36992,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -36811,6 +37052,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -36893,7 +37137,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1518 + return ts + 1538 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -37125,7 +37369,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37357,7 +37601,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3633, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3647, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -37419,7 +37663,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1518 + zNeg = ts + 1538 rc = SQLITE_OK __1: @@ -37460,7 +37704,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4902 + zNeg = ts + 4916 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -37479,7 +37723,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4904, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4918, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -37783,7 +38027,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -37798,14 +38042,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -37864,6 +38108,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -37888,10 +38135,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -37929,21 +38176,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38292,85 +38547,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -38470,6 +38757,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -38497,7 +38794,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -38505,12 +38802,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -38529,7 +38826,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -38580,7 +38879,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -38709,8 +39008,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -38721,10 +39020,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -38735,6 +39030,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -38750,34 +39050,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4909, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4923, 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 + 1518 + zColl = ts + 1538 } - if libc.Xstrcmp(tls, zColl, ts+1063) == 0 { - zColl = ts + 4914 + if libc.Xstrcmp(tls, zColl, ts+1083) == 0 { + zColl = ts + 4928 } - Xsqlite3_str_appendf(tls, bp+144, ts+4916, + Xsqlite3_str_appendf(tls, bp+144, ts+4930, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4902 + return ts + 4916 } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4924 + return ts + 4938 } - return ts + 1518 + return ts + 1538 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4927, 1) + Xsqlite3_str_append(tls, bp+144, ts+4941, 1) break } @@ -38785,7 +39085,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4929, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4943, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -38793,32 +39093,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1298, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1292, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1312, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -38828,13 +39128,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1298, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, 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+1292, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1312, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1519 + zP4 = ts + 1539 } else { - zP4 = ts + 4948 + zP4 = ts + 4962 } break @@ -38842,7 +39142,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4955, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4969, libc.VaList(bp+120, pVtab)) break } @@ -38853,20 +39153,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4963, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4977, 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+4968, 1) + Xsqlite3_str_append(tls, bp+144, ts+4982, 1) break } case -4: { - zP4 = ts + 4970 + zP4 = ts + 4984 break } @@ -38891,7 +39191,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4978, ts + 4980, ts + 4982, ts + 4987} +var encnames = [4]uintptr{ts + 4992, ts + 4994, ts + 4996, ts + 5001} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -38993,7 +39293,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39342,8 +39642,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 4992, ts + 4997, ts + 5004, ts + 5007, ts + 5010, ts + 5013, ts + 5016, ts + 5019, - ts + 5027, ts + 5030, ts + 5037, ts + 5045, + ts + 5006, ts + 5011, ts + 5018, ts + 5021, ts + 5024, ts + 5027, ts + 5030, ts + 5033, + ts + 5041, ts + 5044, ts + 5051, ts + 5059, } // Close a VDBE cursor and release all the resources that cursor @@ -39552,7 +39852,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5052, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5066, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -39560,16 +39860,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5064, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5078, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5078, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5092, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5093, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5107, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -39715,7 +40015,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5106, 0) + Xsqlite3VdbeError(tls, p, ts+5120, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -39995,7 +40295,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40005,14 +40305,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40023,16 +40325,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40049,7 +40347,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -40600,16 +40898,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -40627,7 +40929,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -40657,7 +40963,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -40691,7 +40997,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -40714,7 +41020,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -40736,7 +41042,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -40880,7 +41193,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -41051,7 +41364,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41077,7 +41390,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41120,7 +41433,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -41188,13 +41501,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5136 + zContext = ts + 5150 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5155 + zContext = ts + 5169 } else { - zContext = ts + 5174 + zContext = ts + 5188 } - zMsg = Xsqlite3_mprintf(tls, ts+5183, + zMsg = Xsqlite3_mprintf(tls, ts+5197, 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) @@ -41225,7 +41538,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41280,7 +41593,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41299,7 +41612,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5219, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5233, 0) return 1 } else { return 0 @@ -41309,7 +41622,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5264, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5278, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41351,14 +41664,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -41570,6 +41884,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -41766,7 +42084,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5304, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5318, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -41957,7 +42275,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42032,7 +42350,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5327) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5341) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -42461,35 +42779,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5337, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5351, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -42504,7 +42821,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -42536,7 +42853,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42551,7 +42868,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42562,7 +42879,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -42572,7 +42889,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42648,7 +42965,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42792,7 +43109,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -42810,8 +43127,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -42875,7 +43195,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -43019,7 +43339,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -43191,7 +43511,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5377, 3) + Xsqlite3_str_append(tls, bp+48, ts+5391, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -43227,11 +43547,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1519, 4) + Xsqlite3_str_append(tls, bp+48, ts+1539, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1298, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1318, 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+4895, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4909, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43246,21 +43566,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5381, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5395, 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+5388, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5402, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5401, 2) + Xsqlite3_str_append(tls, bp+48, ts+5415, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5409, 1) + Xsqlite3_str_append(tls, bp+48, ts+5423, 1) } } } @@ -43316,7 +43636,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -43420,12 +43741,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -43477,11 +43797,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1079, - ts + 1091, - ts + 1096, - ts + 1074, - ts + 1519, + ts + 1099, + ts + 1111, + ts + 1116, + ts + 1094, + ts + 1539, } // Execute as much of a VDBE program as we can. @@ -43519,7 +43839,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -43548,11 +43867,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -43622,42 +43944,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -43665,52 +43988,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -43752,19 +44075,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -43773,7 +44096,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -43781,11 +44104,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44021,7 +44344,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -44517,20 +44840,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5411, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5425, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5432, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5446, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5439, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5453, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -44920,14 +45243,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45005,72 +45328,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45087,10 +45418,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -45102,33 +45433,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45137,43 +45468,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45189,26 +45520,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45216,12 +45547,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45236,17 +45567,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45261,163 +45592,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -45426,20 +45757,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -45449,15 +45780,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -45465,9 +45796,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -45479,52 +45810,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -45533,24 +45864,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -45564,13 +45895,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -45579,38 +45910,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -45619,10 +45950,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -45630,10 +45961,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -45641,35 +45972,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -45677,372 +46046,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46050,15 +46420,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46067,124 +46437,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5463, + Xsqlite3VdbeError(tls, p, ts+5477, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46194,40 +46564,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46245,339 +46615,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -46586,20 +46956,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -46610,244 +46980,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5504, 0) + Xsqlite3VdbeError(tls, p, ts+5518, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5555, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5569, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5577, 0) + ts+5591, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -46856,172 +47226,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5631, 0) + ts+5645, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5686 + return ts + 5700 } return func() uintptr { if iRollback != 0 { - return ts + 5734 + return ts + 5748 } - return ts + 5777 + return ts + 5791 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5818) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5832) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47041,36 +47411,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47078,22 +47448,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47104,24 +47474,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -47129,30 +47499,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47168,10 +47538,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47180,10 +47550,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47203,83 +47573,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1538 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47288,31 +47658,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47320,10 +47690,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47344,105 +47714,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -47454,231 +47824,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -47688,85 +48060,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -47774,59 +48146,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -47841,121 +48213,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -47963,93 +48335,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48062,7 +48434,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -48077,81 +48449,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48161,38 +48533,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48200,205 +48572,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -48408,90 +48780,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -48500,36 +48872,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -48540,88 +48912,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5846) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5860) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -48633,35 +49005,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -48670,63 +49042,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -48735,13 +49107,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -48749,20 +49121,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -48772,45 +49144,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -48823,10 +49195,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -48837,10 +49209,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -48848,30 +49220,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5863 + goto __797 +__796: + zSchema = ts + 5877 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5877, + ts+5891, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -48881,36 +49253,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -48918,10 +49290,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -48953,22 +49325,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -48978,15 +49350,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -48996,17 +49368,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -49016,34 +49388,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49052,48 +49424,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5920, 0) + Xsqlite3VdbeError(tls, p, ts+5934, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -49101,10 +49473,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49126,24 +49498,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49175,78 +49547,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49254,11 +49626,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49274,14 +49646,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -49289,16 +49661,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49306,16 +49678,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49326,10 +49698,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -49352,73 +49724,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -49428,22 +49800,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -49456,32 +49828,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -49493,70 +49865,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5957, + ts+5971, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6009 + return ts + 6023 } - return ts + 6014 + return ts + 6028 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -49564,17 +49936,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -49584,10 +49956,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -49601,10 +49973,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -49614,69 +49986,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6021, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6035, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -49684,16 +50056,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -49706,17 +50078,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -49726,24 +50098,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -49751,52 +50123,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5327, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5341, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -49805,54 +50177,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -49860,69 +50232,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -49934,27 +50306,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -49962,42 +50334,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50006,41 +50378,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50054,16 +50426,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50075,25 +50447,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50102,24 +50474,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50144,16 +50516,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -50168,66 +50540,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6050, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6064, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -50248,73 +50620,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6056, + Xsqlite3_log(tls, rc, ts+6070, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50322,13 +50694,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5304, 0) + Xsqlite3VdbeError(tls, p, ts+5318, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1454, 0) + Xsqlite3VdbeError(tls, p, ts+1474, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -50339,10 +50711,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6088, ts + 6097, ts + 6104, - ts + 6110} +var azType = [4]uintptr{ts + 6102, ts + 6111, ts + 6118, + ts + 6124} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -50391,16 +50767,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6122, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6136, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6151 + return ts + 6165 } return func() uintptr { if type1 == U32(7) { - return ts + 6156 + return ts + 6170 } - return ts + 6161 + return ts + 6175 }() }())) rc = SQLITE_ERROR @@ -50420,10 +50796,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6169, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6183, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3633, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3647, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -50433,8 +50809,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -50454,7 +50830,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -50474,8 +50850,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -50483,21 +50859,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6189, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6203, 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+6219, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6233, 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+6255, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6269, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -50506,8 +50882,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -50540,8 +50916,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6276, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6290, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -50568,7 +50944,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6297 + zFault = ts + 6311 __22: ; goto __20 @@ -50601,7 +50977,7 @@ __26: 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 + 6309 + zFault = ts + 6323 __29: ; goto __27 @@ -50621,8 +50997,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6317, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6331, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -50691,7 +51067,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -50719,12 +51095,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3633 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3647 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -50768,7 +51144,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -50851,7 +51227,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -50864,7 +51240,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53285,11 +53661,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -53449,7 +53821,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6351, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6365, zDb) == 0) { goto __8 } @@ -53570,7 +53942,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6356) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6370) != 0) { goto __33 } goto __14 @@ -53726,14 +54098,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6358, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6372, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6362, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6376, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -53750,7 +54122,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6366, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6380, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -53844,7 +54216,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -53853,7 +54225,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -53908,7 +54280,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6375, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6389, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -53916,14 +54288,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6406, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6420, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) return WRC_Abort __87: ; @@ -53975,7 +54347,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6461, libc.VaList(bp+16, zCol)) + ts+6475, 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 @@ -54012,7 +54384,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6496 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6510 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54025,23 +54397,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6505 + zErr = ts + 6519 } else { - zErr = ts + 6520 + zErr = ts + 6534 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6542, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6556, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6555, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6569, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6579, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54144,15 +54516,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6572 + var zIn uintptr = ts + 6586 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6600 + zIn = ts + 6614 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6618 + zIn = ts + 6632 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6636 + zIn = ts + 6650 } - Xsqlite3ErrorMsg(tls, pParse, ts+6654, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6668, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54231,10 +54603,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6674 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6679 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6693 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54281,7 +54653,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6685, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6699, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54345,7 +54717,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6702, libc.VaList(bp, pExpr)) + ts+6716, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54361,7 +54733,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6766, + Xsqlite3ErrorMsg(tls, pParse, ts+6780, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54375,7 +54747,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6802, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6816, uintptr(0), pExpr) } } else { @@ -54398,30 +54770,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6830, libc.VaList(bp+16, pExpr)) + ts+6844, 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 + 6873 + zType = ts + 6887 } else { - zType = ts + 6880 + zType = ts + 6894 } - Xsqlite3ErrorMsg(tls, pParse, ts+6890, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6904, 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+6918, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6932, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6940, + Xsqlite3ErrorMsg(tls, pParse, ts+6954, 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+6984, + ts+6998, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54493,7 +54865,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7032, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7046, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -54509,7 +54881,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7043, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7057, pExpr, pExpr) } break @@ -54565,7 +54937,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -54640,7 +55012,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7054, libc.VaList(bp, i, zType, mx)) + ts+7068, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -54660,7 +55032,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7110, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7124, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -54695,7 +55067,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7144, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7158, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -54752,7 +55124,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7150, libc.VaList(bp, i+1)) + ts+7164, libc.VaList(bp, i+1)) return 1 } } @@ -54780,7 +55152,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7211, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7225, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -54994,7 +55366,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7242, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7256, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55034,7 +55406,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7144) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7158) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55045,7 +55417,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7281) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7295) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55057,7 +55429,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7287, 0) + ts+7301, 0) return WRC_Abort } @@ -55157,12 +55529,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -55198,12 +55570,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -55322,9 +55694,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -55412,14 +55782,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -55747,7 +56116,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) return } @@ -55822,7 +56191,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7346, libc.VaList(bp, mxHeight)) + ts+7360, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -55990,12 +56359,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56066,12 +56440,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7394, + Xsqlite3ErrorMsg(tls, pParse, ts+7408, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7438 + return ts + 7452 } - return ts + 1518 + return ts + 1538 }(), nElem)) break } @@ -56110,7 +56484,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7440) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7454) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56136,7 +56510,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7442, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7456, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56164,7 +56538,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7476, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7490, libc.VaList(bp, pExpr)) } } } @@ -56211,7 +56585,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7496, + Xsqlite3ErrorMsg(tls, pParse, ts+7510, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56236,7 +56610,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7539, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7553, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56257,11 +56631,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56290,7 +56661,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -56386,7 +56761,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -56810,7 +57185,7 @@ __2: 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+7562, + Xsqlite3ErrorMsg(tls, pParse, ts+7576, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -56933,7 +57308,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7592, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7606, libc.VaList(bp, zObject)) } } @@ -56943,10 +57318,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -56987,10 +57364,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6674) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6688) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6679) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6693) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -57421,13 +57798,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7615) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7623) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7637) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7643) == 0 { return 1 } return 0 @@ -57631,7 +58008,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7633, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7647, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -57709,7 +58086,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7880, + Xsqlite3ErrorMsg(tls, pParse, ts+7894, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59103,7 +59519,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59117,10 +59533,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59133,8 +59549,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59142,12 +59558,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59173,10 +59589,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59187,14 +59601,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59224,27 +59640,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59253,9 +59669,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59263,15 +59679,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7933, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7947, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59302,8 +59718,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7960, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7974, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -59425,8 +59841,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -59447,9 +59863,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -59462,13 +59878,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7562, + Xsqlite3ErrorMsg(tls, pParse, ts+7576, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -59479,11 +59895,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -59505,12 +59921,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -59525,14 +59941,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -59540,9 +59980,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -59552,15 +59992,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -59570,22 +60010,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -59594,51 +60034,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7984, 0) + ts+7998, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -59647,18 +60087,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8034)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8048)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -59870,7 +60310,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60109,6 +60549,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60335,6 +60776,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60480,7 +60922,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61006,7 +61452,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61024,8 +61472,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61093,6 +61540,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61116,7 +61565,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61139,7 +61590,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61152,7 +61603,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61172,7 +61625,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61312,7 +61767,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61320,7 +61775,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -61371,11 +61826,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 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+8050, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8064, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -61387,13 +61842,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8078, + ts+8092, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8253, + ts+8267, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -61403,10 +61858,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8427, libc.VaList(bp, zDb, zDb)) + ts+8441, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8574, 0) + ts+8588, 0) } } @@ -61470,7 +61925,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8725, libc.VaList(bp, zName)) + ts+8739, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -61480,7 +61935,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8784, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8798, zName)) { goto __6 } goto exit_rename_table @@ -61489,7 +61944,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8790, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8804, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -61530,19 +61985,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8817, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8831, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9001, + ts+9015, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9306, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9320, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9322, + ts+9336, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -61550,7 +62005,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9380, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9394, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -61562,7 +62017,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9645, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9659, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -61574,7 +62029,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9658, + ts+9672, libc.VaList(bp, zErr, zDb, zTab)) } @@ -61620,12 +62075,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9696, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9710, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9728, 0) + ts+9742, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -61635,11 +62090,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9755) + ts+9769) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9814) + ts+9828) } if pDflt != 0 { @@ -61652,12 +62107,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9867) + ts+9881) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9913) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9927) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -61668,7 +62123,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9940, + ts+9954, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -61690,7 +62145,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10086, + ts+10100, libc.VaList(bp+40, zTab, zDb)) } } @@ -61738,14 +62193,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10316, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10330, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10350, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10364, 0) goto exit_begin_add_column __4: ; @@ -61773,7 +62228,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10380, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10394, 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 } @@ -61813,18 +62268,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10399 + zType = ts + 10413 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10404 + zType = ts + 10418 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10418, + Xsqlite3ErrorMsg(tls, pParse, ts+10432, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10436 + return ts + 10450 } - return ts + 10453 + return ts + 10467 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -61908,11 +62363,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10471, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10485, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1518, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1538, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -61925,17 +62380,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10492, + ts+10506, 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+10674, + ts+10688, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9645, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9659, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62130,7 +62585,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -62193,12 +62648,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10805, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10819, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10828 + return ts + 10842 } - return ts + 1518 + return ts + 1538 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -62238,8 +62693,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10830, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10844, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62256,7 +62711,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62278,7 +62733,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10838, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10852, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62318,12 +62773,12 @@ 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+10844, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10858, 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 + 10828 + return ts + 10842 } - return ts + 1518 + return ts + 1538 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -62497,8 +62952,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -62581,15 +63036,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -62617,7 +63072,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -62650,13 +63105,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -62669,7 +63124,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -62684,7 +63139,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -62740,8 +63195,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -62789,7 +63244,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -62809,7 +63264,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1518, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1538, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -62857,8 +63312,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -62900,11 +63355,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -62974,7 +63429,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1518, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1538, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -62997,8 +63452,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63016,16 +63471,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63040,31 +63495,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63082,8 +63537,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63109,9 +63564,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63139,8 +63594,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -63177,7 +63632,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -63201,7 +63656,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10849, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10863, 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) @@ -63282,19 +63737,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10471, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10485, libc.VaList(bp, pName)) goto exit_drop_column __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+10856, + Xsqlite3ErrorMsg(tls, pParse, ts+10870, 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 + 10884 + return ts + 10898 } - return ts + 6097 + return ts + 6111 }(), zCol)) goto exit_drop_column @@ -63303,7 +63758,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10896, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10910, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63317,13 +63772,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1518, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1538, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10944, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10958, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11065, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11079, 1) 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 @@ -63441,11 +63896,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11083}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11104}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11124}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11143}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11162}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11097}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11118}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11138}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11157}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11176}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -63479,7 +63934,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11185, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11199, 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) } @@ -63488,10 +63943,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+11208, + ts+11222, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11238, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11252, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -63509,9 +63964,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11256, FzCols: ts + 11269}, - {FzName: ts + 11282, FzCols: ts + 11295}, - {FzName: ts + 11323}, + {FzName: ts + 11270, FzCols: ts + 11283}, + {FzName: ts + 11296, FzCols: ts + 11309}, + {FzName: ts + 11337}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -63702,7 +64157,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11336} + FzName: ts + 11350} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -63953,7 +64408,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11346} + FzName: ts + 11360} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -63967,7 +64422,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11356, + Xsqlite3_str_appendf(tls, bp+24, ts+11370, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -63980,7 +64435,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11361, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11375, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64022,7 +64477,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11367, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11381, 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)).FnChar-- @@ -64036,7 +64491,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11373} + FzName: ts + 11387} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64080,7 +64535,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11382, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11396, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64097,7 +64552,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+11256, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11270, 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, -6) @@ -64253,7 +64708,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11392, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11406, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64310,7 +64765,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+11392, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11406, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64357,9 +64812,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+11396) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11410) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11400) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11414) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -64442,7 +64897,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1518 + z = ts + 1538 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -64464,15 +64919,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+11404, z) == 0 { + if Xsqlite3_strglob(tls, ts+11418, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11415, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11429, 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+11425, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11439, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -64748,11 +65203,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11282, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11296, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11437, - ts+11491, + ts+11451, + ts+11505, zDb) } return rc @@ -64799,10 +65254,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11256, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11270, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11543, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11557, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -64860,7 +65315,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6351, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6365, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -64890,20 +65345,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1518 + zFile = ts + 1538 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1518 + zName = ts + 1538 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3805) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3819) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -64919,13 +65374,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11584, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11598, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11587, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -64939,7 +65394,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11624, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11638, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -64950,7 +65405,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -65003,7 +65458,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11668, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65020,7 +65475,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11683, 0) + ts+11697, 0) rc = SQLITE_ERROR __23: ; @@ -65086,13 +65541,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1454, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1474, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11751, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11765, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65139,7 +65594,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1518 + zName = ts + 1538 __1: ; i = 0 @@ -65170,14 +65625,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11779, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11793, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11800, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11814, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65185,7 +65640,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11826, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11840, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65296,7 +65751,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11848} + FzName: ts + 11862} // Called by the parser to compile an ATTACH statement. // @@ -65309,7 +65764,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11862} + FzName: ts + 11876} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65323,7 +65778,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11876, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11890, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65355,7 +65810,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+11900, + ts+11914, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -65530,7 +65985,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11946, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11960, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -65556,11 +66011,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+11969, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11983, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11975, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11989, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11981, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11995, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -65607,7 +66062,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7623 + zCol = ts + 7637 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -65631,7 +66086,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+12008, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12022, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -65725,6 +66180,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -65752,9 +66209,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -65773,62 +66229,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -65875,13 +66323,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -65906,25 +66354,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6351) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6365) == 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+8042, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12023+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12042+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5863+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12037+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5877+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12056) + ts+12070) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12042+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5863) + ts+5877) } } } @@ -65945,12 +66393,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8042, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12042+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5863) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12023+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5877) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12037+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12056) + ts+12070) } } } @@ -65979,9 +66427,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12075, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12089, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -65992,21 +66440,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12083 + zMsg = ts + 12097 } else { - zMsg = ts + 12096 + zMsg = ts + 12110 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6555, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6569, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6579, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66036,12 +66484,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8042, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5863+7) == 0 { - return ts + 12042 + if Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5877+7) == 0 { + return ts + 12056 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { - return ts + 12023 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12070+7) == 0 { + return ts + 12037 } } return zName @@ -66146,10 +66594,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -66305,11 +66753,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66326,7 +66774,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -66355,7 +66803,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -66399,7 +66847,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5863) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5877) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -66425,7 +66873,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6351, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6365, zName) { goto __3 } @@ -66478,13 +66926,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+12110, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12124, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12127, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12141, libc.VaList(bp, pName1)) return -1 } } else { @@ -66522,13 +66970,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1518, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1538, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8042, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8056, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12147, + Xsqlite3ErrorMsg(tls, pParse, ts+12161, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -66688,9 +67136,9 @@ 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 + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -66706,7 +67154,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12189, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12203, 0) return __4: ; @@ -66734,9 +67182,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10399 + return ts + 10413 } - return ts + 8784 + return ts + 8798 }(), zName) != 0) { goto __8 } @@ -66752,9 +67200,9 @@ __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 + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -66785,12 +67233,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12230, + Xsqlite3ErrorMsg(tls, pParse, ts+12244, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10399 + return ts + 10413 } - return ts + 8784 + return ts + 8798 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -66805,7 +67253,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12251, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12265, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -66840,8 +67288,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -66862,7 +67310,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -66892,7 +67340,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12286, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12300, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -66916,7 +67364,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12303, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12317, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -66925,7 +67373,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -66936,7 +67384,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12286 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12300 (*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) @@ -66948,7 +67396,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12286, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12300, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -66982,7 +67430,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+12337, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12351, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -66990,13 +67438,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12360, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12374, 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)).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+12367, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12381, 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)).Fn-- @@ -67033,7 +67481,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+12377, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12391, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67197,10 +67645,10 @@ 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+12403, + Xsqlite3ErrorMsg(tls, pParse, ts+12417, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12448, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12462, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -67231,7 +67679,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12489, 0) + ts+12503, 0) } } @@ -67276,7 +67724,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12541, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12555, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67365,7 +67813,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12582, 0) + ts+12596, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -67391,7 +67839,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -67460,7 +67908,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12638, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12652, 0) goto generated_done __2: ; @@ -67473,13 +67921,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12681, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12695, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12689, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12703, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -67512,7 +67960,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12696, + Xsqlite3ErrorMsg(tls, pParse, ts+12710, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -67633,13 +68081,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1518 - zSep2 = ts + 12727 - zEnd = ts + 4927 + zSep = ts + 1538 + zSep2 = ts + 12741 + zEnd = ts + 4941 } else { - zSep = ts + 12729 - zSep2 = ts + 12733 - zEnd = ts + 12738 + zSep = ts + 12743 + zSep2 = ts + 12747 + zEnd = ts + 12752 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -67647,7 +68095,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12741, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12755, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -67681,16 +68129,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3633, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3647, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1518, - ts + 12755, - ts + 12761, - ts + 12766, - ts + 12771, + ts + 1538, + ts + 12769, + ts + 12775, + ts + 12780, + ts + 12785, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -67829,8 +68277,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -67957,7 +68405,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -67981,7 +68429,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -68080,7 +68528,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1518, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1538, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -68097,10 +68545,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+12777, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1518))) + ts+12791, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1538))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12810, + Xsqlite3ErrorMsg(tls, pParse, ts+12824, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68119,11 +68567,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+12837, 0) + ts+12851, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12887, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12901, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68157,7 +68605,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12919, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12933, 0) return } } @@ -68182,11 +68630,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8784 - zType2 = ts + 12963 + zType = ts + 8798 + zType2 = ts + 12977 } else { - zType = ts + 10399 - zType2 = ts + 12969 + zType = ts + 10413 + zType2 = ts + 12983 } if pSelect != 0 { @@ -68248,7 +68696,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -68257,11 +68705,11 @@ 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+12974, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12988, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12989, + ts+13003, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68277,13 +68725,13 @@ 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+13087, + ts+13101, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13129, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13143, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68298,7 +68746,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9306) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9320) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68328,7 +68776,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+13163, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13177, 0) goto create_view_fail __1: ; @@ -68344,7 +68792,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10399, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10413, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -68407,10 +68855,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -68428,12 +68873,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13199, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13213, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -68493,6 +68934,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -68552,13 +69000,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13229, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13243, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13244, + ts+13258, 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) } @@ -68599,10 +69047,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13311, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13325, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11208, + ts+11222, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -68634,12 +69082,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13325, + ts+13339, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13370, + ts+13384, 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) @@ -68667,11 +69115,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3256, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3270, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7043, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7057, 10) == 0 { return 0 } return 1 @@ -68749,9 +69197,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -68810,21 +69258,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13437, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13451, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13465, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13479, 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+13499, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13513, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -68836,7 +69284,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11400, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11414, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -68900,7 +69348,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13531, + ts+13545, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -68912,7 +69360,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13594, 0) + ts+13608, 0) goto fk_end goto __7 __6: @@ -68997,7 +69445,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13688, + ts+13702, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -69224,12 +69672,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13734, + Xsqlite3ErrorMsg(tls, pParse, ts+13748, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13762 + return ts + 13776 } - return ts + 13768 + return ts + 13782 }())) return 1 } @@ -69350,7 +69798,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13773, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13787, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -69369,7 +69817,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13779, + ts+13793, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -69395,26 +69843,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13829, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13843, 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+13857, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13871, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13882, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13896, 0) goto exit_create_index __17: ; @@ -69428,7 +69876,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13773, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13787, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -69440,10 +69888,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13916, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13930, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -69455,7 +69903,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13950, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13964, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -69484,7 +69932,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13974, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13988, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -69505,9 +69953,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -69546,7 +69994,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13773) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13787) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -69647,7 +70095,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13997, 0) + ts+14011, 0) goto exit_create_index __56: ; @@ -69661,6 +70109,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -69681,6 +70130,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -69862,7 +70312,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14058, libc.VaList(bp+48, 0)) + ts+14072, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -69914,8 +70364,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14100, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14114, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -69961,12 +70411,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14117, + zStmt = Xsqlite3MPrintf(tls, db, ts+14131, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1518 + return ts + 1538 } - return ts + 14137 + return ts + 14151 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -69974,7 +70424,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14145, + ts+14159, 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, @@ -69988,7 +70438,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14204, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14218, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70149,7 +70599,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14231, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14245, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70164,7 +70614,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14249, libc.VaList(bp+8, 0)) + ts+14263, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70175,9 +70625,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70203,9 +70653,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14322, + ts+14336, 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+11396, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11410, (*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) @@ -70286,6 +70736,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70293,7 +70744,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70339,7 +70790,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+14382, + Xsqlite3ErrorMsg(tls, pParse, ts+14396, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -70474,6 +70925,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -70485,11 +70937,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -70516,7 +70970,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -70544,12 +70998,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14418, + Xsqlite3ErrorMsg(tls, pParse, ts+14432, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14454 + return ts + 14468 } - return ts + 14457 + return ts + 14471 }())) goto append_from_error __1: @@ -70718,7 +71172,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14463, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14477, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -70754,9 +71208,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14469 + return ts + 14483 } - return ts + 14478 + return ts + 14492 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -70781,7 +71235,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14463, ts + 14485, ts + 14469} +var az = [3]uintptr{ts + 14477, ts + 14499, ts + 14483} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -70796,7 +71250,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14493, 0) + ts+14507, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -70814,7 +71268,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11969, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11983, 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+14577, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14591, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71100,7 +71554,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14586, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14600, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71196,7 +71650,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+14632, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14646, libc.VaList(bp, zName)) } } } @@ -71296,7 +71750,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71310,7 +71764,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -71389,7 +71843,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14676, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -71516,7 +71970,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -71550,7 +72004,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -71573,26 +72027,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -71658,10 +72113,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14707, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -71674,19 +72145,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14693, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14740, 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+14722, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14769, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -71913,17 +72386,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -71936,10 +72411,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -71948,15 +72423,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -71965,98 +72440,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72064,138 +72539,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14760) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14807) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72298,7 +72778,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+11256) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11270) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -72528,7 +73008,7 @@ 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 + 6161, ts + 6156, ts + 7915, ts + 7910, ts + 6151} +var azType2 = [5]uintptr{ts + 6175, ts + 6170, ts + 7929, ts + 7924, ts + 6165} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -72587,7 +73067,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14773, -1) + Xsqlite3_result_error(tls, context, ts+14820, -1) return } iVal = -iVal @@ -72891,7 +73371,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14790, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14837, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73081,7 +73561,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73194,13 +73674,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73223,7 +73717,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14795, -1) + Xsqlite3_result_error(tls, context, ts+14842, -1) return } if argc == 3 { @@ -73233,7 +73727,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14828, -1) + ts+14875, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73286,7 +73780,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3633, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3647, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73326,13 +73820,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4895, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4909, 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+14873, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14920, libc.VaList(bp+8, r1)) } } break @@ -73340,7 +73834,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1298, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1318, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -73369,13 +73863,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14880, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14927, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1519, 4) + Xsqlite3_str_append(tls, pStr, ts+1539, 4) break } @@ -73685,7 +74179,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10828} +var azOne = [1]uintptr{ts + 10842} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -73697,7 +74191,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1518 + zIn = ts + 1538 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -73721,7 +74215,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14883, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14930, 4, uintptr(0)) } } @@ -73746,7 +74240,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12008, -1) + Xsqlite3_result_error(tls, context, ts+12022, -1) return } @@ -73824,7 +74318,7 @@ func sumFinalize(tls *libc.TLS, context 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+14773, -1) + Xsqlite3_result_error(tls, context, ts+14820, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74086,7 +74580,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14888, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14935, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74106,14 +74600,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14894, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14941, 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+14894, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14941, 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+14894, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14894, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14941, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14941, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74353,107 +74847,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14899}, - {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 + 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_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14932}, - {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 + 14950}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14959}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14967}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14967}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14982}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15008}, - {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 + 15033}, - {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 + 15042}, - {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 + 15053}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15060}, - {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 + 15074}, - {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 + 15074}, - {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 + 15080}, - {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 + 15080}, - {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 + 15086}, - {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 + 15086}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15091}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15091}, - {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 + 15091}, - {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 + 15095}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15095}, - {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 + 15095}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15099}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15106}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15114}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15121}, - {FnArg: int8(-1), 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 + 15134}, - {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 + 15149}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15176}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15180}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15187}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15194}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15212}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15227}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15244}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15255}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | 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 + 15301}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15309}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {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 + 15335}, - {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 + 15339}, - {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 + 15345}, - {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 + 15349}, - {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 + 15349}, - {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 + 15355}, - {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 + 15355}, - {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 + 15368}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14894}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14894}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6496}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6496}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15373}, - {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), FpUserData: 0, FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15398}, - {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 + 15401}, - {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 + 15405}, - {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 + 15411}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15424}, - {FnArg: int8(2), 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 + 15434}, + {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 + 14946}, + {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 + 14966}, + {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 + 14979}, + {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 + 14997}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15014}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15014}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15029}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15055}, + {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 + 15080}, + {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 + 15089}, + {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 + 15100}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15107}, + {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 + 15121}, + {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 + 15121}, + {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 + 15127}, + {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 + 15127}, + {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 + 15133}, + {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 + 15133}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15138}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15138}, + {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 + 15138}, + {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 + 15142}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15142}, + {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 + 15142}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15146}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15161}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15168}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15181}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15188}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15201}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, + {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 + 15211}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15223}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15227}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15234}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15241}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15252}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15259}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15274}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15291}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15308}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15326}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15348}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(3), 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_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15382}, + {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 + 15386}, + {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 + 15392}, + {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 + 15396}, + {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 + 15396}, + {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 + 15402}, + {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 + 15402}, + {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 + 15415}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14941}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14941}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6510}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6510}, + {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 + 15433}, {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(2), 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 + 15455}, - {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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15445}, + {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 + 15448}, + {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 + 15452}, + {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 + 15458}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15448}, {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 + 15467}, - {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 + 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 + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15494}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15513}, - {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 + 15524}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6496}, - {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 + 15529}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, + {FnArg: int8(2), 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 + 15481}, + {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}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15496}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15506}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15524}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15541}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15547}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15552}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15560}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15571}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6510}, + {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 + 15576}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -74574,7 +75068,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+15533, + ts+15580, 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) @@ -75234,8 +75728,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6362, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6358, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6376, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6372, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75314,7 +75808,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5106) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5120) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -75416,7 +75910,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -75524,6 +76018,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -75564,13 +76079,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -75582,21 +76096,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -75667,7 +76171,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -75725,7 +76229,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7880, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7894, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76028,6 +76532,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76191,7 +76697,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15578, + ts+15625, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -76216,7 +76722,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15619, + Xsqlite3ErrorMsg(tls, pParse, ts+15666, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76365,7 +76871,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15651, + ts+15698, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -76375,7 +76881,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15703, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15750, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -76427,7 +76933,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15728, + Xsqlite3ErrorMsg(tls, pParse, ts+15775, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -76435,7 +76941,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15821, 0) goto insert_cleanup __57: ; @@ -76617,7 +77123,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -76632,137 +77151,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -76774,64 +77293,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15795) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15842) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -76839,7 +77362,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77142,7 +77669,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11969, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11983, 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) @@ -78232,13 +78759,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1518 + zSql = ts + 1538 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -78677,6 +79204,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -78715,7 +79243,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12008, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12022, 0) __3: ; return SQLITE_ERROR @@ -78724,7 +79252,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15809 + zEntry = ts + 15856 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -78739,7 +79267,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11969, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11983, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -78775,7 +79303,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15832, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15879, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -78789,7 +79317,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15841, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15888, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -78813,7 +79341,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15845, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15892, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -78831,7 +79359,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15851, libc.VaList(bp+16, zEntry, zFile)) + ts+15898, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -78858,7 +79386,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15894, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15941, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -78896,7 +79424,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15926, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15973, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -78906,7 +79434,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15963, + ts + 16010, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79062,7 +79590,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15966, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16013, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79070,63 +79598,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5027, - ts + 16005, - ts + 8784, - ts + 16009, - ts + 16014, - ts + 16017, - ts + 16027, - ts + 16037, - ts + 16043, - ts + 16047, - ts + 16052, - ts + 16057, - ts + 16065, - ts + 16076, - ts + 16079, - ts + 16086, - ts + 16047, + ts + 5041, ts + 16052, - ts + 16093, - ts + 16098, - ts + 16101, - ts + 16108, - ts + 16043, - ts + 16047, - ts + 16114, - ts + 16119, - ts + 16124, - ts + 16047, - ts + 16128, - ts + 16052, - ts + 16136, + ts + 8798, + ts + 16056, + ts + 16061, + ts + 16064, + ts + 16074, + ts + 16084, + ts + 16090, + ts + 16094, + ts + 16099, + ts + 16104, + ts + 16112, + ts + 16123, + ts + 16126, + ts + 16133, + ts + 16094, + ts + 16099, ts + 16140, ts + 16145, - ts + 11400, - ts + 11396, - ts + 16151, - ts + 16156, + ts + 16148, + ts + 16155, + ts + 16090, + ts + 16094, ts + 16161, - ts + 16005, - ts + 16047, ts + 16166, - ts + 16173, - ts + 16180, - ts + 8784, - ts + 16188, - ts + 5030, - ts + 16194, - ts + 16005, - ts + 16047, - ts + 16199, - ts + 16204, - ts + 15401, - ts + 16209, - ts + 16222, - ts + 16231, - ts + 16238, - ts + 16249, + ts + 16171, + ts + 16094, + ts + 16175, + ts + 16099, + ts + 16183, + ts + 16187, + ts + 16192, + ts + 11414, + ts + 11410, + ts + 16198, + ts + 16203, + ts + 16208, + ts + 16052, + ts + 16094, + ts + 16213, + ts + 16220, + ts + 16227, + ts + 8798, + ts + 16235, + ts + 5044, + ts + 16241, + ts + 16052, + ts + 16094, + ts + 16246, + ts + 16251, + ts + 15448, + ts + 16256, + ts + 16269, + ts + 16278, + ts + 16285, + ts + 16296, } // Definitions of all built-in pragmas @@ -79144,238 +79672,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16257, + {FzName: ts + 16304, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16272, + {FzName: ts + 16319, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16287, + {FzName: ts + 16334, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16299, + {FzName: ts + 16346, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16238, + {FzName: ts + 16285, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16328, + {FzName: ts + 16375, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16340, + {FzName: ts + 16387, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16360, + {FzName: ts + 16407, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16397, + {FzName: ts + 16444, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16412, + {FzName: ts + 16459, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16442, + {FzName: ts + 16489, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16455, + {FzName: ts + 16502, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16469, + {FzName: ts + 16516, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16488, + {FzName: ts + 16535, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16507, + {FzName: ts + 16554, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16530, + {FzName: ts + 16577, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16539, + {FzName: ts + 16586, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16557, + {FzName: ts + 16604, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16574, + {FzName: ts + 16621, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16587, + {FzName: ts + 16634, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16602, + {FzName: ts + 16649, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16620, + {FzName: ts + 16667, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16630, + {FzName: ts + 16677, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16644, + {FzName: ts + 16691, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16685, + {FzName: ts + 16732, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16704, + {FzName: ts + 16751, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16715, + {FzName: ts + 16762, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16726, + {FzName: ts + 16773, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16738, + {FzName: ts + 16785, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16767, + {FzName: ts + 16814, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16786, + {FzName: ts + 16833, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16805, + {FzName: ts + 16852, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16818, + {FzName: ts + 16865, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16833, + {FzName: ts + 16880, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16843, + {FzName: ts + 16890, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16855, + {FzName: ts + 16902, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16875, + {FzName: ts + 16922, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16885, + {FzName: ts + 16932, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16897, + {FzName: ts + 16944, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16908, + {FzName: ts + 16955, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16920, + {FzName: ts + 16967, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16937, + {FzName: ts + 16984, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16956, + {FzName: ts + 17003, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16982, + {FzName: ts + 17029, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 16997, + {FzName: ts + 17044, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17011, + {FzName: ts + 17058, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17030, + {FzName: ts + 17077, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17044, + {FzName: ts + 17091, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17072, + {FzName: ts + 17119, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17083, + {FzName: ts + 17130, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17094, + {FzName: ts + 17141, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17106, + {FzName: ts + 17153, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17117, + {FzName: ts + 17164, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17138, + {FzName: ts + 17185, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17146, + {FzName: ts + 17193, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17161, + {FzName: ts + 17208, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17174, + {FzName: ts + 17221, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17193, + {FzName: ts + 17240, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17208, + {FzName: ts + 17255, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -79397,7 +79925,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17224)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17271)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -79409,10 +79937,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17296) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17259) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17306) { return PAGER_LOCKINGMODE_NORMAL } } @@ -79421,13 +79949,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7928) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7942) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17266) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17313) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17271) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17318) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -79442,9 +79970,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16199) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16246) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17283) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17330) == 0 { return 2 } else { return 0 @@ -79458,7 +79986,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17290, 0) + ts+17337, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -79549,19 +80077,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17352 + zName = ts + 17399 break case OE_SetDflt: - zName = ts + 17361 + zName = ts + 17408 break case OE_Cascade: - zName = ts + 17373 + zName = ts + 17420 break case OE_Restrict: - zName = ts + 17381 + zName = ts + 17428 break default: - zName = ts + 17390 + zName = ts + 17437 break } return zName @@ -79578,7 +80106,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17400, ts + 17407, ts + 17415, ts + 17419, ts + 17283, ts + 17428, + ts + 17447, ts + 17454, ts + 17462, ts + 17466, ts + 17330, ts + 17475, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -79625,13 +80153,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17432 + zType = ts + 17479 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17434 + zType = ts + 17481 } else { - zType = ts + 7438 + zType = ts + 7452 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17436, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17483, 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), @@ -79639,7 +80167,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17443, ts + 17448, ts + 17456} +var azEnc = [4]uintptr{uintptr(0), ts + 17490, ts + 17495, ts + 17503} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -79664,8 +80192,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(608) - defer tls.Free(608) + bp := tls.Alloc(664) + defer tls.Free(664) var zLeft uintptr var zRight uintptr @@ -79772,13 +80300,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -79798,6 +80335,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -79848,7 +80387,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -79863,7 +80402,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -79873,7 +80412,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17464, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17511, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -79890,30 +80429,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3633, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80134,7 +80673,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17468) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17515) == 0) { goto __64 } b = 2 @@ -80168,7 +80707,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -80177,36 +80716,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17259 + zRet = ts + 17306 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80244,7 +80783,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17249 + zRet = ts + 17296 __83: ; returnSingleText(tls, v, zRet) @@ -80325,21 +80864,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -80381,15 +80920,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -80426,14 +80965,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -80490,11 +81029,11 @@ __116: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __118 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+504) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 504)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+544) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 544)) == 0) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+17473, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17520, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __119: @@ -80513,7 +81052,7 @@ __120: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __121 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+16, zRight)) goto __122 __121: Xsqlite3_temp_directory = uintptr(0) @@ -80535,7 +81074,7 @@ __123: goto __125 } Xsqlite3ErrorMsg(tls, pParse, - ts+17498, 0) + ts+17545, 0) goto __126 __125: if !(iDb != 1) { @@ -80589,7 +81128,7 @@ __132: __134: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17551) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17598) == 0) { goto __135 } @@ -80686,13 +81225,13 @@ __148: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17557 + return ts + 17604 } - return ts + 17565 + return ts + 17612 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1518), + Xsqlite3ColumnType(tls, pCol, ts+1538), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -80757,20 +81296,20 @@ __163: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __164 } - zSql = Xsqlite3MPrintf(tls, db, ts+17572, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17619, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __165 } - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+512, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 512))) + *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+552, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 552))) Xsqlite3DbFree(tls, db, zSql) __165: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __166 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1454, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1474, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __166: ; @@ -80803,29 +81342,29 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __171 } - zType = ts + 10399 + zType = ts + 10413 goto __172 __171: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __173 } - zType = ts + 12681 + zType = ts + 12695 goto __174 __173: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __175 } - zType = ts + 17588 + zType = ts + 17635 goto __176 __175: - zType = ts + 8784 + zType = ts + 8798 __176: ; __174: ; __172: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17595, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -80891,7 +81430,7 @@ __183: goto __185 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17649, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -80901,7 +81440,7 @@ __183: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __186 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17654, 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)))) @@ -80938,12 +81477,12 @@ __189: if !(pIdx1 != 0) { goto __191 } - *(*[3]uintptr)(unsafe.Pointer(bp + 520)) = [3]uintptr{ts + 17612, ts + 17614, ts + 16076} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17616, + *(*[3]uintptr)(unsafe.Pointer(bp + 560)) = [3]uintptr{ts + 17659, ts + 17661, ts + 16123} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17663, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 520 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 560 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __190 __190: @@ -80972,7 +81511,7 @@ __192: goto __193 __195: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17622, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17669, 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))) @@ -80988,13 +81527,13 @@ __194: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __196: if !(p != 0) { goto __198 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17626, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17673, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __197 __197: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81033,7 +81572,7 @@ __200: goto __201 __201: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __205: if !(j != 0) { goto __207 @@ -81052,13 +81591,13 @@ __207: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __208: if !(j1 != 0) { goto __210 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7438, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7452, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __209 __209: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81074,7 +81613,7 @@ __211: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __213 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7438, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7452, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __212 __212: i6++ @@ -81109,7 +81648,7 @@ __219: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __221 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17629, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17676, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81117,7 +81656,7 @@ __219: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17638)) + ts+17685)) goto __220 __220: j2++ @@ -81190,20 +81729,20 @@ __228: goto __229 __231: ; - *(*uintptr)(unsafe.Pointer(bp + 544)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 584)) = 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+544, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+584, uintptr(0)) if !(x1 == 0) { goto __232 } - if !(*(*uintptr)(unsafe.Pointer(bp + 544)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 584)) == uintptr(0)) { goto __234 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __235 __234: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 544)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 544))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 584)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 584))) __235: ; goto __233 @@ -81241,12 +81780,12 @@ __238: goto __240 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 544)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 584)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) if !(pParent != 0) { goto __241 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+544, bp+552) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+584, bp+592) __241: ; @@ -81263,8 +81802,8 @@ __243: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __245 } - if *(*uintptr)(unsafe.Pointer(bp + 552)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 592)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -81277,11 +81816,11 @@ __244: goto __245 __245: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 544)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 584)) != 0) { goto __246 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 544))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 584))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __247 @@ -81306,10 +81845,10 @@ __249: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __250: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17643, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17690, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))) goto __239 __239: i8++ @@ -81347,17 +81886,17 @@ __252: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 600)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __253 } - if !(Xsqlite3GetInt32(tls, zRight, bp+560) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+600) != 0) { goto __254 } - if !(*(*int32)(unsafe.Pointer(bp + 560)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 600)) <= 0) { goto __256 } - *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 600)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __256: ; goto __255 @@ -81373,7 +81912,7 @@ __255: ; __253: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 560))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 600))-1, 1) i9 = 0 __257: @@ -81523,7 +82062,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+17647, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17694, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -81550,178 +82089,307 @@ __286: goto __284 __287: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __288 } + pPk1 = uintptr(0) + r2 = 0 + goto __289 +__288: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__289: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+564, bp+568) + 1, uintptr(0), bp+604, bp+608) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__288: +__290: if !(pIdx5 != 0) { - goto __290 + goto __292 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __289 -__289: + goto __291 +__291: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __288 goto __290 -__290: + goto __292 +__292: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 564)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 604)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__293: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __294 + } + mxCol-- + goto __293 +__294: + ; + if !(mxCol >= 0) { + goto __295 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__295: + ; if !!(isQuick != 0) { - goto __291 + goto __296 } + if !(pPk1 != 0) { + goto __297 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 604)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 564)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__291: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17718, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__298: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __300 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 604)), j4, r2+j4) + goto __299 +__299: + j4++ + goto __298 + goto __300 +__300: + ; +__297: + ; +__296: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__292: +__301: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __294 + goto __303 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __295 + goto __304 } - goto __293 -__295: + goto __302 +__304: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __296 + if !(bStrict != 0) { + goto __305 } - goto __293 -__296: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __306 +__305: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__306: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __307 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __297 + goto __302 +__307: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __308 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__297: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) + p11 = -1 + p3 = 3 + goto __309 +__308: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __310 + } + *(*uintptr)(unsafe.Pointer(bp + 616)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+616) + if !(*(*uintptr)(unsafe.Pointer(bp + 616)) != 0) { + goto __311 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) +__311: ; +__310: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 604)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __312 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __313 +__312: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__313: + ; +__309: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __298 + goto __314 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17671, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17754, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __299 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __315 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __300 -__299: - integrityCheckResultRow(tls, v) -__300: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__298: + goto __316 +__315: + ; +__316: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __301 +__314: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __317 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17691, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17774, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__301: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __318 +__317: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __319 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17796, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __320 +__319: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __321 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __322 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) +__322: ; - goto __293 -__293: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17819, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17821, + libc.VaList(bp+432, (*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, zErr1, -6) +__321: + ; +__320: + ; +__318: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __302 +__302: j4++ - goto __292 - goto __294 -__294: + goto __301 + goto __303 +__303: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __302 + goto __323 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __303 + goto __324 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 564)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 604)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__304: +__325: if !(k3 > 0) { - goto __306 + goto __327 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __305 -__305: + goto __326 +__326: k3-- - goto __304 - goto __306 -__306: + goto __325 + goto __327 +__327: ; 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+17713, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17841, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__303: +__324: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__302: +__323: ; if !!(isQuick != 0) { - goto __307 + goto __328 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__308: +__329: if !(pIdx5 != 0) { - goto __310 + goto __331 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __311 + goto __332 } - goto __309 -__311: + goto __330 +__332: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 564)), 0, 0, bp+572, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 604)), 0, 0, bp+624, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 568))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 608))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17743) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17871) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17748) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17876) 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) @@ -81729,87 +82397,93 @@ __311: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __312 + goto __333 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__313: +__334: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __315 + goto __336 } 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 __316 + goto __337 } - goto __314 -__316: + goto __335 +__337: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __314 -__314: + goto __335 +__335: kk++ - goto __313 - goto __315 -__315: + goto __334 + goto __336 +__336: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 608))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 608))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17769) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17897) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__312: +__333: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 572))) - goto __309 -__309: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 624))) + goto __330 +__330: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __308 - goto __310 -__310: + goto __329 + goto __331 +__331: ; -__307: +__328: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 564)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 604)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __317 + goto __338 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17796) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17924) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__318: +__339: if !(pIdx5 != 0) { - goto __320 + goto __341 } if !(pPk1 == pIdx5) { - goto __321 + goto __342 } - goto __319 -__321: + goto __340 +__342: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 568))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 608))+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 __319 -__319: + goto __340 +__340: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __318 - goto __320 -__320: + goto __339 + goto __341 +__341: ; -__317: + if !(pPk1 != 0) { + goto __343 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__343: + ; +__338: ; goto __284 __284: @@ -81827,14 +82501,14 @@ __259: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __322 + goto __344 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 560)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 600)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17825 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17953 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__322: +__344: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -81842,27 +82516,27 @@ __322: __45: if !!(zRight != 0) { - goto __323 + goto __345 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __325 + goto __347 } goto pragma_out -__325: +__347: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __324 -__323: + goto __346 +__345: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __326 + goto __348 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__327: +__349: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __329 + goto __351 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __330 + goto __352 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -81871,25 +82545,25 @@ __327: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __329 -__330: + goto __351 +__352: ; - goto __328 -__328: + goto __350 +__350: pEnc += 16 - goto __327 - goto __329 -__329: + goto __349 + goto __351 +__351: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __331 + goto __353 } - Xsqlite3ErrorMsg(tls, pParse, ts+17828, libc.VaList(bp+416, zRight)) -__331: + Xsqlite3ErrorMsg(tls, pParse, ts+17956, libc.VaList(bp+456, zRight)) +__353: ; -__326: +__348: ; -__324: +__346: ; goto __15 @@ -81897,50 +82571,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __332 + goto __354 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __334 + goto __356 } goto __15 -__334: +__356: ; (*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 __333 -__332: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __357 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__357: + ; + goto __355 +__354: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __335 + goto __358 } goto __15 -__335: +__358: ; (*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) -__333: +__355: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__336: +__359: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __337 + goto __360 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __336 -__337: + goto __359 +__360: ; Xsqlite3VdbeReusable(tls, v) @@ -81955,31 +82636,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __338 + goto __361 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17266) == 0) { - goto __339 + if !(Xsqlite3StrICmp(tls, zRight, ts+17313) == 0) { + goto __362 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __340 -__339: - if !(Xsqlite3StrICmp(tls, zRight, ts+17853) == 0) { - goto __341 + goto __363 +__362: + if !(Xsqlite3StrICmp(tls, zRight, ts+17981) == 0) { + goto __364 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __342 -__341: - if !(Xsqlite3StrICmp(tls, zRight, ts+17419) == 0) { - goto __343 + goto __365 +__364: + if !(Xsqlite3StrICmp(tls, zRight, ts+17466) == 0) { + goto __366 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__343: +__366: ; -__342: +__365: ; -__340: +__363: ; -__338: +__361: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -81989,10 +82670,10 @@ __338: __49: if !(zRight != 0) { - goto __344 + goto __367 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__344: +__367: ; returnSingleInt(tls, v, func() int64 { @@ -82012,19 +82693,19 @@ __50: __51: if !(zRight != 0) { - goto __345 + goto __368 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __347 + goto __370 } goto __15 -__347: +__370: ; - goto __346 -__345: + goto __369 +__368: opMask = U32(0xfffe) -__346: +__369: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82033,86 +82714,86 @@ __346: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__348: +__371: if !(iDb <= iDbLast) { - goto __350 + goto __373 } if !(iDb == 1) { - goto __351 + goto __374 } - goto __349 -__351: + goto __372 +__374: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__352: +__375: if !(k4 != 0) { - goto __354 + goto __377 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __355 + goto __378 } - goto __353 -__355: + goto __376 +__378: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__356: +__379: if !(pIdx6 != 0) { - goto __358 + goto __381 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __359 + goto __382 } szThreshold = int16(0) - goto __358 -__359: + goto __381 +__382: ; - goto __357 -__357: + goto __380 +__380: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __356 - goto __358 -__358: + goto __379 + goto __381 +__381: ; if !(szThreshold != 0) { - goto __360 + goto __383 } 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)) -__360: +__383: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17861, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17989, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __361 + goto __384 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __362 -__361: + goto __385 +__384: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__362: +__385: ; - goto __353 -__353: + goto __376 +__376: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __352 - goto __354 -__354: + goto __375 + goto __377 +__377: ; - goto __349 -__349: + goto __372 +__372: iDb++ - goto __348 - goto __350 -__350: + goto __371 + goto __373 +__373: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82120,60 +82801,60 @@ __350: __52: ; if !(zRight != 0) { - goto __363 + goto __386 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__363: +__386: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+576) == SQLITE_OK) { - goto __364 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+632) == SQLITE_OK) { + goto __387 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 576))) -__364: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 632))) +__387: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __365 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __388 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 584)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 584)))) { - goto __366 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 640)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 640)))) { + goto __389 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__366: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__389: ; -__365: +__388: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) >= int64(0)) { - goto __367 + Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) >= int64(0)) { + goto __390 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592))&int64(0x7fffffff))) -__367: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648))&int64(0x7fffffff))) +__390: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __368 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __391 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) & int64(0x7fffffff)) -__368: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) & int64(0x7fffffff)) +__391: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82181,10 +82862,10 @@ __368: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __369 + goto __392 } -__369: +__392: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82217,6 +82898,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82228,14 +82917,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17879, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17884, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17890, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17899, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17908, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17916, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924}, - {FzName: ts + 17931}, + {FzName: ts + 18007, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18012, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18018, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18044, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052}, + {FzName: ts + 18059}, {}, } var setCookie = [2]VdbeOpList{ @@ -82287,7 +82976,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+17937) + Xsqlite3_str_appendall(tls, bp+32, ts+18065) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82295,7 +82984,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17952, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18080, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -82308,19 +82997,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17959, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18087, 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+17965) + Xsqlite3_str_appendall(tls, bp+32, ts+18093) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17977) + Xsqlite3_str_appendall(tls, bp+32, ts+18105) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4927, 1) + Xsqlite3_str_append(tls, bp+32, ts+4941, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -82336,7 +83025,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -82484,7 +83173,7 @@ __1: 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+3633, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -82500,13 +83189,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+17992) + Xsqlite3_str_appendall(tls, bp+32, ts+18120) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18000, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18128, 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+18004, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18132, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -82515,7 +83204,7 @@ __3: 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+3633, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -82583,33 +83272,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18008, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18136, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4978 + zObj = ts + 4992 } - z = Xsqlite3MPrintf(tls, db, ts+18036, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18164, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18067, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18195, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18075, - ts + 18082, - ts + 18094, + ts + 18203, + ts + 18210, + ts + 18222, } // Check to see if any sibling index (another index on the same table) @@ -82669,7 +83358,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+14100) + corruptSchema(tls, pData, argv, ts+14114) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -82701,13 +83390,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+18105) + corruptSchema(tls, pData, argv, ts+18233) } 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+14100) + corruptSchema(tls, pData, argv, ts+14114) } } } @@ -82740,16 +83429,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8784 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8798 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7848 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18118 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7862 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18246 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -82834,7 +83523,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11683) + ts+11697) rc = SQLITE_ERROR goto initone_error_out __13: @@ -82869,7 +83558,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+18190) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18318) rc = SQLITE_ERROR goto initone_error_out __17: @@ -82883,7 +83572,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18214, + ts+18342, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83066,16 +83755,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83143,20 +83836,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1454, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1474, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -83168,8 +83861,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83178,7 +83871,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1454, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1474, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -83189,7 +83882,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83209,7 +83902,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18248, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18376, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83225,100 +83918,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18278, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18406, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3633, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3647, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83331,7 +84028,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -83430,7 +84127,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -83573,7 +84270,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -83748,8 +84445,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10828 - var zSp2 uintptr = ts + 10828 + var zSp1 uintptr = ts + 10842 + var zSp2 uintptr = ts + 10842 if pB == uintptr(0) { zSp1++ } @@ -83757,13 +84454,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18297, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18425, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18327)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18455)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -83938,7 +84635,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18361, libc.VaList(bp, 0)) + ts+18489, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -83983,7 +84680,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18411, libc.VaList(bp+8, zName)) + ts+18539, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -83994,7 +84691,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18475, + Xsqlite3ErrorMsg(tls, pParse, ts+18603, libc.VaList(bp+16, zName)) break } @@ -84038,7 +84735,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6496, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6510, Fn: uint32(8)} // 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. @@ -84385,6 +85082,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -84560,7 +85260,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -84622,16 +85322,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18512 + z = ts + 18640 break case TK_INTERSECT: - z = ts + 18522 + z = ts + 18650 break case TK_EXCEPT: - z = ts + 18532 + z = ts + 18660 break default: - z = ts + 18539 + z = ts + 18667 break } return z @@ -84641,7 +85341,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18545, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18673, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -84847,8 +85547,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1083 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16188 + zType = ts + 1103 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16235 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -84987,13 +85687,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16188 + zCol = ts + 16235 } 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+11969, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11983, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85001,7 +85701,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+18568, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18696, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85091,7 +85791,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16188 + zName = ts + 16235 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85101,7 +85801,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18568, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18696, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -85117,7 +85817,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18577, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -85404,7 +86104,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18585, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18713, 0) return __1: ; @@ -85495,7 +86195,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18634, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18762, 0) goto end_of_recursive_query __15: ; @@ -85515,7 +86215,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18676, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18804, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -85552,7 +86252,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18682, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -85586,11 +86286,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+18697, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18825, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1518 + return ts + 1538 } - return ts + 18720 + return ts + 18848 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -85691,8 +86391,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18722, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18737, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18850, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18865, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -85739,7 +86439,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18512, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18640, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -85806,7 +86506,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18756, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18884, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -85868,7 +86568,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18756, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18884, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -86021,10 +86721,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18777, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18905, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18823, + ts+18951, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86278,8 +86978,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7144) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7144) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7158) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7158) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86306,13 +87006,13 @@ 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+18905, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19033, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18916, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19044, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86324,7 +87024,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+18921, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -86425,7 +87125,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -86451,6 +87151,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -86467,7 +87168,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -86504,7 +87205,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -86515,6 +87217,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -86539,15 +87242,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1063 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1083 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -86724,9 +87432,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -86795,7 +87510,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -86811,17 +87525,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -86842,7 +87547,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -86854,6 +87558,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87009,6 +87724,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87032,8 +87748,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87209,8 +87925,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -87227,6 +87943,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87256,6 +87977,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87289,12 +88011,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15091) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15138) == 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+15095) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15142) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -87360,7 +88082,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+18927, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19055, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -87443,7 +88165,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18945, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19073, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -87572,7 +88294,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+18968, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19096, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -87598,7 +88320,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18988, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19116, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -87614,7 +88336,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19031 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19159 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -87640,7 +88362,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+19054, + Xsqlite3ErrorMsg(tls, pParse, ts+19182, 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 @@ -87651,9 +88373,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 + 19092 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19220 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19126 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19254 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -87680,9 +88402,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -87700,7 +88422,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+19164, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19292, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -87812,7 +88534,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19168, + Xsqlite3ErrorMsg(tls, pParse, ts+19296, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -87831,7 +88553,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+19207, + Xsqlite3ErrorMsg(tls, pParse, ts+19335, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -87839,7 +88561,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19238, + Xsqlite3ErrorMsg(tls, pParse, ts+14707, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -87940,7 +88662,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6356 + zSchemaName = ts + 6370 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -87955,7 +88677,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19271, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19366, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -88020,7 +88742,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19276, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19371, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88032,7 +88754,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11969, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11983, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88051,9 +88773,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19285, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19380, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19303, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19398, 0) } } } @@ -88063,7 +88785,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+19323, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19418, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88213,13 +88935,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19354, 0) + ts+19449, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19405, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19500, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -88400,19 +89122,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19438, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19533, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19450 + return ts + 19545 } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1518 + return ts + 1538 }())) } } @@ -88425,7 +89147,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7848) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7862) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -88583,7 +89305,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -88682,7 +89403,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19473, + ts+19568, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -88743,7 +89464,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19527, + Xsqlite3ErrorMsg(tls, pParse, ts+19622, 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 __15: @@ -88847,7 +89568,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1518, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1538, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -88857,7 +89578,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -88889,7 +89610,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19567, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19662, 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), 5, 0x20) @@ -88947,8 +89668,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19582, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19677, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -88982,7 +89706,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89075,16 +89799,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89093,13 +89822,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89111,52 +89840,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89174,111 +89903,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -89297,33 +90026,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -89331,28 +90060,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -89363,7 +90092,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -89374,7 +90103,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -89400,7 +90129,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -89413,27 +90142,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19598 + return ts + 19693 } - return ts + 19607 + return ts + 19702 }()) groupBySort = 1 @@ -89441,49 +90170,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -89497,45 +90226,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -89554,16 +90283,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -89594,16 +90323,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -89616,98 +90345,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -89716,79 +90445,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19598) -__147: + explainTempTable(tls, pParse, ts+19693) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19616 + return ts + 19711 } - return ts + 19639 + return ts + 19734 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -89863,7 +90592,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -89885,7 +90614,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19648, 0) + ts+19743, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -89981,7 +90710,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3633, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90073,7 +90802,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -90118,7 +90847,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+19713, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19808, 0) goto trigger_cleanup __3: ; @@ -90162,7 +90891,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19759, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19854, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -90180,7 +90909,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19767, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19862, 0) goto trigger_orphan_error __11: ; @@ -90192,7 +90921,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19759, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19854, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90207,7 +90936,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19808, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19903, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90219,22 +90948,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19834, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19929, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19872, + Xsqlite3ErrorMsg(tls, pParse, ts+19967, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19909 + return ts + 20004 } - return ts + 19916 + return ts + 20011 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90243,7 +90972,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19922, libc.VaList(bp+24, pTableName+8)) + ts+20017, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90272,9 +91001,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -90392,7 +91121,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19759, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19854, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -90425,7 +91154,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19968, + ts+20063, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -90450,13 +91179,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20016, + ts+20111, libc.VaList(bp+16, (*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+20091, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20186, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -90712,7 +91441,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20120, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20215, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -90751,9 +91480,9 @@ 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 + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -90765,7 +91494,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20140, + ts+20235, 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) @@ -90879,12 +91608,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20202, + ts+20297, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20250 + return ts + 20345 } - return ts + 20257 + return ts + 20352 }())) __15: ; @@ -90998,7 +91727,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20264, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20359, 0) return 1 } @@ -91049,7 +91778,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -91118,7 +91847,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6050, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6064, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91181,8 +91910,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91215,26 +91944,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20306, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20401, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91251,7 +91980,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -91444,10 +92173,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -91456,7 +92187,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -91818,7 +92549,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20320, + ts+20415, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -91850,7 +92581,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20356, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20451, 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: @@ -91860,7 +92591,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7623 + return ts + 7637 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -92730,7 +93461,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20375) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20470) __169: ; update_cleanup: @@ -93036,10 +93767,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+20388, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20483, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20392, libc.VaList(bp+8, bp+216)) + ts+20487, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -93130,7 +93861,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+12110, -1) + ts+12124, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93162,7 +93893,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20465, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20469, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20560, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20564, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93299,23 +94030,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20473) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20568) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20513) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20608) return SQLITE_ERROR __2: ; @@ -93326,7 +94059,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20556) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20651) return SQLITE_ERROR __5: ; @@ -93335,7 +94068,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1518 + zOut = ts + 1538 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -93354,7 +94087,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20574, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20669, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -93374,20 +94107,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20597) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20692) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14463) + rc = execSql(tls, db, pzErrMsg, ts+14477) if !(rc != SQLITE_OK) { goto __9 } @@ -93432,7 +94167,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20624, + ts+20719, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -93441,7 +94176,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20732, + ts+20827, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -93452,7 +94187,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20786, + ts+20881, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -93463,7 +94198,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20937, + ts+21032, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -93585,7 +94320,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -93627,7 +94362,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -93784,7 +94519,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -93808,7 +94543,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+12337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12351, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -93892,11 +94627,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21067, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21162, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21091, + ts+21186, 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, @@ -93906,7 +94641,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21190, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21285, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -93940,7 +94675,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -93967,7 +94702,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+21209, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21304, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94005,9 +94740,9 @@ 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+21251, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21346, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3633, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3647, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94017,7 +94752,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 + 21281 + var zFormat uintptr = ts + 21376 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94029,12 +94764,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1518) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1538) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16079, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16126, 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 @@ -94087,17 +94822,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21327, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21422, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3633, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94146,10 +94881,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21327, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21422, 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) @@ -94169,8 +94904,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94183,7 +94918,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94225,7 +94960,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -94593,7 +95328,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -94636,7 +95371,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -94663,7 +95398,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -94891,31 +95626,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21346 + return ts + 21441 } if i == -1 { - return ts + 16188 + return ts + 16235 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -94924,35 +95641,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21353, 5) + Xsqlite3_str_append(tls, pStr, ts+21448, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21359, 1) + Xsqlite3_str_append(tls, pStr, ts+21454, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12727, 1) + Xsqlite3_str_append(tls, pStr, ts+12741, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4927, 1) + Xsqlite3_str_append(tls, pStr, ts+4941, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21359, 1) + Xsqlite3_str_append(tls, pStr, ts+21454, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12727, 1) + Xsqlite3_str_append(tls, pStr, ts+12741, 1) } - Xsqlite3_str_append(tls, pStr, ts+4978, 1) + Xsqlite3_str_append(tls, pStr, ts+4992, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4927, 1) + Xsqlite3_str_append(tls, pStr, ts+4941, 1) } } @@ -94969,29 +95686,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21361, 2) + Xsqlite3_str_append(tls, pStr, ts+21456, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21353, 5) + Xsqlite3_str_append(tls, pStr, ts+21448, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21364 + return ts + 21459 } - return ts + 21369 + return ts + 21464 }(), 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))), j, i, ts+21377) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21472) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21379) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21474) } - Xsqlite3_str_append(tls, pStr, ts+4927, 1) + Xsqlite3_str_append(tls, pStr, ts+4941, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95032,11 +95749,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21381, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21476, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21387 + return ts + 21482 } - return ts + 21394 + return ts + 21489 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95046,43 +95763,43 @@ 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 + 10884 + zFmt = ts + 10898 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21399 + zFmt = ts + 21494 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21432 + zFmt = ts + 21527 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21457 + zFmt = ts + 21552 } else { - zFmt = ts + 21475 + zFmt = ts + 21570 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21484, 7) + Xsqlite3_str_append(tls, bp+64, ts+21579, 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 + 16188 - Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16235 + Xsqlite3_str_appendf(tls, bp+64, ts+21587, 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+21523, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21618, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21533, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21628, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21538, + Xsqlite3_str_appendf(tls, bp+64, ts+21633, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21565, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21660, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95114,25 +95831,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21576, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21671, 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+21364, 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+21459, 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+21597, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21692, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21353, 5) + Xsqlite3_str_append(tls, bp+24, ts+21448, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21364, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21459, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4927, 1) + Xsqlite3_str_append(tls, bp+24, ts+4941, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -95493,7 +96210,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -95546,104 +96263,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -95682,7 +96301,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -95702,6 +96321,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -95852,12 +96473,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -95876,13 +96497,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -95895,7 +96516,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -95957,7 +96578,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96104,6 +96725,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -96446,13 +97069,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -96460,104 +97090,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -96566,92 +97205,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -96661,24 +97294,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -96698,152 +97331,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21605, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21700, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21620, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21715, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -96852,121 +97486,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -96975,36 +97609,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97022,219 +97656,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97244,24 +97878,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97272,41 +97906,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -97340,7 +97974,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -97348,13 +97982,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -97633,7 +98267,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -97646,7 +98280,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -97670,11 +98304,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -97706,10 +98340,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16037, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15368, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14894, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21643, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16084, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15415, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14941, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21738, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -97851,7 +98485,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -97868,10 +98502,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -97928,7 +98562,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98114,6 +98748,7 @@ __3: 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 @@ -98169,7 +98804,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98206,12 +98841,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21745, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21745, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98290,7 +98925,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6679 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6693 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -98384,7 +99019,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21691 + return ts + 21786 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -98578,7 +99213,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -98757,7 +99392,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21698, + Xsqlite3ErrorMsg(tls, pParse, ts+21793, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -98827,6 +99462,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -98853,10 +99491,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -98876,14 +99514,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -98920,14 +99558,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -99370,6 +100008,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -99379,11 +100029,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -99478,7 +100126,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21734, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21829, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -99549,7 +100197,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21760 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21855 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -99783,7 +100431,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -99845,11 +100493,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -99917,7 +100563,7 @@ __3: 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+1454, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1474, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -100039,9 +100685,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3633, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3633, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100109,7 +100755,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -100458,9 +101104,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -100484,7 +101133,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -100500,32 +101150,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -100671,7 +101311,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -100914,13 +101554,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -100931,7 +101568,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -100986,31 +101624,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -101213,6 +101853,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -101344,6 +102042,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -101358,6 +102059,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -101388,7 +102092,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -101544,7 +102248,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+21771, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -101602,7 +102306,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21771, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -101960,7 +102664,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -101972,7 +102676,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -101987,7 +102691,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102000,7 +102704,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21797, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21892, 0) rc = SQLITE_OK } else { goto __3 @@ -102101,7 +102805,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102275,7 +102979,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102327,7 +103031,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -102355,7 +103059,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -102376,7 +103079,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -102398,7 +103100,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -102460,9 +103162,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -102478,7 +103179,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -102498,6 +103201,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -102594,8 +103302,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21832, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21927, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -102607,7 +103315,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -102622,7 +103330,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -102642,7 +103350,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -102650,7 +103358,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -102660,7 +103368,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -102668,7 +103376,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -102700,7 +103408,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -102757,10 +103465,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -102804,16 +103512,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -102846,7 +103554,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -102858,9 +103566,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -102878,6 +103586,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -102964,7 +103724,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -103021,7 +103781,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21850, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21945, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -103044,31 +103804,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103086,13 +103845,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21878, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21973, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103103,169 +103862,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103274,26 +104038,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -103301,37 +104065,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -103339,92 +104103,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -103434,24 +104204,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -103461,96 +104231,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -103558,30 +104328,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -103601,7 +104369,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -103737,11 +104505,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -103780,6 +104545,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -103952,7 +104727,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21896, -1) + pCtx, ts+21991, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104085,7 +104860,7 @@ 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+21952, -1) + pCtx, ts+22047, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104175,17 +104950,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21997)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22008)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22019)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22024)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22037)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22047)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22053)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22064)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22074)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22086)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22091)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22092)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22103)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22114)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22119)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22132)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22142)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22148)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22159)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22169)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22181)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22186)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104231,7 +105006,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22095, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22190, libc.VaList(bp, zName)) } return p } @@ -104275,12 +105050,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+22114, 0) + ts+22209, 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+22185, 0) + ts+22280, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104303,7 +105078,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7848) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7862) } break } @@ -104471,7 +105246,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -104508,7 +105282,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22248, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22343, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -104624,7 +105398,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7440)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7454)) } pSub = Xsqlite3SelectNew(tls, @@ -104738,7 +105512,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22274, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22369, 0) goto windowAllocErr __2: ; @@ -104803,15 +105577,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22306 + zErr = ts + 22401 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22323 + zErr = ts + 22418 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22339 + zErr = ts + 22434 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22359, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22454, 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 { @@ -104832,7 +105606,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+22392, 0) + ts+22487, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -104970,7 +105744,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1518, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1538, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -104988,11 +105762,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22439, - ts + 22492, - ts + 21896, - ts + 22543, - ts + 22595, + ts + 22534, + ts + 22587, + ts + 21991, + ts + 22638, + ts + 22690, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -105473,13 +106247,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1518, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1538, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -106387,19 +107165,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22645, + Xsqlite3ErrorMsg(tls, pParse, ts+22740, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19639 + return ts + 19734 } - return ts + 22687 + return ts + 22782 }(), 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+22693, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22788, 0) } } @@ -106467,7 +107245,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22727, + Xsqlite3ErrorMsg(tls, pParse, ts+22822, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -107564,7 +108342,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22765, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22860, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -108539,21 +109317,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16188, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16235, 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+22787, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22882, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16101, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16148, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22787, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22882, 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)) @@ -109296,7 +110074,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22814) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22909) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -109460,7 +110238,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22823, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22918, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -109677,9 +110455,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6674 + return ts + 6688 } - return ts + 6679 + return ts + 6693 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -109958,19 +110736,19 @@ 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+22847, 0) + ts+22942, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22942, 0) + ts+23037, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23026, 0) + ts+23121, 0) } break case uint32(273): @@ -110349,9 +111127,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22823, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22918, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23111, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23206, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111119,7 +111897,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23128, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23223, libc.VaList(bp, bp+2464)) break } } @@ -111140,9 +111918,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3633, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3647, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23153, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23248, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111155,7 +111933,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111315,7 +112093,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23164, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23259, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111328,11 +112106,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19759, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19854, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23266, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23176, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23271, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -111345,9 +112123,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23186, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23281, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23190, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23285, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -111457,36 +112235,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -111603,7 +112359,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -111874,16 +112630,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -111947,6 +112704,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -111997,6 +112755,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112145,7 +112904,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -112175,7 +112934,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112190,7 +112949,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23198, 0) + ts+23293, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112286,7 +113045,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112297,8 +113056,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112308,13 +113067,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -112381,23 +113140,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23266 + var zErr uintptr = ts + 23361 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23280 + zErr = ts + 23375 break } case SQLITE_ROW: { - zErr = ts + 23302 + zErr = ts + 23397 break } case SQLITE_DONE: { - zErr = ts + 23324 + zErr = ts + 23419 break } @@ -112415,35 +113174,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23347, - ts + 23360, + ts + 23442, + ts + 23455, uintptr(0), - ts + 23376, - ts + 23401, - ts + 23415, - ts + 23434, - ts + 1454, - ts + 23459, + ts + 23471, ts + 23496, - ts + 23508, - ts + 23523, - ts + 23556, - ts + 23574, - ts + 23599, - ts + 23628, + ts + 23510, + ts + 23529, + ts + 1474, + ts + 23554, + ts + 23591, + ts + 23603, + ts + 23618, + ts + 23651, + ts + 23669, + ts + 23694, + ts + 23723, uintptr(0), - ts + 5818, - ts + 5304, - ts + 23645, - ts + 23663, - ts + 23681, + ts + 5832, + ts + 5318, + ts + 23740, + ts + 23758, + ts + 23776, uintptr(0), - ts + 23715, + ts + 23810, uintptr(0), - ts + 23736, - ts + 23762, - ts + 23785, - ts + 23806, + ts + 23831, + ts + 23857, + ts + 23880, + ts + 23901, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -112558,7 +113317,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -112603,7 +113362,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+23822, 0) + ts+23917, 0) return SQLITE_BUSY } else { @@ -112720,7 +113479,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23885, libc.VaList(bp, zName)) + ts+23980, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -112736,6 +113495,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -112745,7 +113507,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -112953,7 +113715,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+23936, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24031, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113046,7 +113808,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113116,7 +113878,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113126,7 +113888,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113158,20 +113920,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23957, 0) + ts+24052, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -113295,7 +114057,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+24025, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24120, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -113340,10 +114102,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24031, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24126, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24041, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24136, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -113448,7 +114210,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24069, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24164, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -113459,17 +114221,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24073, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24168, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24073 + zModeType = ts + 24168 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24079, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24174, zOpt, uint64(4)) == 0) { goto __32 } @@ -113477,7 +114239,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3242 + zModeType = ts + 3256 __32: ; if !(aMode != 0) { @@ -113507,7 +114269,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24084, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24179, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -113515,7 +114277,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24104, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24199, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -113555,7 +114317,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24128, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24223, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -113579,15 +114341,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24144, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24151, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24239, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24246, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24159, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24162, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17283, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24254, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24257, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24260, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17330, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -113702,7 +114464,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -113721,8 +114483,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -113733,10 +114495,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+21691, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21786, 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+24169, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24264, 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) { @@ -113750,7 +114512,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -113767,7 +114529,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -113801,9 +114563,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6351 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6365 (*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 + 23171 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23266 (*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) @@ -113908,7 +114670,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24175 + zFilename = ts + 24270 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114011,21 +114773,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24178, + Xsqlite3_log(tls, iErr, ts+24273, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24203) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24298) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24223) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24318) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24230) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24325) } // This is a convenience routine that makes sure that all thread-specific @@ -114136,7 +114898,7 @@ __4: 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 + 1083 + zDataType = ts + 1103 primarykey = 1 __13: ; @@ -114183,14 +114945,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24247, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24342, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114260,6 +115022,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -114836,7 +115601,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24275, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24370, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -114869,7 +115634,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -114880,7 +115645,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -114954,7 +115719,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 + 24283 + return ts + 24378 } return uintptr(0) }(), 0) @@ -115049,7 +115814,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -115132,7 +115897,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6151, ts + 6674, ts + 6679, ts + 6161, ts + 6156, ts + 7915, ts + 24306, ts + 24312, + ts + 6165, ts + 6688, ts + 6693, ts + 6175, ts + 6170, ts + 7929, ts + 24401, ts + 24407, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115285,7 +116050,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 + 24319 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24414 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -115311,7 +116076,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6151, uint32(4)) + jsonAppendRaw(tls, p, ts+6165, uint32(4)) break } @@ -115340,7 +116105,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24336, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24431, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -115398,19 +116163,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6151, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6165, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6674, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6688, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6679, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6693, uint32(5)) break } @@ -115955,17 +116720,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6151, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6165, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6674, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6688, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6679, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6693, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116066,7 +116831,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+24365, -1) + Xsqlite3_result_error(tls, pCtx, ts+24460, -1) } } jsonParseReset(tls, pParse) @@ -116372,7 +117137,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+24380, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24475, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -116387,7 +117152,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24384, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24479, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -116441,7 +117206,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24410, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24505, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -116546,11 +117311,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24453, uint32(2)) + jsonAppendRaw(tls, bp, ts+24548, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4968, uint32(2)) + jsonAppendRaw(tls, bp, ts+4982, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24456, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24551, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -116591,7 +117356,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6151, uint32(4)) + jsonAppendRaw(tls, bp, ts+6165, uint32(4)) } } if i == argc { @@ -116707,14 +117472,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24459, -1) + ts+24554, -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+24510, -1) + Xsqlite3_result_error(tls, ctx, ts+24605, -1) jsonReset(tls, bp) return } @@ -116809,7 +117574,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15301) + jsonWrongNumArgs(tls, ctx, ts+15348) return __2: ; @@ -116884,9 +117649,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24544 + return ts + 24639 } - return ts + 24548 + return ts + 24643 }()) return __2: @@ -117019,7 +117784,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24555, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24650, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117116,7 +117881,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24653, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117160,7 +117925,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24561) + ts+24656) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117291,7 +118056,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24644, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24739, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117310,7 +118075,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24650, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24745, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -117406,7 +118171,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24650, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24745, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -117430,7 +118195,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 + 24655 + zRoot = ts + 24750 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -117546,7 +118311,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+24365, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24460, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -117641,25 +118406,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24657}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24662}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24673}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24704}, - {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 + 24707}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24711}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24723}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24735}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24746}, + {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 + 24757}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24769}, - {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 + 24782}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24801}, - {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 + 24812}, - {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 + 24829}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, + {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), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24799}, + {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 + 24802}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24806}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24818}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24830}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24841}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24852}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24864}, + {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 + 24877}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24886}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24896}, + {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 + 24907}, + {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 + 24924}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -117678,8 +118443,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24847, FpModule: 0}, - {FzName: ts + 24857, FpModule: 0}, + {FzName: ts + 24942, FpModule: 0}, + {FzName: ts + 24952, FpModule: 0}, } type Rtree1 = struct { @@ -117939,11 +118704,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+24867, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24962, 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+24875, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24970, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -118154,7 +118919,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24880, + ts+24975, 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)) @@ -118857,7 +119622,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24962) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25057) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119069,7 +119834,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3633, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120198,7 +120963,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24976, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25071, 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 { @@ -120210,12 +120975,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24996, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25091, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25028, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25123, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120256,7 +121021,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -120441,7 +121206,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25065, 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+25160, 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)) @@ -120464,14 +121229,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25210 + var zFmt uintptr = ts + 25305 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11256, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11270, 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 { @@ -120512,7 +121277,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25266, ts + 5030, ts + 16188, + ts + 25361, ts + 5044, ts + 16235, } var rtreeModule = Sqlite3_module{ @@ -120555,19 +121320,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+25271, + ts+25366, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25333, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25428, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25338, + ts+25433, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25402, + ts+25497, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25472, + ts+25567, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -120596,7 +121361,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25521 + zFormat = ts + 25616 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -120608,7 +121373,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+25629, + ts+25724, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -120616,18 +121381,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+25674, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25769, 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+12727, 1) + Xsqlite3_str_append(tls, p, ts+12741, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25701, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25796, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25723, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25818, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25731, 0) + Xsqlite3_str_appendf(tls, p, ts+25826, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -120642,14 +121407,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25747, - ts + 25800, - ts + 25845, - ts + 25897, - ts + 25951, - ts + 25996, - ts + 26054, - ts + 26109, + ts + 25842, + ts + 25895, + ts + 25940, + ts + 25992, + ts + 26046, + ts + 26091, + ts + 26149, + ts + 26204, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -120678,7 +121443,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26156, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26251, 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 @@ -120686,19 +121451,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26176, + ts+26271, 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+3633, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, 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+26233, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26328, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -120740,16 +121505,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26268, - ts + 26311, - ts + 26346, - ts + 26382, + ts + 26363, + ts + 26406, + ts + 26441, + ts + 26477, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -120774,7 +121539,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26419, + Xsqlite3_str_appendf(tls, pSql, ts+26514, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -120786,7 +121551,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26443, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26538, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -120809,7 +121574,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26449, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26544, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -120820,14 +121585,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, 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+3633, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -120870,7 +121635,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -120887,7 +121652,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -120905,7 +121670,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26452, ts + 26463} +var azFormat = [2]uintptr{ts + 26547, ts + 26558} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -120943,13 +121708,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10828, 1) + Xsqlite3_str_append(tls, pOut, ts+10842, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26473, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26568, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26479, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26574, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26483, 1) + Xsqlite3_str_append(tls, pOut, ts+26578, 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}))) @@ -120960,7 +121725,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26485, -1) + Xsqlite3_result_error(tls, ctx, ts+26580, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121038,12 +121803,12 @@ 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+26518, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26613, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4032 + return ts + 4046 } - return ts + 1518 + return ts + 1538 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -121062,7 +121827,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+26525, + ts+26620, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121081,7 +121846,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+26570, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26665, libc.VaList(bp+16, iNode)) } } @@ -121095,8 +121860,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26602, - ts + 26656, + ts + 26697, + ts + 26751, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -121111,23 +121876,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+26704, + rtreeCheckAppendMsg(tls, pCheck, ts+26799, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26749 + return ts + 26844 } - return ts + 26757 + return ts + 26852 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26766, + ts+26861, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26749 + return ts + 26844 } - return ts + 26757 + return ts + 26852 }(), iKey, iVal)) } } @@ -121151,7 +121916,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+26824, libc.VaList(bp, i, iCell, iNode)) + ts+26919, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121171,7 +121936,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+26872, libc.VaList(bp+24, i, iCell, iNode)) + ts+26967, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121188,14 +121953,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+26939, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27034, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26973, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27068, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121203,7 +121968,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+27003, + ts+27098, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121232,14 +121997,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27058, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27153, 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+27089, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27184, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121261,12 +122026,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14463, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14477, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27156, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27251, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121275,12 +122040,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24976, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25071, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27184, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27279, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121294,8 +122059,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+27215, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27222, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27310, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27317, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121303,7 +122068,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27230, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27325, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121318,7 +122083,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27234, -1) + ts+27329, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121326,7 +122091,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6351 + zDb = ts + 6365 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -121336,7 +122101,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17825 + return ts + 17953 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -121705,11 +122470,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+27285, 1) + Xsqlite3_str_append(tls, x, ts+27380, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27287, 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+27382, 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+27298, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27393, 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) } @@ -121729,19 +122494,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+27309, 0) + Xsqlite3_str_appendf(tls, x, ts+27404, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27327, 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+27422, 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+27335, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27430, 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+27343, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27438, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27347, 0) + Xsqlite3_str_appendf(tls, x, ts+27442, 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) } @@ -122647,7 +123412,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27360, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27455, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -122656,7 +123421,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27382, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27477, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -122664,7 +123429,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26449, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26544, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -122675,7 +123440,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -122700,7 +123465,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -122889,7 +123654,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16188 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16235 (*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 @@ -122899,7 +123664,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27386 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27481 (*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 @@ -122907,7 +123672,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27392 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27487 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123019,7 +123784,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27401, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27496, 0) __4: ; goto geopoly_update_end @@ -123149,14 +123914,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27441) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27536) == 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+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123221,7 +123986,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27472, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27567, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123233,25 +123998,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27480}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27493}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27506}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27519}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27531}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27441}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27554}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27568}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27581}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27595}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27611}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27575}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27588}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27601}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27614}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27626}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27536}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27649}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27663}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27676}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27690}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27706}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27623}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27718}, } // Register the r-tree module with database handle db. This creates the @@ -123261,26 +124026,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27642, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27737, 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+27652, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27747, 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+27663, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27758, -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+27386, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27481, 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+27674, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27769, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -123334,7 +124099,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24962, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25057, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -123401,6 +124166,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -123659,7 +124426,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27684, -1) + Xsqlite3_result_error(tls, context, ts+27779, -1) return } @@ -123670,7 +124437,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+27684, -1) + Xsqlite3_result_error(tls, context, ts+27779, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -123683,7 +124450,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -123695,7 +124462,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -123771,7 +124538,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27705, uintptr(0), uintptr(0), p+64) + ts+27800, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -123835,7 +124602,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+24875, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24970, 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++ { } @@ -123856,16 +124623,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27876, libc.VaList(bp, func() uintptr { + ts+27971, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28026 + return ts + 28121 } - return ts + 1518 + return ts + 1538 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28067) + ts+28162) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -123963,7 +124730,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -123981,7 +124748,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+28192, libc.VaList(bp, zTab))) + ts+28287, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -123999,7 +124766,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+28311, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28406, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124017,7 +124784,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28332, libc.VaList(bp+16, zIdx))) + ts+28427, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124040,7 +124807,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28383, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28478, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124086,7 +124853,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28404, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28499, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124101,7 +124868,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28432, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28527, 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)), 1) if iCid >= 0 { @@ -124141,7 +124908,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+19285, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19380, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124151,18 +124918,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28461, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28556, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28480, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28575, 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+28485, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28580, zName) { bRbuRowid = 1 } } @@ -124174,18 +124941,18 @@ 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+28495, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28590, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28524 + return ts + 28619 } - return ts + 28537 + return ts + 28632 }())) } 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+28546, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28641, 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)), 1) @@ -124199,7 +124966,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+28568, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28663, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -124242,12 +125009,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+28595, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14574 + zList = rbuMPrintf(tls, p, ts+28690, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14588 } return zList } @@ -124258,13 +125025,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+28604, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124286,25 +125053,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+28617, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28712, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28649, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28744, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14574, ts+28672) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28678, ts+28685, ts+4927) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14574, ts+1518) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+28767) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28773, ts+28780, ts+4941) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+1538) 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+28693, + ts+28788, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28735, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28830, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -124341,12 +125108,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1518 + zSep = ts + 1538 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28527, 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 @@ -124381,7 +125148,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28755 + zCol = ts + 28850 __7: ; goto __5 @@ -124389,13 +125156,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28763, + zLhs = rbuMPrintf(tls, p, ts+28858, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28784, + zOrder = rbuMPrintf(tls, p, ts+28879, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28820, + zSelect = rbuMPrintf(tls, p, ts+28915, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14574 + zSep = ts + 14588 iCol++ goto __1 __2: @@ -124413,12 +125180,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28847, + Xsqlite3_mprintf(tls, ts+28942, 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 + 1518 + zSep = ts + 1538 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -124440,8 +125207,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14574 + zVector = rbuMPrintf(tls, p, ts+28990, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14588 goto __15 __15: iCol++ @@ -124452,7 +125219,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28902, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28997, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -124479,13 +125246,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1518 - var zAnd uintptr = ts + 1518 + var zCom uintptr = ts + 1538 + var zAnd uintptr = ts + 1538 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -124497,9 +125264,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28914, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29009, 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 + zType = ts + 1538 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -124509,37 +125276,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 + 28755 + zCol = ts + 28850 } else { - zCol = ts + 28485 + zCol = ts + 28580 } - zType = ts + 1083 + zType = ts + 1103 } 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+28936, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29031, 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 + 28672 + return ts + 28767 } - return ts + 1518 + return ts + 1538 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28956, + zImpPK = Xsqlite3_mprintf(tls, ts+29051, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28977, + zImpCols = Xsqlite3_mprintf(tls, ts+29072, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29010, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29105, 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 + 14574 - zAnd = ts + 21353 + zCom = ts + 14588 + zAnd = ts + 21448 nBind++ } @@ -124573,16 +125340,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1518 + var zS uintptr = ts + 1538 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+29034, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29129, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29046, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29141, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14574 + zS = ts + 14588 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -124590,7 +125357,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29055, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29150, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -124602,27 +125369,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29070, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29165, 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 zSep uintptr = ts + 1538 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+29084, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21353 + zList = rbuMPrintf(tls, p, ts+29179, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21448 } } zList = rbuMPrintf(tls, p, - ts+29096, libc.VaList(bp+40, zList)) + ts+29191, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+29146, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21353 + zList = rbuMPrintf(tls, p, ts+29241, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21448 } } } @@ -124631,7 +125398,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29159, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29254, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -124645,21 +125412,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+29146, + zList = rbuMPrintf(tls, p, ts+29241, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14574 + zSep = ts + 14588 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29185, + zList = rbuMPrintf(tls, p, ts+29280, 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 + 14574 + zSep = ts + 14588 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29215, + zList = rbuMPrintf(tls, p, ts+29310, 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 + 14574 + zSep = ts + 14588 } } } @@ -124694,19 +125461,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29252 + var zSep uintptr = ts + 29347 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28404, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28499, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16076) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16123) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp+8, zIdx))) } break } @@ -124718,15 +125485,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28672 + zDesc = ts + 28767 } else { - zDesc = ts + 1518 + zDesc = ts + 1538 } - z = rbuMPrintf(tls, p, ts+29265, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14574 + z = rbuMPrintf(tls, p, ts+29360, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14588 } } - z = rbuMPrintf(tls, p, ts+29276, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -124741,12 +125508,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1518 + var zComma uintptr = ts + 1538 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29280) + ts+29375) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -124755,7 +125522,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -124765,25 +125532,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29330, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29425, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29352, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29447, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28672 + return ts + 28767 } - return ts + 1518 + return ts + 1538 }())) - zComma = ts + 14574 + zComma = ts + 14588 } } - zCols = rbuMPrintf(tls, p, ts+29362, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29457, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29377, + ts+29472, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) } } @@ -124793,50 +125560,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1518 + var zComma uintptr = ts + 1538 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1518 + var zPk uintptr = ts + 1538 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, (*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 { - zPk = ts + 29439 + zPk = ts + 29534 } - zSql = rbuMPrintf(tls, p, ts+29452, + zSql = rbuMPrintf(tls, p, ts+29547, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29479 + return ts + 29574 } - return ts + 1518 + return ts + 1538 }())) - zComma = ts + 14574 + zComma = ts + 14588 } 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+29489, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29584, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29496, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29591, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29528 + return ts + 29623 } - return ts + 1518 + return ts + 1538 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) } } @@ -124849,7 +125616,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29543, + ts+29638, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -124886,7 +125653,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29600) + ts+29695) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -124991,7 +125758,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+29666, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29761, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125011,24 +125778,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29686, + ts+29781, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29751, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29846, libc.VaList(bp+128, zTbl, zBind))) } 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+29787, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29882, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125044,7 +125811,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29821, + ts+29916, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125052,31 +125819,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29882 + return ts + 29977 } - return ts + 29886 + return ts + 29981 }() } - return ts + 1518 + return ts + 1538 }(), 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+29892, + ts+29987, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29953, + ts+30048, 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 + 29882 + return ts + 29977 } - return ts + 29886 + return ts + 29981 }(), zCollist, zLimit)) } @@ -125101,8 +125868,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6362) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6358) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6376) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6372) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125111,52 +125878,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1518 + return ts + 1538 } - return ts + 30112 + return ts + 30207 }() 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+30121, + ts+30216, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30157 + return ts + 30252 } - return ts + 1518 + return ts + 1538 }(), zBindings))) } 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+30167, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30262, 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 + var zRbuRowid uintptr = ts + 1538 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30195 + zRbuRowid = ts + 30290 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30207, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30302, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30283 + return ts + 30378 } - return ts + 1518 + return ts + 1538 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30300, + ts+30395, 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+30599, + ts+30694, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125164,14 +125931,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1518 + var zRbuRowid uintptr = ts + 1538 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30698 + zRbuRowid = ts + 30793 } else { - zRbuRowid = ts + 30708 + zRbuRowid = ts + 30803 } } @@ -125184,35 +125951,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28755, 0) + zOrder = rbuMPrintf(tls, p, ts+28850, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14574, ts+1518) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+1538) } } 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+30719, + ts+30814, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30767 + return ts + 30862 } - return ts + 1518 + return ts + 1538 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if zOrder != 0 { - return ts + 19639 + return ts + 19734 } - return ts + 1518 + return ts + 1538 }(), zOrder, zLimit))) } @@ -125275,12 +126042,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1518 + var zPrefix uintptr = ts + 1538 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30112 + zPrefix = ts + 30207 } - zUpdate = Xsqlite3_mprintf(tls, ts+30773, + zUpdate = Xsqlite3_mprintf(tls, ts+30868, 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) @@ -125307,7 +126074,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -125339,7 +126106,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30803, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30898, 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)), 0) { case RBU_STATE_STAGE: @@ -125409,28 +126176,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6351, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365, 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+6351) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30833, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30928, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30860, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3256, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30956, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3270, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6351, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6365, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30878, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30974, 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+6351, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -125463,11 +126230,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+30944, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31040, 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+24025, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24120, (*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)))) == '?' { @@ -125479,16 +126246,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30976, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6351), + zTarget = Xsqlite3_mprintf(tls, ts+31072, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365), func() uintptr { if zExtra == uintptr(0) { - return ts + 1518 + return ts + 1538 } - return ts + 31008 + return ts + 31104 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1518 + return ts + 1538 } return zExtra }())) @@ -125504,37 +126271,37 @@ 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+31010, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31106, -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+31025, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31121, 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+31042, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31138, -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+6351, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31058, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31154, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 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+31086, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31182, 0) } } @@ -125563,14 +126330,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31058, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31154, uintptr(0), uintptr(0), uintptr(0)) } } 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+31104, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31200, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -125679,7 +126446,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6351, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6365, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -125696,23 +126463,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31139, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31235, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6351) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365) } - zOal = Xsqlite3_mprintf(tls, ts+31164, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31171, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31260, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31267, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -125733,12 +126500,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -125832,7 +126596,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23663, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23758, 0) return } @@ -125925,7 +126689,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31178) + ts+31274) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -125933,7 +126697,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31200, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31296, libc.VaList(bp, iCookie+1)) } } } @@ -125954,7 +126718,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31227, + ts+31323, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -125984,9 +126748,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31385, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31481, 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+31400, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31496, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126000,10 +126764,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31420, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31516, 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+31445) + ts+31541) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126017,12 +126781,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31553) + ts+31649) } 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+31618) + ts+31714) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126034,7 +126798,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31662, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31758, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126054,15 +126818,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17161) - rbuCopyPragma(tls, p, ts+16272) + rbuCopyPragma(tls, p, ts+17208) + rbuCopyPragma(tls, p, ts+16319) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31687, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31783, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126086,10 +126850,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14492, 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14492, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126184,7 +126948,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31715, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31811, 0) } if rc == SQLITE_OK { @@ -126200,7 +126964,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31164, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31260, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126216,7 +126980,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31740, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31836, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126250,7 +127014,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31751, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31847, 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)), -1) } else { @@ -126280,13 +127044,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31823, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31919, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31837) + ts+31933) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126297,7 +127061,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31894) + ts+31990) 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)), 0) @@ -126327,10 +127091,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -126341,7 +127106,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3633, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3647, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -126370,7 +127135,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+31968, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32064, 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 @@ -126388,12 +127153,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32000, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32096, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32032 + return ts + 32128 } - return ts + 32039 + return ts + 32135 }())) } } @@ -126401,7 +127166,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+14463, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14477, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -126412,19 +127177,19 @@ 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+16875) - rbuCopyPragma(tls, p, ts+16287) + rbuCopyPragma(tls, p, ts+16922) + rbuCopyPragma(tls, p, ts+16334) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32046, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32142, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6351, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6365, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32062, uintptr(0), uintptr(0), p+64) + db, ts+32158, uintptr(0), uintptr(0), p+64) } } @@ -126478,7 +127243,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32086, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32182, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -126505,7 +127270,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30112, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30207, 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++ @@ -126522,7 +127287,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14492, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -126535,13 +127300,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14492, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32094, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32190, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126636,7 +127401,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14478, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14492, uintptr(0), uintptr(0), uintptr(0)) } } @@ -126653,19 +127418,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14478, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14492, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14463 + zBegin = ts + 14477 } else { - zBegin = ts + 32046 + zBegin = ts + 32142 } 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+32046, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32142, uintptr(0), uintptr(0), uintptr(0)) } } @@ -126673,6 +127438,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -126691,7 +127478,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -126986,7 +127773,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32121, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32217, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127011,7 +127798,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+32144, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32240, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127056,7 +127843,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -129867,7 +130654,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -129909,7 +130696,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -129970,7 +130757,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -130044,13 +130831,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -130112,7 +130899,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -130124,6 +130911,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -130476,7 +131272,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -130644,45 +131440,45 @@ 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+11256) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11270) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+32731, bp+16) + sessionAppendStr(tls, bp, ts+32827, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32744, bp+16) + sessionAppendStr(tls, bp, ts+32840, bp+16) 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+32750, bp+16) + sessionAppendStr(tls, bp, ts+32846, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14574 + zSep = ts + 14588 } } - zSep = ts + 1518 - sessionAppendStr(tls, bp, ts+32679, bp+16) + zSep = ts + 1538 + sessionAppendStr(tls, bp, ts+32775, 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+32755, bp+16) + ts+32851, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32687, bp+16) + sessionAppendStr(tls, bp, ts+32783, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21353 + zSep = ts + 21448 } } @@ -130729,42 +131525,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32830, bp+16) + sessionAppendStr(tls, bp, ts+32926, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32679, bp+16) + sessionAppendStr(tls, bp, ts+32775, 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+32750, bp+16) + sessionAppendStr(tls, bp, ts+32846, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21353 + zSep = ts + 21448 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32848, bp+16) + sessionAppendStr(tls, bp, ts+32944, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32391, bp+16) + sessionAppendStr(tls, bp, ts+32487, bp+16) - zSep = ts + 1518 + zSep = ts + 1538 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+32687, bp+16) + sessionAppendStr(tls, bp, ts+32783, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32856 + zSep = ts + 32952 } } - sessionAppendStr(tls, bp, ts+4927, bp+16) + sessionAppendStr(tls, bp, ts+4941, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -130777,7 +131573,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6351, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6365, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -130788,21 +131584,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32861, bp+16) + sessionAppendStr(tls, bp, ts+32957, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21359, bp+16) + sessionAppendStr(tls, bp, ts+21454, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14574, bp+16) + sessionAppendStr(tls, bp, ts+14588, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32879, bp+16) + sessionAppendStr(tls, bp, ts+32975, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32890, bp+16) + sessionAppendStr(tls, bp, ts+32986, bp+16) } - sessionAppendStr(tls, bp, ts+4927, bp+16) + sessionAppendStr(tls, bp, ts+4941, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -130816,14 +131612,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11256, p) + var rc int32 = sessionSelectRow(tls, db, ts+11270, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32894) + ts+32990) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33007) + ts+33103) } return rc } @@ -130851,7 +131647,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131104,7 +131900,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33151, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33247, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131120,7 +131916,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+33172, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33268, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131193,10 +131989,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33191, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33287, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33217, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33313, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -131229,7 +132025,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131242,7 +132038,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6351, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6365, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -131255,19 +132051,19 @@ 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+33247, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33343, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33291, + ts+33387, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33362, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33458, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11256) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11270) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131318,14 +132114,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33422, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33518, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33452, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33548, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33476, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33452, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33572, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33548, uintptr(0), uintptr(0), uintptr(0)) } } @@ -131839,7 +132635,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -132573,7 +133369,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33504, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33600, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -132861,7 +133657,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33532, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33628, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133048,7 +133844,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+33563, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33659, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133116,7 +133912,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33570 + var zErr uintptr = ts + 33666 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133275,7 +134071,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1518 + return ts + 1538 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -133298,7 +134094,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33620 + var zErr uintptr = ts + 33716 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133622,13 +134418,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33668, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33764, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33676, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33772, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33686, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33782, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134039,7 +134835,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6151, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6165, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134179,7 +134975,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33691, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33787, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134206,14 +135002,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+33698, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33794, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33729, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33825, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134224,7 +135020,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33762, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33858, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134237,7 +135033,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33799, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33895, 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))) @@ -134246,7 +135042,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+33808, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33904, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134265,7 +135061,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33841, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33937, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134280,14 +135076,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33875, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33971, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33883, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33915, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34011, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134295,9 +135091,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33921, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34017, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33935, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34031, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134305,9 +135101,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33973, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34069, 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+33984, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34080, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -134315,21 +135111,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5045, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5059, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7928, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17266}, - {FzName: ts + 34019, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7942, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17313}, + {FzName: ts + 34115, 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+34027, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34123, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34058, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34154, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -134376,15 +135172,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22019) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16188) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34086, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22114) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16235) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34182, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34116) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34212) { *(*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+34126, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34222, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -134401,13 +135197,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34157, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34253, 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+34162, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34258, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34169, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34265, libc.VaList(bp+16, i)) } } } @@ -134445,8 +135241,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+22019) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34177, 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+22114) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34273, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -134478,7 +135274,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+34206, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34302, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -134487,13 +135283,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1518 + return ts + 1538 }(), pzErr) } else { @@ -134515,19 +135311,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 + 33875 + zTail = ts + 33971 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34226 + zTail = ts + 34322 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34234, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34330, 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+16188, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16235, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -134571,18 +135367,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34245, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34341, 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 + 1538 } - return ts + 14574 + return ts + 14588 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34268, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22019)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34364, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22114)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -134692,7 +135488,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34390) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -134702,7 +135498,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+34299) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34395) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -134712,7 +135508,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+34308) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34404) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -134725,7 +135521,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+34318) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34414) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -134735,7 +135531,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+34328) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34424) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -134751,7 +135547,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+22019) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22114) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -134774,7 +135570,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34340 + var zSelect uintptr = ts + 34436 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -134796,7 +135592,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34372) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34468) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -134810,7 +135606,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34380, + ts+34476, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -134908,7 +135704,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34445, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34541, 0) return FTS5_EOF } } @@ -134921,20 +135717,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+34465, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34561, 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+34496, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34592, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34595, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29882, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29977, uint64(3)) == 0 { tok = FTS5_AND } break @@ -136701,9 +137497,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34503, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34599, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33532, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33628, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -136719,7 +137515,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+34508, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34604, 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') @@ -136806,7 +137602,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20356, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20451, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -136887,7 +137683,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34537, 0) + ts+34633, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137057,12 +137853,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+34590, + ts+34686, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34640 + return ts + 34736 } - return ts + 34503 + return ts + 34599 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138005,7 +138801,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34647, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34743, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -138084,7 +138880,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+34653, + ts+34749, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138109,7 +138905,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34704, + ts+34800, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -138132,7 +138928,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34753, + ts+34849, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -138371,7 +139167,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34793, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34889, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -138444,13 +139240,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -139570,7 +140366,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34816, + ts+34912, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -140763,7 +141559,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1518 + return ts + 1538 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -140929,10 +141725,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -140960,7 +141756,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141036,7 +141832,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+34900, + ts+34996, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141079,7 +141875,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -141091,7 +141887,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -141211,7 +142007,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -141610,12 +142406,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -141626,7 +142422,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -141807,7 +142603,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -141931,7 +142727,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -141940,7 +142736,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -141972,8 +142768,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -142026,8 +142822,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -142097,7 +142893,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1518, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1538, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -142113,13 +142909,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+34957, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35053, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24875, ts+34965, 0, pzErr) + pConfig, ts+24970, ts+35061, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11396, - ts+35000, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11410, + ts+35096, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -142372,7 +143168,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+34647, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34743, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -142486,7 +143282,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35044, + ts+35140, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -142645,6 +143441,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -142652,7 +143452,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35130) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35226) 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)) @@ -142923,7 +143723,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+35135, 0) + ts+35231, 0) return SQLITE_ERROR } @@ -142954,7 +143754,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4945, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4959, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -142969,7 +143769,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4945, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4959, 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) @@ -143283,7 +144083,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143315,7 +144115,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -143347,25 +144147,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35174, + ts+35270, 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 + 14574 + return ts + 14588 } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if bDesc != 0 { - return ts + 35229 + return ts + 35325 } - return ts + 35234 + return ts + 35330 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -143411,12 +144211,12 @@ 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+35238, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35334, 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+5027, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5041, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35244, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35340, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -143447,7 +144247,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35272, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35368, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -143478,7 +144278,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35282, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35378, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -143510,14 +144310,14 @@ 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+35303, libc.VaList(bp, z)) + ts+35399, 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 + 33686 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33782 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -143573,7 +144373,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+35135, 0) + ts+35231, 0) return SQLITE_ERROR __1: ; @@ -143616,7 +144416,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1518 + zText = ts + 1538 __14: ; iCol = 0 @@ -143790,7 +144590,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35336, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35432, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -143911,7 +144711,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -143935,28 +144735,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35372, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35468, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35383, 0) + ts+35479, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35463, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35559, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35471, 0) + ts+35567, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16855, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16902, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35527, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35623, 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+35533, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35629, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144014,7 +144814,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17400, z) { + 0 == Xsqlite3_stricmp(tls, ts+17447, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -144027,12 +144827,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35549, + ts+35645, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20257 + return ts + 20352 } - return ts + 35586 + return ts + 35682 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -144662,7 +145462,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+35598, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35694, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -144906,7 +145706,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+35619, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35715, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -144925,7 +145725,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+35641, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35737, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -144972,7 +145772,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35672) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35768) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -144981,7 +145781,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35685, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35781, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -144995,7 +145795,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35776, ts + 33875, ts + 24875, ts + 34226, ts + 11396, + ts + 35872, ts + 33971, ts + 24970, ts + 34322, ts + 11410, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145019,7 +145819,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35783, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35879, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145037,13 +145837,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35879, 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+35788, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35884, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145098,17 +145898,17 @@ 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)) = [11]uintptr{ - ts + 35803, - ts + 35871, - ts + 35940, - ts + 35973, - ts + 36012, - ts + 36052, - ts + 36091, - ts + 36132, - ts + 36171, - ts + 36213, - ts + 36253, + ts + 35899, + ts + 35967, + ts + 36036, + ts + 36069, + ts + 36108, + ts + 36148, + ts + 36187, + ts + 36228, + ts + 36267, + ts + 36309, + ts + 36349, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145175,7 +145975,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3633, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145210,18 +146010,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36276, + ts+36372, 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+36380, + ts+36476, 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+36418, + ts+36514, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145233,7 +146033,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36456, + ts+36552, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145245,14 +146045,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24875, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11396, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35776, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24970, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11410, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35872, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34226, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34322, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33875, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33971, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145264,17 +146064,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36498, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36594, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29528 + return ts + 29623 } - return ts + 1518 + return ts + 1538 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36528, + ts+36624, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145311,27 +146111,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36572, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36668, 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+36595, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36691, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33875, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33971, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34226, ts+36601, 0, pzErr) + pConfig, ts+34322, ts+36697, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35776, ts+36633, 1, pzErr) + pConfig, ts+35872, ts+36729, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34372, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34468, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -145537,12 +146337,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36650, + ts+36746, 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+36700, + ts+36796, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -145550,7 +146350,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34372, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34468, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -145726,7 +146526,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36729, + zSql = Xsqlite3_mprintf(tls, ts+36825, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -145908,14 +146708,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33875, bp+48) + rc = fts5StorageCount(tls, p, ts+33971, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34226, bp+56) + rc = fts5StorageCount(tls, p, ts+34322, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146110,9 +146910,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+36761) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36857) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36772) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36868) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146327,7 +147127,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 + 36783 + var zCat uintptr = ts + 36879 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -146339,7 +147139,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36792) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36888) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -146350,18 +147150,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+36803) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36899) { 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+36761) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36857) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36772) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36868) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36792) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36888) { } else { rc = SQLITE_ERROR } @@ -146637,7 +147437,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)) = uintptr(0) - var zBase uintptr = ts + 36821 + var zBase uintptr = ts + 36917 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -146779,7 +147579,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36831, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36927, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146787,11 +147587,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36930, 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+36839, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36935, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -146799,7 +147599,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36844, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146807,7 +147607,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146815,11 +147615,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -146827,19 +147627,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36956, 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+36864, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36960, 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+36870, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36966, 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+36875, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36971, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146847,11 +147647,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36879, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36975, 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+36883, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146859,7 +147659,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36982, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146867,11 +147667,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36890, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36986, 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+36894, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36990, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146879,7 +147679,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36898, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146887,7 +147687,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146895,7 +147695,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146911,24 +147711,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36910, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36890, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36916, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37012, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36920, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37016, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -146943,137 +147743,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36923, aBuf+uintptr(nBuf-7), uint64(7)) { + 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+36890, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36931, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37027, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36938, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37034, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36839, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36935, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37044, 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+36930, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, 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+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36958, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15401, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15448, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36963, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36916, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37012, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } 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+37068, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36875, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36971, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36978, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37074, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36982, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37078, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36984, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37080, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36898, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36994, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36990, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37086, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, 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+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36890, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37105, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37111, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36902, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36998, 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+37119, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37031, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37127, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37131, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36898, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36994, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37139, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37049, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37145, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36902, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36998, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37151, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36916, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37012, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147088,16 +147888,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37062, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37158, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37163, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147105,21 +147905,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37168, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37078, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147127,7 +147927,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37180, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147135,9 +147935,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37090, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37186, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147152,12 +147952,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37096, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37192, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37100, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37196, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37199, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147166,7 +147966,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147322,7 +148122,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+37110) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37206) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -147502,22 +148302,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36821, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36917, 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 + 37125, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37221, 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 + 37131, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37227, 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 + 37138, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37234, 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 @@ -148660,14 +149460,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+37146) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37242) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37150) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37246) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37154) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37250) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37163, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37259, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -148693,19 +149493,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37197, - ts + 37237, - ts + 37272, + ts + 37293, + ts + 37333, + ts + 37368, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23171, *(*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+23266, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37315, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37411, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -148838,11 +149638,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+37348, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37444, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37379, + ts+37475, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -148866,7 +149666,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37430, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37526, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149150,7 +149950,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1518 + zCopy = ts + 1538 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -149261,7 +150061,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37456, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37552, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149283,7 +150083,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37466 + return ts + 37562 } func init() { @@ -149824,7 +150624,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -150134,16 +150934,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -150200,12 +151000,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -150220,6 +151020,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -150241,5 +151042,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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=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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go index 72b56ba30b..a95328625b 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_openbsd_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_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -290,7 +290,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -760,7 +759,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -773,49 +772,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -824,21 +823,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -850,8 +849,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -863,22 +862,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -886,13 +885,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -907,13 +906,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 OS_VXWORKS = 0 O_ACCMODE = 0x0003 @@ -1389,7 +1388,7 @@ const ( SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -1485,6 +1484,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -1620,6 +1620,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -1650,6 +1651,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -1750,6 +1752,8 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 + SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 @@ -1823,7 +1827,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -1931,8 +1935,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2354,6 +2358,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WINDOW_AGGINVERSE = 2 @@ -3106,7 +3111,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -3437,6 +3451,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -3447,6 +3462,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -5168,6 +5201,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -5207,6 +5251,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -5257,7 +5302,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -5272,6 +5317,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5640,8 +5686,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -5658,7 +5703,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -5920,8 +5964,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -6266,17 +6310,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -6306,7 +6339,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 49, @@ -6315,49 +6355,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 115, ts + 145, ts + 165, - ts + 188, - ts + 213, - ts + 240, - ts + 265, - ts + 287, - ts + 319, - ts + 345, - ts + 370, - ts + 393, - ts + 405, - ts + 420, - ts + 442, - ts + 467, - ts + 490, - ts + 512, - ts + 523, - ts + 536, - ts + 551, - ts + 567, - ts + 580, - ts + 601, - ts + 625, - ts + 648, - ts + 664, - ts + 680, - ts + 704, - ts + 731, + ts + 185, + ts + 208, + ts + 233, + ts + 260, + ts + 285, + ts + 307, + ts + 339, + ts + 365, + ts + 390, + ts + 413, + ts + 425, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, ts + 751, - ts + 772, - ts + 794, - ts + 824, - ts + 840, - ts + 866, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 860, ts + 886, - ts + 912, - ts + 935, - ts + 961, - ts + 983, - ts + 1004, - ts + 1015, - ts + 1023, - ts + 1037, - ts + 1050, + ts + 906, + ts + 932, + ts + 955, + ts + 981, + ts + 1003, + ts + 1024, + ts + 1035, + ts + 1043, + ts + 1057, + ts + 1070, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -6459,7 +6500,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -6506,10 +6546,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1083)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -6521,10 +6561,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -6534,21 +6570,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1070, - ts + 1074, - ts + 1079, - ts + 1083, - ts + 1091, - ts + 1096, + ts + 1090, + ts + 1094, + ts + 1099, + ts + 1103, + ts + 1111, + ts + 1116, } // SQL is translated into a sequence of instructions to be @@ -6847,7 +6875,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -6983,6 +7011,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -7006,6 +7036,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7020,9 +7051,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -7234,7 +7268,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1101, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1121, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -7260,13 +7294,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1109, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1129, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1117, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1137, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -7342,7 +7376,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -7364,7 +7398,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1121, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1141, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -7421,7 +7455,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1133) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1153) == 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))) @@ -7554,7 +7588,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 104)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+104, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1137, -1) + Xsqlite3_result_error(tls, pCtx, ts+1157, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -7578,12 +7612,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1160)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1167)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1174)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1181)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1188)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1195)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1180)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1187)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1194)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1201)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1208)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1215)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -7595,7 +7629,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1202) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1222) == 0 { if idx > 1 { return 1 } @@ -7617,7 +7651,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1207) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1227) == 0 { if idx > 1 { return 1 } @@ -7631,7 +7665,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1217) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1237) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -7639,7 +7673,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1227) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1247) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -7651,7 +7685,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1237) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1257) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -7685,9 +7719,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1241, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1261, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -7706,7 +7740,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1250, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1270, 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) { @@ -7720,14 +7754,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1260) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1280) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1266) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1286) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1271) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1291) == 0 { rc = 0 } break @@ -8053,7 +8087,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -8063,13 +8097,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1280, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1300, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -8087,41 +8121,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1287, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1307, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1292, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1312, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1298, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1318, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1275, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1295, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -8134,7 +8168,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1303, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1323, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -8184,15 +8218,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1207}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1227}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1308}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1313}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1318}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1247}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1328}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1333}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1338}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347}, + {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 + 1369}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1387}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -8340,7 +8374,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -8604,7 +8638,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1380, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1400, libc.VaList(bp, nByte)) } return p } @@ -8637,7 +8671,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { p += 8 } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1418, + ts+1438, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p @@ -9048,7 +9082,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -9084,7 +9118,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -9104,7 +9138,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -9153,24 +9187,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -9486,7 +9547,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1454, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1474, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -9559,8 +9620,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1468)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1501)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1488)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1521)) 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)}, @@ -9772,7 +9833,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1508, 1) + Xsqlite3_str_append(tls, pAccum, ts+1528, 1) goto __5 __11: ; @@ -10333,7 +10394,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1510 + bufpt = ts + 1530 length = 3 goto __58 __127: @@ -10393,7 +10454,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1514, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1534, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -10734,7 +10795,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1518 + bufpt = ts + 1538 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -10858,9 +10919,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1519 + return ts + 1539 } - return ts + 1524 + return ts + 1544 }() __220: ; @@ -11008,7 +11069,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1531, 1) + Xsqlite3_str_append(tls, pAccum, ts+1551, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -11025,10 +11086,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1533, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1553, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1543, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1563, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -11083,7 +11144,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1557)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1577)) // 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 @@ -11248,7 +11309,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1518, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1538, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -11480,20 +11541,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -11506,46 +11673,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) - } - for i = 0; i < 256; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -12841,7 +13008,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1566 + var pow63 uintptr = ts + 1586 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -13387,7 +13554,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1585, + ts+1605, libc.VaList(bp, zType)) } @@ -13406,13 +13573,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1519) + logBadConnection(tls, ts+1539) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1630) + logBadConnection(tls, ts+1650) } return 0 } else { @@ -13425,7 +13592,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1639) + logBadConnection(tls, ts+1659) return 0 } else { return 1 @@ -13950,193 +14117,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1647, - ts + 1657, - ts + 1668, - ts + 1680, - ts + 1691, - ts + 1703, - ts + 1710, - ts + 1718, - ts + 1726, - ts + 1731, - ts + 1737, + ts + 1667, + ts + 1677, + ts + 1688, + ts + 1700, + ts + 1711, + ts + 1723, + ts + 1730, + ts + 1738, + ts + 1746, ts + 1751, - ts + 1757, - ts + 1767, - ts + 1772, - ts + 1777, - ts + 1780, - ts + 1786, - ts + 1799, - ts + 1809, - ts + 1813, - ts + 1820, - ts + 1827, - ts + 1834, - ts + 1841, - ts + 1851, + ts + 1756, + ts + 1762, + ts + 1776, + ts + 1782, + ts + 1792, + ts + 1797, + ts + 1802, + ts + 1805, + ts + 1811, + ts + 1818, + ts + 1822, + ts + 1832, + ts + 1839, + ts + 1846, + ts + 1853, ts + 1860, - ts + 1871, - ts + 1880, - ts + 1886, - ts + 1896, - ts + 1906, - ts + 1911, - ts + 1921, - ts + 1932, - ts + 1937, - ts + 1944, - ts + 1955, - ts + 1960, - ts + 1965, - ts + 1971, - ts + 1977, - ts + 1983, - ts + 1989, - ts + 1992, + ts + 1870, + ts + 1879, + ts + 1890, + ts + 1899, + ts + 1905, + ts + 1915, + ts + 1925, + ts + 1930, + ts + 1940, + ts + 1951, + ts + 1956, + ts + 1963, + ts + 1974, + ts + 1979, + ts + 1984, + ts + 1990, ts + 1996, - ts + 2007, - ts + 2018, + ts + 2002, + ts + 2005, + ts + 2009, + ts + 2015, ts + 2026, - ts + 2035, - ts + 2041, - ts + 2048, - ts + 2056, - ts + 2059, - ts + 2062, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, + ts + 2037, + ts + 2045, + ts + 2054, + ts + 2061, + ts + 2069, + ts + 2072, + ts + 2075, + ts + 2078, ts + 2081, - ts + 2091, - ts + 2104, - ts + 2115, - ts + 2121, - ts + 2128, - ts + 2133, - ts + 2142, - ts + 2151, - ts + 2158, - ts + 2171, - ts + 2182, - ts + 2187, - ts + 2195, + ts + 2084, + ts + 2087, + ts + 2094, + ts + 2100, + ts + 2110, + ts + 2123, + ts + 2134, + ts + 2140, + ts + 2147, + ts + 2156, + ts + 2165, + ts + 2172, + ts + 2185, + ts + 2196, ts + 2201, - ts + 2208, - ts + 2220, - ts + 2225, + ts + 2209, + ts + 2215, + ts + 2222, ts + 2234, ts + 2239, ts + 2248, ts + 2253, - ts + 2258, - ts + 2264, + ts + 2262, + ts + 2267, ts + 2272, - ts + 2280, - ts + 2290, - ts + 2298, - ts + 2305, - ts + 2318, - ts + 2323, - ts + 2335, - ts + 2343, - ts + 2350, - ts + 2361, - ts + 2368, + ts + 2278, + ts + 2286, + ts + 2294, + ts + 2304, + ts + 2312, + ts + 2319, + ts + 2332, + ts + 2337, + ts + 2349, + ts + 2357, + ts + 2364, ts + 2375, - ts + 2385, - ts + 2394, - ts + 2405, - ts + 2411, - ts + 2422, - ts + 2432, - ts + 2442, - ts + 2449, - ts + 2455, - ts + 2465, - ts + 2476, - ts + 2480, - ts + 2489, - ts + 2498, - ts + 2505, - ts + 2515, - ts + 2522, - ts + 2531, - ts + 2541, - ts + 2548, - ts + 2556, + ts + 2382, + ts + 2389, + ts + 2399, + ts + 2408, + ts + 2419, + ts + 2425, + ts + 2436, + ts + 2446, + ts + 2456, + ts + 2463, + ts + 2469, + ts + 2479, + ts + 2490, + ts + 2494, + ts + 2503, + ts + 2512, + ts + 2519, + ts + 2529, + ts + 2536, + ts + 2545, + ts + 2555, + ts + 2562, ts + 2570, - ts + 2578, + ts + 2584, ts + 2592, - ts + 2603, - ts + 2616, - ts + 2627, - ts + 2633, - ts + 2645, - ts + 2654, - ts + 2662, - ts + 2671, - ts + 2680, - ts + 2687, - ts + 2695, - ts + 2702, - ts + 2713, + ts + 2606, + ts + 2617, + ts + 2630, + ts + 2641, + ts + 2647, + ts + 2659, + ts + 2668, + ts + 2676, + ts + 2685, + ts + 2694, + ts + 2701, + ts + 2709, + ts + 2716, ts + 2727, - ts + 2738, - ts + 2746, + ts + 2741, ts + 2752, ts + 2760, - ts + 2768, - ts + 2778, - ts + 2791, - ts + 2801, - ts + 2814, - ts + 2823, - ts + 2834, - ts + 2842, + ts + 2766, + ts + 2774, + ts + 2782, + ts + 2792, + ts + 2805, + ts + 2815, + ts + 2828, + ts + 2837, ts + 2848, - ts + 2860, - ts + 2872, - ts + 2880, - ts + 2892, - ts + 2905, - ts + 2915, - ts + 2925, - ts + 2930, - ts + 2942, - ts + 2954, - ts + 2964, - ts + 2970, - ts + 2980, - ts + 2987, - ts + 2999, - ts + 3010, - ts + 3018, - ts + 3027, - ts + 3036, - ts + 3045, - ts + 3052, - ts + 3063, - ts + 3076, - ts + 3086, - ts + 3093, - ts + 3101, - ts + 3110, - ts + 3116, + ts + 2856, + ts + 2862, + ts + 2874, + ts + 2886, + ts + 2894, + ts + 2906, + ts + 2919, + ts + 2929, + ts + 2939, + ts + 2944, + ts + 2956, + ts + 2968, + ts + 2978, + ts + 2984, + ts + 2994, + ts + 3001, + ts + 3013, + ts + 3024, + ts + 3032, + ts + 3041, + ts + 3050, + ts + 3059, + ts + 3066, + ts + 3077, + ts + 3090, + ts + 3100, + ts + 3107, + ts + 3115, ts + 3124, - ts + 3132, - ts + 3140, - ts + 3150, - ts + 3159, - ts + 3170, - ts + 3180, - ts + 3186, - ts + 3197, - ts + 3208, - ts + 3213, - ts + 3221, + ts + 3130, + ts + 3138, + ts + 3146, + ts + 3154, + ts + 3164, + ts + 3173, + ts + 3184, + ts + 3194, + ts + 3200, + ts + 3211, + ts + 3222, + ts + 3227, + ts + 3235, } type timeval = struct { @@ -14344,35 +14511,35 @@ type unix_syscall = struct { } var aSyscall = [29]unix_syscall{ - {FzName: ts + 3231, FpCurrent: 0}, - {FzName: ts + 3236, FpCurrent: 0}, - {FzName: ts + 3242, FpCurrent: 0}, - {FzName: ts + 3249, FpCurrent: 0}, + {FzName: ts + 3245, FpCurrent: 0}, + {FzName: ts + 3250, FpCurrent: 0}, {FzName: ts + 3256, FpCurrent: 0}, - {FzName: ts + 3261, FpCurrent: 0}, - {FzName: ts + 3267, FpCurrent: 0}, - {FzName: ts + 3277, FpCurrent: 0}, - {FzName: ts + 3283, FpCurrent: 0}, - {FzName: ts + 3288}, - {FzName: ts + 3294}, - {FzName: ts + 3302, FpCurrent: 0}, + {FzName: ts + 3263, FpCurrent: 0}, + {FzName: ts + 3270, FpCurrent: 0}, + {FzName: ts + 3275, FpCurrent: 0}, + {FzName: ts + 3281, FpCurrent: 0}, + {FzName: ts + 3291, FpCurrent: 0}, + {FzName: ts + 3297, FpCurrent: 0}, + {FzName: ts + 3302}, {FzName: ts + 3308}, - {FzName: ts + 3315}, - {FzName: ts + 3324, FpCurrent: 0}, - {FzName: ts + 3331}, - {FzName: ts + 3341, FpCurrent: 0}, - {FzName: ts + 3348, FpCurrent: 0}, + {FzName: ts + 3316, FpCurrent: 0}, + {FzName: ts + 3322}, + {FzName: ts + 3329}, + {FzName: ts + 3338, FpCurrent: 0}, + {FzName: ts + 3345}, + {FzName: ts + 3355, FpCurrent: 0}, {FzName: ts + 3362, FpCurrent: 0}, - {FzName: ts + 3368, FpCurrent: 0}, - {FzName: ts + 3374, FpCurrent: 0}, - {FzName: ts + 3381, FpCurrent: 0}, - {FzName: ts + 3389, FpCurrent: 0}, - {FzName: ts + 3394, FpCurrent: 0}, - {FzName: ts + 3401}, + {FzName: ts + 3376, FpCurrent: 0}, + {FzName: ts + 3382, FpCurrent: 0}, + {FzName: ts + 3388, FpCurrent: 0}, + {FzName: ts + 3395, FpCurrent: 0}, + {FzName: ts + 3403, FpCurrent: 0}, {FzName: ts + 3408, FpCurrent: 0}, - {FzName: ts + 3420, FpCurrent: 0}, - {FzName: ts + 3429, FpCurrent: 0}, - {FzName: ts + 3435}, + {FzName: ts + 3415}, + {FzName: ts + 3422, FpCurrent: 0}, + {FzName: ts + 3434, FpCurrent: 0}, + {FzName: ts + 3443, FpCurrent: 0}, + {FzName: ts + 3449}, } func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { @@ -14465,11 +14632,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { break } + if f&(O_EXCL|O_CREAT) == O_EXCL|O_CREAT { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, z) + } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3441, libc.VaList(bp, z, fd)) + ts+3455, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3484, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3498, O_RDONLY, int32(m)) < 0 { break } } @@ -14549,13 +14719,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp var zErr uintptr var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno(tls))) - zErr = ts + 1518 + zErr = ts + 1538 if zPath == uintptr(0) { - zPath = ts + 1518 + zPath = ts + 1538 } Xsqlite3_log(tls, errcode, - ts+3494, + ts+3508, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -14563,7 +14733,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { 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+3236, + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3250, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -14584,7 +14754,7 @@ func closePendingFds(tls *libc.TLS, pFile 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, 36787) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 37980) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -14686,19 +14856,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { 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+3525, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3539, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == Nlink_t(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3549, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3563, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > Nlink_t(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3578, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3592, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3605, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3619, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -15060,7 +15230,7 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 37571) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15320,7 +15490,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { var ii int32 var fd int32 = -1 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3633, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3647, libc.VaList(bp, zFilename)) for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { @@ -15338,7 +15508,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39192), ts+3348, bp+8, 39192) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3362, bp+8, 40385) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15355,14 +15525,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3636, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39233) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3650, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) } if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { 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)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 39247) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) } else { rc = SQLITE_OK } @@ -15382,7 +15552,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { 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+3267, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 39278) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3281, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) } else { return SQLITE_OK } @@ -15433,7 +15603,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1518, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1538, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -15501,7 +15671,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -15637,7 +15807,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39958) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41151) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -15665,7 +15835,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3267, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40015) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3281, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -15728,7 +15898,7 @@ __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+3647, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3661, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -15749,7 +15919,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3654, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3668, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|O_NOFOLLOW, @@ -15764,7 +15934,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40140), ts+3231, zShm, 40140) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3245, zShm, 41333) goto shm_open_err __10: ; @@ -15890,11 +16060,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 128)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1518, 1, bp+128) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1538, 1, bp+128) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3302, zFile, 40284) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3316, zFile, 41477) goto shmpage_out __14: ; @@ -15940,7 +16110,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3389, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 40311) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3403, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) goto shmpage_out __20: ; @@ -16193,10 +16363,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3667, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3681, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3672) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3686) == 0 { *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) } @@ -16212,7 +16382,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 41188) + robust_close(tls, pNew, h, 42381) h = -1 } unixLeaveMutex(tls) @@ -16225,7 +16395,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3682, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3696, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -16233,7 +16403,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, 41273) + robust_close(tls, pNew, h, 42466) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16246,15 +16416,15 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3690, - ts + 3699, - ts + 3708, - ts + 1531, + ts + 3704, + ts + 3713, + ts + 3722, + ts + 1551, } func unixTempFileInit(tls *libc.TLS) { - azTempDirs[0] = libc.Xgetenv(tls, ts+3713) - azTempDirs[1] = libc.Xgetenv(tls, ts+3727) + azTempDirs[0] = libc.Xgetenv(tls, ts+3727) + azTempDirs[1] = libc.Xgetenv(tls, ts+3741) } func unixTempFileDir(tls *libc.TLS) uintptr { @@ -16299,7 +16469,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3734, + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3748, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { rc = SQLITE_ERROR @@ -16384,7 +16554,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3751) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3765) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -16432,10 +16602,10 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i eType == SQLITE_OPEN_WAL)) zName = zPath - if !(randomnessPid != libc.Xgetpid(tls)) { + if !(libc.AtomicLoadInt32(&randomnessPid) != libc.Xgetpid(tls)) { goto __1 } - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) Xsqlite3_randomness(tls, 0, uintptr(0)) __1: ; @@ -16549,7 +16719,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41714), ts+3231, zName, 41714) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3245, zName, 42907) if !(rc == SQLITE_OK) { goto __20 } @@ -16640,7 +16810,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+3341, zPath, 41853) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3355, zPath, 43046) } return rc } @@ -16648,9 +16818,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+3758, zPath, 41863) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3772, zPath, 43056) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 41865) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) } else { rc = SQLITE_OK } @@ -16717,18 +16887,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut 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 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41961), ts+3429, zIn, 41961) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3443, zIn, 43154) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&Mode_t(0170000) == Mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 41967) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+128, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41972), ts+3420, zIn, 41972) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3434, zIn, 43165) return } *(*int8)(unsafe.Pointer(bp + 128 + uintptr(got))) = int8(0) @@ -16768,14 +16938,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42030), ts+3249, zPath, 42030) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3263, zPath, 43223) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 42036) + return Xsqlite3CantopenError(tls, 43229) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -16807,7 +16977,7 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3633, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3647, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } @@ -16835,11 +17005,11 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in _ = NotUsed libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) - randomnessPid = libc.Xgetpid(tls) + libc.AtomicStoreInt32(&randomnessPid, libc.Xgetpid(tls)) { var fd int32 var got int32 - fd = robust_open(tls, ts+3764, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3778, O_RDONLY, uint32(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) @@ -16850,7 +17020,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, 42137) + robust_close(tls, uintptr(0), fd, 43330) } } @@ -16927,10 +17097,10 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3777, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3782, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3792, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, - {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3672, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3791, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3796, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3806, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, + {FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(UnixFile{})), FmxPathname: MAX_PATHNAME, FzName: ts + 3686, FpAppData: 0, FxOpen: 0, FxDelete: 0, FxAccess: 0, FxFullPathname: 0, FxDlOpen: 0, FxDlError: 0, FxDlSym: 0, FxDlClose: 0, FxRandomness: 0, FxSleep: 0, FxCurrentTime: 0, FxGetLastError: 0, FxCurrentTimeInt64: 0, FxSetSystemCall: 0, FxGetSystemCall: 0, FxNextSystemCall: 0}, } // Shutdown the operating system interface. @@ -16985,7 +17155,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 3805, + FzName: ts + 3819, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -17152,40 +17322,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -17196,7 +17411,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3811, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3825, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -17252,7 +17467,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -17328,7 +17543,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3633, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3647, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -17449,7 +17664,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3826, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3840, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -17522,7 +17737,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3849, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3863, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -17585,6 +17800,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -18268,6 +18488,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -18300,6 +18521,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -20726,7 +20948,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3864, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3878, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -21825,7 +22047,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -21886,7 +22108,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3891, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3905, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -21899,7 +22121,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3900, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3914, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -21951,9 +22173,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3905, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3919, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3912, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3926, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -22217,7 +22439,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22341,7 +22563,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22380,7 +22602,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -22536,6 +22758,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -23409,7 +23632,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -23594,7 +23817,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3922, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3936, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -24166,7 +24389,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24265,7 +24488,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -24433,7 +24656,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3940, + ts+3954, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -24851,7 +25074,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -24996,7 +25219,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3977, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+3991, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -25126,7 +25349,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -25599,7 +25822,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -26104,7 +26327,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -26495,7 +26718,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4003)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4017)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -26760,7 +26983,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -26897,7 +27120,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -26914,7 +27137,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -26922,7 +27145,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -26965,7 +27188,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -26975,7 +27198,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -27225,7 +27448,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27257,8 +27480,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -27273,7 +27495,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -27283,7 +27505,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27296,7 +27518,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -27305,14 +27527,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -27322,7 +27544,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -27369,63 +27591,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -27457,10 +27673,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -27471,15 +27686,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -27504,7 +27719,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -27515,7 +27730,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -27563,26 +27778,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -27592,7 +27807,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -27600,7 +27815,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -27608,10 +27823,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -27680,7 +27895,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -27710,11 +27925,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -27725,15 +27940,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -27761,14 +27976,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { 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, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -27782,7 +27997,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -27794,7 +28009,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -27897,7 +28112,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -27925,7 +28140,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -27964,7 +28179,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -27988,7 +28203,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -28037,7 +28252,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4019) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4033) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -28798,7 +29013,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4028, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4042, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -28836,7 +29051,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -29251,7 +29466,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29277,7 +29492,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -29285,6 +29500,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -29294,7 +29512,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29310,7 +29528,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29371,7 +29589,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -29406,7 +29624,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -29466,7 +29684,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -29505,7 +29723,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -29536,7 +29754,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -29877,7 +30095,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30121,14 +30339,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30173,7 +30391,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30222,7 +30440,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -30301,10 +30519,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30312,7 +30528,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -30374,7 +30591,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -30394,7 +30611,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -30414,7 +30631,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -30626,7 +30843,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -30830,7 +31047,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -30895,7 +31112,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -30943,7 +31160,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -31062,7 +31279,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31222,7 +31439,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -31287,7 +31504,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -31323,7 +31540,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -31367,7 +31584,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -31479,7 +31696,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -31637,7 +31854,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -31694,7 +31911,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -31710,7 +31927,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -31784,7 +32001,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -31796,7 +32013,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -31807,7 +32024,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -31972,7 +32189,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32244,12 +32461,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -32257,7 +32474,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -32317,7 +32534,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -32406,7 +32623,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -32522,7 +32739,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -32840,7 +33057,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -32851,7 +33068,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -33009,7 +33226,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -33083,7 +33300,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -33145,7 +33362,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -33173,7 +33390,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -33434,7 +33651,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -33626,7 +33843,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -33663,6 +33880,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -33753,7 +33972,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -33776,7 +33995,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -33856,7 +34075,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -33969,7 +34188,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -34030,7 +34249,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -34068,13 +34287,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -34181,7 +34400,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -34204,7 +34423,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34305,7 +34524,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -34313,11 +34532,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34392,7 +34611,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -34461,7 +34680,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -34490,7 +34709,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -34566,7 +34785,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -34580,7 +34799,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -34714,7 +34933,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -34902,7 +35121,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4032, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4046, 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)) @@ -34927,11 +35146,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4034, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4048, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4057, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4071, libc.VaList(bp+8, iPage)) return 1 } if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { @@ -34952,13 +35171,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4082, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4096, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4111, + ts+4125, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -34977,7 +35196,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4165, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4179, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -34988,7 +35207,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4187, libc.VaList(bp+8, iPage)) + ts+4201, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -35011,12 +35230,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4226, + ts+4240, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4252 + return ts + 4266 } - return ts + 4257 + return ts + 4271 }(), expected-N, expected)) } @@ -35123,13 +35342,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4278 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4292 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4288, libc.VaList(bp, rc)) + ts+4302, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -35140,7 +35359,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4326, libc.VaList(bp+8, rc)) + ts+4340, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -35148,14 +35367,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4364, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4378, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4386 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4400 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -35172,7 +35391,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4412 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4426 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -35197,7 +35416,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4440, + checkAppendMsg(tls, pCheck, ts+4454, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -35210,7 +35429,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4470, 0) + checkAppendMsg(tls, pCheck, ts+4484, 0) doCoverageCheck = 0 goto __10 __13: @@ -35226,7 +35445,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4494, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4508, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -35264,7 +35483,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4518, 0) + checkAppendMsg(tls, pCheck, ts+4532, 0) depth = d2 __21: ; @@ -35337,7 +35556,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4543, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4557, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -35354,7 +35573,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4580, + ts+4594, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -35474,7 +35693,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4632 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4646 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)).FzPfx = uintptr(0) @@ -35510,7 +35729,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4648, + ts+4662, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -35520,7 +35739,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4693, 0) + ts+4707, 0) __16: ; __10: @@ -35567,13 +35786,13 @@ __23: 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+4748, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4762, 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+4770, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4784, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -35808,6 +36027,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -35821,8 +36049,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -35830,7 +36058,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3633, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3647, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -35841,7 +36069,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4804, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4818, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -35856,7 +36084,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4824, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4838, 0) return SQLITE_ERROR } return SQLITE_OK @@ -35876,7 +36104,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4855, 0) + pDestDb, SQLITE_ERROR, ts+4869, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -36324,7 +36552,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+8, ts+4895, + Xsqlite3_str_appendf(tls, bp+8, ts+4909, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -36741,6 +36969,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -36756,7 +36997,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -36816,6 +37057,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -36898,7 +37142,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1518 + return ts + 1538 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -37130,7 +37374,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37362,7 +37606,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3633, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3647, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -37424,7 +37668,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1518 + zNeg = ts + 1538 rc = SQLITE_OK __1: @@ -37465,7 +37709,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4902 + zNeg = ts + 4916 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -37484,7 +37728,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4904, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4918, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -37788,7 +38032,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -37803,14 +38047,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -37869,6 +38113,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -37893,10 +38140,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -37934,21 +38181,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -38297,85 +38552,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -38475,6 +38762,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -38502,7 +38799,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -38510,12 +38807,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -38534,7 +38831,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -38585,7 +38884,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -38714,8 +39013,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -38726,10 +39025,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -38740,6 +39035,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -38755,34 +39055,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4909, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4923, 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 + 1518 + zColl = ts + 1538 } - if libc.Xstrcmp(tls, zColl, ts+1063) == 0 { - zColl = ts + 4914 + if libc.Xstrcmp(tls, zColl, ts+1083) == 0 { + zColl = ts + 4928 } - Xsqlite3_str_appendf(tls, bp+144, ts+4916, + Xsqlite3_str_appendf(tls, bp+144, ts+4930, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4902 + return ts + 4916 } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4924 + return ts + 4938 } - return ts + 1518 + return ts + 1538 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4927, 1) + Xsqlite3_str_append(tls, bp+144, ts+4941, 1) break } @@ -38790,7 +39090,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4929, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4943, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -38798,32 +39098,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4938, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4952, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1298, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1292, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1312, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -38833,13 +39133,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1298, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, 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+1292, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1312, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1519 + zP4 = ts + 1539 } else { - zP4 = ts + 4948 + zP4 = ts + 4962 } break @@ -38847,7 +39147,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4955, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4969, libc.VaList(bp+120, pVtab)) break } @@ -38858,20 +39158,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4963, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4977, 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+4968, 1) + Xsqlite3_str_append(tls, bp+144, ts+4982, 1) break } case -4: { - zP4 = ts + 4970 + zP4 = ts + 4984 break } @@ -38896,7 +39196,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4978, ts + 4980, ts + 4982, ts + 4987} +var encnames = [4]uintptr{ts + 4992, ts + 4994, ts + 4996, ts + 5001} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -38998,7 +39298,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -39347,8 +39647,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 4992, ts + 4997, ts + 5004, ts + 5007, ts + 5010, ts + 5013, ts + 5016, ts + 5019, - ts + 5027, ts + 5030, ts + 5037, ts + 5045, + ts + 5006, ts + 5011, ts + 5018, ts + 5021, ts + 5024, ts + 5027, ts + 5030, ts + 5033, + ts + 5041, ts + 5044, ts + 5051, ts + 5059, } // Close a VDBE cursor and release all the resources that cursor @@ -39557,7 +39857,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5052, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5066, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -39565,16 +39865,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5064, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5078, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5078, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5092, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5093, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5107, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -39720,7 +40020,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+5106, 0) + Xsqlite3VdbeError(tls, p, ts+5120, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -40000,7 +40300,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -40010,14 +40310,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -40028,16 +40330,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -40054,7 +40352,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -40605,16 +40903,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -40632,7 +40934,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -40662,7 +40968,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -40696,7 +41002,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -40719,7 +41025,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -40741,7 +41047,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -40885,7 +41198,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -41056,7 +41369,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41082,7 +41395,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41125,7 +41438,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -41193,13 +41506,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5136 + zContext = ts + 5150 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5155 + zContext = ts + 5169 } else { - zContext = ts + 5174 + zContext = ts + 5188 } - zMsg = Xsqlite3_mprintf(tls, ts+5183, + zMsg = Xsqlite3_mprintf(tls, ts+5197, 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) @@ -41230,7 +41543,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -41285,7 +41598,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -41304,7 +41617,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5219, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5233, 0) return 1 } else { return 0 @@ -41314,7 +41627,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5264, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5278, 0) return 1 } else { return vdbeSafety(tls, p) @@ -41356,14 +41669,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -41575,6 +41889,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -41771,7 +42089,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5304, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5318, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -41962,7 +42280,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42037,7 +42355,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5327) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5341) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -42466,35 +42784,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+5337, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5351, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -42509,7 +42826,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -42541,7 +42858,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42556,7 +42873,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42567,7 +42884,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -42577,7 +42894,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42653,7 +42970,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -42797,7 +43114,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -42815,8 +43132,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -42880,7 +43200,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -43024,7 +43344,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -43196,7 +43516,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5377, 3) + Xsqlite3_str_append(tls, bp+48, ts+5391, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -43232,11 +43552,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1519, 4) + Xsqlite3_str_append(tls, bp+48, ts+1539, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1298, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1318, 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+4895, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4909, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -43251,21 +43571,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5381, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5395, 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+5388, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5402, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5401, 2) + Xsqlite3_str_append(tls, bp+48, ts+5415, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5409, 1) + Xsqlite3_str_append(tls, bp+48, ts+5423, 1) } } } @@ -43321,7 +43641,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -43425,12 +43746,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -43482,11 +43802,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1079, - ts + 1091, - ts + 1096, - ts + 1074, - ts + 1519, + ts + 1099, + ts + 1111, + ts + 1116, + ts + 1094, + ts + 1539, } // Execute as much of a VDBE program as we can. @@ -43524,7 +43844,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -43553,11 +43872,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -43627,42 +43949,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -43670,52 +43993,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -43757,19 +44080,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -43778,7 +44101,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -43786,11 +44109,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -44026,7 +44349,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -44522,20 +44845,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5411, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5425, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5432, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5446, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5439, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5453, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -44925,14 +45248,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -45010,72 +45333,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -45092,10 +45423,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -45107,33 +45438,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45142,43 +45473,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -45194,26 +45525,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -45221,12 +45552,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -45241,17 +45572,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -45266,163 +45597,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -45431,20 +45762,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -45454,15 +45785,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -45470,9 +45801,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -45484,52 +45815,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -45538,24 +45869,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -45569,13 +45900,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -45584,38 +45915,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -45624,10 +45955,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -45635,10 +45966,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -45646,35 +45977,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -45682,372 +46051,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -46055,15 +46425,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -46072,124 +46442,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5463, + Xsqlite3VdbeError(tls, p, ts+5477, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -46199,40 +46569,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -46250,339 +46620,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -46591,20 +46961,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -46615,244 +46985,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5504, 0) + Xsqlite3VdbeError(tls, p, ts+5518, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5555, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5569, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5577, 0) + ts+5591, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -46861,172 +47231,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5631, 0) + ts+5645, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5686 + return ts + 5700 } return func() uintptr { if iRollback != 0 { - return ts + 5734 + return ts + 5748 } - return ts + 5777 + return ts + 5791 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5818) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5832) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -47046,36 +47416,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -47083,22 +47453,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47109,24 +47479,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -47134,30 +47504,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47173,10 +47543,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -47185,10 +47555,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47208,83 +47578,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1538 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -47293,31 +47663,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -47325,10 +47695,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47349,105 +47719,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -47459,231 +47829,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -47693,85 +48065,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -47779,59 +48151,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -47846,121 +48218,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -47968,93 +48340,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -48067,7 +48439,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -48082,81 +48454,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -48166,38 +48538,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -48205,205 +48577,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -48413,90 +48785,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -48505,36 +48877,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -48545,88 +48917,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5846) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5860) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -48638,35 +49010,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -48675,63 +49047,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -48740,13 +49112,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -48754,20 +49126,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -48777,45 +49149,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -48828,10 +49200,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -48842,10 +49214,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -48853,30 +49225,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 5863 + goto __797 +__796: + zSchema = ts + 5877 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5877, + ts+5891, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -48886,36 +49258,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -48923,10 +49295,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -48958,22 +49330,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -48983,15 +49355,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -49001,17 +49373,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -49021,34 +49393,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -49057,48 +49429,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5920, 0) + Xsqlite3VdbeError(tls, p, ts+5934, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -49106,10 +49478,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49131,24 +49503,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49180,78 +49552,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -49259,11 +49631,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -49279,14 +49651,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -49294,16 +49666,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -49311,16 +49683,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -49331,10 +49703,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -49357,73 +49729,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -49433,22 +49805,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -49461,32 +49833,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -49498,70 +49870,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5957, + ts+5971, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6009 + return ts + 6023 } - return ts + 6014 + return ts + 6028 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -49569,17 +49941,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -49589,10 +49961,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -49606,10 +49978,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -49619,69 +49991,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6021, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6035, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -49689,16 +50061,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -49711,17 +50083,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -49731,24 +50103,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -49756,52 +50128,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+5327, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5341, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -49810,54 +50182,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -49865,69 +50237,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -49939,27 +50311,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -49967,42 +50339,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -50011,41 +50383,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -50059,16 +50431,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -50080,25 +50452,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50107,24 +50479,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -50149,16 +50521,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -50173,66 +50545,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6050, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6064, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -50253,73 +50625,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3633, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6056, + Xsqlite3_log(tls, rc, ts+6070, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -50327,13 +50699,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5304, 0) + Xsqlite3VdbeError(tls, p, ts+5318, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1454, 0) + Xsqlite3VdbeError(tls, p, ts+1474, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -50344,10 +50716,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6088, ts + 6097, ts + 6104, - ts + 6110} +var azType = [4]uintptr{ts + 6102, ts + 6111, ts + 6118, + ts + 6124} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -50396,16 +50772,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6122, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6136, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6151 + return ts + 6165 } return func() uintptr { if type1 == U32(7) { - return ts + 6156 + return ts + 6170 } - return ts + 6161 + return ts + 6175 }() }())) rc = SQLITE_ERROR @@ -50425,10 +50801,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+6169, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6183, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3633, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3647, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -50438,8 +50814,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -50459,7 +50835,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -50479,8 +50855,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -50488,21 +50864,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6189, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6203, 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+6219, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6233, 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+6255, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6269, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -50511,8 +50887,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -50545,8 +50921,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6276, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6290, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -50573,7 +50949,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6297 + zFault = ts + 6311 __22: ; goto __20 @@ -50606,7 +50982,7 @@ __26: 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 + 6309 + zFault = ts + 6323 __29: ; goto __27 @@ -50626,8 +51002,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6317, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6331, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -50696,7 +51072,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -50724,12 +51100,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3633 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3647 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -50773,7 +51149,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -50856,7 +51232,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -50869,7 +51245,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -53290,11 +53666,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -53454,7 +53826,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6351, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6365, zDb) == 0) { goto __8 } @@ -53575,7 +53947,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6356) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6370) != 0) { goto __33 } goto __14 @@ -53731,14 +54103,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6358, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6372, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6362, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6376, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -53755,7 +54127,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6366, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6380, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -53849,7 +54221,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -53858,7 +54230,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -53913,7 +54285,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6375, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6389, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -53921,14 +54293,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6406, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6420, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) return WRC_Abort __87: ; @@ -53980,7 +54352,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6461, libc.VaList(bp+16, zCol)) + ts+6475, 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 @@ -54017,7 +54389,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6496 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6510 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -54030,23 +54402,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6505 + zErr = ts + 6519 } else { - zErr = ts + 6520 + zErr = ts + 6534 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6542, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6556, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6555, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6569, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6579, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -54149,15 +54521,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6572 + var zIn uintptr = ts + 6586 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6600 + zIn = ts + 6614 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6618 + zIn = ts + 6632 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6636 + zIn = ts + 6650 } - Xsqlite3ErrorMsg(tls, pParse, ts+6654, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6668, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54236,10 +54608,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 6674 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6688 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6679 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6693 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54286,7 +54658,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6685, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6699, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54350,7 +54722,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+6702, libc.VaList(bp, pExpr)) + ts+6716, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54366,7 +54738,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6766, + Xsqlite3ErrorMsg(tls, pParse, ts+6780, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54380,7 +54752,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6802, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6816, uintptr(0), pExpr) } } else { @@ -54403,30 +54775,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+6830, libc.VaList(bp+16, pExpr)) + ts+6844, 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 + 6873 + zType = ts + 6887 } else { - zType = ts + 6880 + zType = ts + 6894 } - Xsqlite3ErrorMsg(tls, pParse, ts+6890, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6904, 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+6918, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6932, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6940, + Xsqlite3ErrorMsg(tls, pParse, ts+6954, 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+6984, + ts+6998, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54498,7 +54870,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7032, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7046, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -54514,7 +54886,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7043, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7057, pExpr, pExpr) } break @@ -54570,7 +54942,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -54645,7 +55017,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7054, libc.VaList(bp, i, zType, mx)) + ts+7068, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -54665,7 +55037,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7110, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7124, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -54700,7 +55072,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+7144, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7158, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -54757,7 +55129,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7150, libc.VaList(bp, i+1)) + ts+7164, libc.VaList(bp, i+1)) return 1 } } @@ -54785,7 +55157,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7211, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7225, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -54999,7 +55371,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7242, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7256, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55039,7 +55411,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7144) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7158) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55050,7 +55422,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7281) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7295) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55062,7 +55434,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7287, 0) + ts+7301, 0) return WRC_Abort } @@ -55162,12 +55534,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -55203,12 +55575,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -55327,9 +55699,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -55417,14 +55787,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -55752,7 +56121,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) return } @@ -55827,7 +56196,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7346, libc.VaList(bp, mxHeight)) + ts+7360, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -55995,12 +56364,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -56071,12 +56445,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7394, + Xsqlite3ErrorMsg(tls, pParse, ts+7408, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7438 + return ts + 7452 } - return ts + 1518 + return ts + 1538 }(), nElem)) break } @@ -56115,7 +56489,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7440) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7454) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56141,7 +56515,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+7442, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7456, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56169,7 +56543,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+7476, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7490, libc.VaList(bp, pExpr)) } } } @@ -56216,7 +56590,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+7496, + Xsqlite3ErrorMsg(tls, pParse, ts+7510, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56241,7 +56615,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7539, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7553, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -56262,11 +56636,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -56295,7 +56666,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -56391,7 +56766,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -56815,7 +57190,7 @@ __2: 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+7562, + Xsqlite3ErrorMsg(tls, pParse, ts+7576, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -56938,7 +57313,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+7592, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7606, libc.VaList(bp, zObject)) } } @@ -56948,10 +57323,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -56992,10 +57369,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6674) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6688) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6679) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6693) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -57426,13 +57803,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+7615) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7623) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7637) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7643) == 0 { return 1 } return 0 @@ -57636,7 +58013,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7633, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7647, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -57714,7 +58091,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7880, + Xsqlite3ErrorMsg(tls, pParse, ts+7894, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -59108,7 +59524,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -59122,10 +59538,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -59138,8 +59554,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -59147,12 +59563,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -59178,10 +59594,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -59192,14 +59606,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -59229,27 +59645,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -59258,9 +59674,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -59268,15 +59684,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7933, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7947, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -59307,8 +59723,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7960, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7974, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -59430,8 +59846,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -59452,9 +59868,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -59467,13 +59883,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7562, + Xsqlite3ErrorMsg(tls, pParse, ts+7576, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -59484,11 +59900,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -59510,12 +59926,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -59530,14 +59946,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6443, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -59545,9 +59985,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -59557,15 +59997,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -59575,22 +60015,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -59599,51 +60039,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+7984, 0) + ts+7998, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -59652,18 +60092,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8034)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8048)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -59875,7 +60315,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -60114,6 +60554,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60340,6 +60781,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -60485,7 +60927,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -61011,7 +61457,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -61029,8 +61477,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -61098,6 +61545,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -61121,7 +61570,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -61144,7 +61595,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -61157,7 +61608,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -61177,7 +61630,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -61317,7 +61772,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61325,7 +61780,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -61376,11 +61831,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 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+8050, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8064, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -61392,13 +61847,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8078, + ts+8092, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8253, + ts+8267, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -61408,10 +61863,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8427, libc.VaList(bp, zDb, zDb)) + ts+8441, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8574, 0) + ts+8588, 0) } } @@ -61475,7 +61930,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8725, libc.VaList(bp, zName)) + ts+8739, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -61485,7 +61940,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8784, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8798, zName)) { goto __6 } goto exit_rename_table @@ -61494,7 +61949,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8790, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8804, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -61535,19 +61990,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8817, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8831, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9001, + ts+9015, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9306, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9320, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9322, + ts+9336, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -61555,7 +62010,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9380, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9394, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -61567,7 +62022,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9645, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9659, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -61579,7 +62034,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9658, + ts+9672, libc.VaList(bp, zErr, zDb, zTab)) } @@ -61625,12 +62080,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9696, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9710, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9728, 0) + ts+9742, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -61640,11 +62095,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+9755) + ts+9769) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9814) + ts+9828) } if pDflt != 0 { @@ -61657,12 +62112,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9867) + ts+9881) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9913) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9927) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -61673,7 +62128,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9940, + ts+9954, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -61695,7 +62150,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+10086, + ts+10100, libc.VaList(bp+40, zTab, zDb)) } } @@ -61743,14 +62198,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10316, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10330, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10350, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10364, 0) goto exit_begin_add_column __4: ; @@ -61778,7 +62233,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10380, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10394, 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 } @@ -61818,18 +62273,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10399 + zType = ts + 10413 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10404 + zType = ts + 10418 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10418, + Xsqlite3ErrorMsg(tls, pParse, ts+10432, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10436 + return ts + 10450 } - return ts + 10453 + return ts + 10467 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -61913,11 +62368,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10471, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10485, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1518, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1538, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -61930,17 +62385,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10492, + ts+10506, 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+10674, + ts+10688, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9645, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9659, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62135,7 +62590,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -62198,12 +62653,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10805, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10819, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10828 + return ts + 10842 } - return ts + 1518 + return ts + 1538 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -62243,8 +62698,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10830, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10844, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62261,7 +62716,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62283,7 +62738,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10838, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10852, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62323,12 +62778,12 @@ 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+10844, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10858, 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 + 10828 + return ts + 10842 } - return ts + 1518 + return ts + 1538 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -62502,8 +62957,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -62586,15 +63041,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -62622,7 +63077,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -62655,13 +63110,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -62674,7 +63129,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -62689,7 +63144,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -62745,8 +63200,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -62794,7 +63249,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -62814,7 +63269,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1518, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1538, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -62862,8 +63317,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -62905,11 +63360,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -62979,7 +63434,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1518, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1538, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -63002,8 +63457,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63021,16 +63476,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63045,31 +63500,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63087,8 +63542,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63114,9 +63569,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63144,8 +63599,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -63182,7 +63637,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -63206,7 +63661,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10849, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10863, 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) @@ -63287,19 +63742,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10471, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10485, libc.VaList(bp, pName)) goto exit_drop_column __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+10856, + Xsqlite3ErrorMsg(tls, pParse, ts+10870, 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 + 10884 + return ts + 10898 } - return ts + 6097 + return ts + 6111 }(), zCol)) goto exit_drop_column @@ -63308,7 +63763,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10896, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10910, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63322,13 +63777,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1518, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1538, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10944, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10958, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11065, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11079, 1) 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 @@ -63446,11 +63901,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11083}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11104}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11124}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11143}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11162}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11097}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11118}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11138}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11157}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11176}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -63484,7 +63939,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11185, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11199, 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) } @@ -63493,10 +63948,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+11208, + ts+11222, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11238, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11252, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -63514,9 +63969,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11256, FzCols: ts + 11269}, - {FzName: ts + 11282, FzCols: ts + 11295}, - {FzName: ts + 11323}, + {FzName: ts + 11270, FzCols: ts + 11283}, + {FzName: ts + 11296, FzCols: ts + 11309}, + {FzName: ts + 11337}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -63707,7 +64162,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11336} + FzName: ts + 11350} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -63958,7 +64413,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11346} + FzName: ts + 11360} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -63972,7 +64427,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11356, + Xsqlite3_str_appendf(tls, bp+24, ts+11370, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -63985,7 +64440,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11361, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11375, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64027,7 +64482,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+11367, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11381, 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)).FnChar-- @@ -64041,7 +64496,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11373} + FzName: ts + 11387} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -64085,7 +64540,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11382, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11396, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64102,7 +64557,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+11256, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11270, 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, -6) @@ -64258,7 +64713,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11392, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11406, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64315,7 +64770,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+11392, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11406, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64362,9 +64817,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+11396) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11410) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11400) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11414) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -64447,7 +64902,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1518 + z = ts + 1538 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -64469,15 +64924,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+11404, z) == 0 { + if Xsqlite3_strglob(tls, ts+11418, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11415, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11429, 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+11425, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11439, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -64753,11 +65208,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11282, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11296, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11437, - ts+11491, + ts+11451, + ts+11505, zDb) } return rc @@ -64804,10 +65259,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11256, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11270, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11543, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11557, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -64865,7 +65320,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6351, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6365, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -64895,20 +65350,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1518 + zFile = ts + 1538 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1518 + zName = ts + 1538 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3805) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3819) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -64924,13 +65379,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11584, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11598, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11587, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -64944,7 +65399,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11624, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11638, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -64955,7 +65410,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -65008,7 +65463,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11668, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -65025,7 +65480,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11683, 0) + ts+11697, 0) rc = SQLITE_ERROR __23: ; @@ -65091,13 +65546,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1454, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1474, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11751, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11765, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -65144,7 +65599,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1518 + zName = ts + 1538 __1: ; i = 0 @@ -65175,14 +65630,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11779, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11793, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11800, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11814, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65190,7 +65645,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11826, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11840, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65301,7 +65756,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11848} + FzName: ts + 11862} // Called by the parser to compile an ATTACH statement. // @@ -65314,7 +65769,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11862} + FzName: ts + 11876} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65328,7 +65783,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+11876, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11890, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65360,7 +65815,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+11900, + ts+11914, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -65535,7 +65990,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11946, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11960, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -65561,11 +66016,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+11969, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11983, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11975, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11989, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11981, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11995, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -65612,7 +66067,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 7623 + zCol = ts + 7637 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -65636,7 +66091,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+12008, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12022, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -65730,6 +66185,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -65757,9 +66214,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -65778,62 +66234,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -65880,13 +66328,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -65911,25 +66359,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6351) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6365) == 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+8042, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12023+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12042+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5863+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12037+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5877+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12056) + ts+12070) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12042+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5863) + ts+5877) } } } @@ -65950,12 +66398,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8042, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12042+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5863) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12023+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5877) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12037+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12056) + ts+12070) } } } @@ -65984,9 +66432,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+12075, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12089, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -65997,21 +66445,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12083 + zMsg = ts + 12097 } else { - zMsg = ts + 12096 + zMsg = ts + 12110 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6555, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6569, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6579, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66041,12 +66489,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+8042, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5863+7) == 0 { - return ts + 12042 + if Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5877+7) == 0 { + return ts + 12056 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { - return ts + 12023 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12070+7) == 0 { + return ts + 12037 } } return zName @@ -66151,10 +66599,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -66310,11 +66758,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -66331,7 +66779,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -66360,7 +66808,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -66404,7 +66852,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5863) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5877) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -66430,7 +66878,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6351, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6365, zName) { goto __3 } @@ -66483,13 +66931,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+12110, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12124, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12127, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12141, libc.VaList(bp, pName1)) return -1 } } else { @@ -66527,13 +66975,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1518, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1538, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8042, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8056, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12147, + Xsqlite3ErrorMsg(tls, pParse, ts+12161, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -66693,9 +67141,9 @@ 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 + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -66711,7 +67159,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12189, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12203, 0) return __4: ; @@ -66739,9 +67187,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10399 + return ts + 10413 } - return ts + 8784 + return ts + 8798 }(), zName) != 0) { goto __8 } @@ -66757,9 +67205,9 @@ __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 + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -66790,12 +67238,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12230, + Xsqlite3ErrorMsg(tls, pParse, ts+12244, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10399 + return ts + 10413 } - return ts + 8784 + return ts + 8798 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -66810,7 +67258,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12251, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12265, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -66845,8 +67293,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -66867,7 +67315,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -66897,7 +67345,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12286, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12300, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -66921,7 +67369,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12303, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12317, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -66930,7 +67378,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -66941,7 +67389,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12286 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12300 (*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) @@ -66953,7 +67401,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+12286, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12300, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -66987,7 +67435,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+12337, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12351, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -66995,13 +67443,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+12360, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12374, 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)).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+12367, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12381, 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)).Fn-- @@ -67038,7 +67486,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+12377, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12391, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67202,10 +67650,10 @@ 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+12403, + Xsqlite3ErrorMsg(tls, pParse, ts+12417, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12448, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12462, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -67236,7 +67684,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12489, 0) + ts+12503, 0) } } @@ -67281,7 +67729,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12541, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12555, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67370,7 +67818,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12582, 0) + ts+12596, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -67396,7 +67844,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -67465,7 +67913,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12638, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12652, 0) goto generated_done __2: ; @@ -67478,13 +67926,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12681, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12695, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12689, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12703, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -67517,7 +67965,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12696, + Xsqlite3ErrorMsg(tls, pParse, ts+12710, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -67638,13 +68086,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1518 - zSep2 = ts + 12727 - zEnd = ts + 4927 + zSep = ts + 1538 + zSep2 = ts + 12741 + zEnd = ts + 4941 } else { - zSep = ts + 12729 - zSep2 = ts + 12733 - zEnd = ts + 12738 + zSep = ts + 12743 + zSep2 = ts + 12747 + zEnd = ts + 12752 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -67652,7 +68100,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12741, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12755, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -67686,16 +68134,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3633, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3647, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1518, - ts + 12755, - ts + 12761, - ts + 12766, - ts + 12771, + ts + 1538, + ts + 12769, + ts + 12775, + ts + 12780, + ts + 12785, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -67834,8 +68282,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -67962,7 +68410,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -67986,7 +68434,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -68085,7 +68533,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1518, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1538, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -68102,10 +68550,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+12777, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1518))) + ts+12791, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1538))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12810, + Xsqlite3ErrorMsg(tls, pParse, ts+12824, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68124,11 +68572,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+12837, 0) + ts+12851, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12887, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12901, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68162,7 +68610,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12919, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12933, 0) return } } @@ -68187,11 +68635,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8784 - zType2 = ts + 12963 + zType = ts + 8798 + zType2 = ts + 12977 } else { - zType = ts + 10399 - zType2 = ts + 12969 + zType = ts + 10413 + zType2 = ts + 12983 } if pSelect != 0 { @@ -68253,7 +68701,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -68262,11 +68710,11 @@ 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+12974, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12988, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+12989, + ts+13003, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68282,13 +68730,13 @@ 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+13087, + ts+13101, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13129, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13143, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68303,7 +68751,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9306) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9320) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68333,7 +68781,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+13163, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13177, 0) goto create_view_fail __1: ; @@ -68349,7 +68797,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10399, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10413, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -68412,10 +68860,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -68433,12 +68878,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13199, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13213, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -68498,6 +68939,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -68557,13 +69005,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13229, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13243, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13244, + ts+13258, 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) } @@ -68604,10 +69052,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13311, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13325, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11208, + ts+11222, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -68639,12 +69087,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13325, + ts+13339, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13370, + ts+13384, 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) @@ -68672,11 +69120,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3256, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3270, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7043, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7057, 10) == 0 { return 0 } return 1 @@ -68754,9 +69202,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -68815,21 +69263,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13437, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13451, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13465, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13479, 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+13499, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13513, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -68841,7 +69289,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11400, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11414, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -68905,7 +69353,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13531, + ts+13545, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -68917,7 +69365,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13594, 0) + ts+13608, 0) goto fk_end goto __7 __6: @@ -69002,7 +69450,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13688, + ts+13702, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -69229,12 +69677,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13734, + Xsqlite3ErrorMsg(tls, pParse, ts+13748, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13762 + return ts + 13776 } - return ts + 13768 + return ts + 13782 }())) return 1 } @@ -69355,7 +69803,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13773, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13787, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -69374,7 +69822,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13779, + ts+13793, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -69400,26 +69848,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13829, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13843, 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+13857, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13871, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13882, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13896, 0) goto exit_create_index __17: ; @@ -69433,7 +69881,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13773, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13787, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -69445,10 +69893,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13916, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13930, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -69460,7 +69908,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13950, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13964, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -69489,7 +69937,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13974, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13988, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -69510,9 +69958,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -69551,7 +69999,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13773) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13787) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -69652,7 +70100,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13997, 0) + ts+14011, 0) goto exit_create_index __56: ; @@ -69666,6 +70114,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -69686,6 +70135,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -69867,7 +70317,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14058, libc.VaList(bp+48, 0)) + ts+14072, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -69919,8 +70369,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14100, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14114, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -69966,12 +70416,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14117, + zStmt = Xsqlite3MPrintf(tls, db, ts+14131, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1518 + return ts + 1538 } - return ts + 14137 + return ts + 14151 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -69979,7 +70429,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14145, + ts+14159, 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, @@ -69993,7 +70443,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14204, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14218, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70154,7 +70604,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14231, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14245, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70169,7 +70619,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14249, libc.VaList(bp+8, 0)) + ts+14263, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70180,9 +70630,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70208,9 +70658,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14322, + ts+14336, 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+11396, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11410, (*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) @@ -70291,6 +70741,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -70298,7 +70749,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -70344,7 +70795,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+14382, + Xsqlite3ErrorMsg(tls, pParse, ts+14396, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -70479,6 +70930,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -70490,11 +70942,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -70521,7 +70975,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -70549,12 +71003,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14418, + Xsqlite3ErrorMsg(tls, pParse, ts+14432, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14454 + return ts + 14468 } - return ts + 14457 + return ts + 14471 }())) goto append_from_error __1: @@ -70723,7 +71177,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14463, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14477, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -70759,9 +71213,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14469 + return ts + 14483 } - return ts + 14478 + return ts + 14492 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -70786,7 +71240,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14463, ts + 14485, ts + 14469} +var az = [3]uintptr{ts + 14477, ts + 14499, ts + 14483} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -70801,7 +71255,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14493, 0) + ts+14507, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -70819,7 +71273,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11969, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11983, 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+14577, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14591, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71105,7 +71559,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14586, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14600, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71201,7 +71655,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+14632, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14646, libc.VaList(bp, zName)) } } } @@ -71301,7 +71755,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -71315,7 +71769,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -71394,7 +71848,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14676, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -71521,7 +71975,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -71555,7 +72009,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -71578,26 +72032,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -71663,10 +72118,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14707, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -71679,19 +72150,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14693, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14740, 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+14722, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14769, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -71918,17 +72391,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -71941,10 +72416,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -71953,15 +72428,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -71970,98 +72445,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -72069,138 +72544,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14760) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14807) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -72303,7 +72783,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+11256) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11270) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -72533,7 +73013,7 @@ 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 + 6161, ts + 6156, ts + 7915, ts + 7910, ts + 6151} +var azType2 = [5]uintptr{ts + 6175, ts + 6170, ts + 7929, ts + 7924, ts + 6165} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -72592,7 +73072,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14773, -1) + Xsqlite3_result_error(tls, context, ts+14820, -1) return } iVal = -iVal @@ -72896,7 +73376,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14790, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14837, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73086,7 +73566,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -73199,13 +73679,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73228,7 +73722,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14795, -1) + Xsqlite3_result_error(tls, context, ts+14842, -1) return } if argc == 3 { @@ -73238,7 +73732,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14828, -1) + ts+14875, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73291,7 +73785,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3633, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3647, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -73331,13 +73825,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4895, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4909, 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+14873, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14920, libc.VaList(bp+8, r1)) } } break @@ -73345,7 +73839,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1298, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1318, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -73374,13 +73868,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14880, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14927, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1519, 4) + Xsqlite3_str_append(tls, pStr, ts+1539, 4) break } @@ -73690,7 +74184,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10828} +var azOne = [1]uintptr{ts + 10842} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -73702,7 +74196,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1518 + zIn = ts + 1538 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -73726,7 +74220,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14883, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14930, 4, uintptr(0)) } } @@ -73751,7 +74245,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12008, -1) + Xsqlite3_result_error(tls, context, ts+12022, -1) return } @@ -73829,7 +74323,7 @@ func sumFinalize(tls *libc.TLS, context 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+14773, -1) + Xsqlite3_result_error(tls, context, ts+14820, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74091,7 +74585,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14888, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14935, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74111,14 +74605,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14894, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14941, 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+14894, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14941, 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+14894, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14894, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14941, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14941, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74358,107 +74852,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 14899}, - {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 + 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_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14932}, - {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 + 14950}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14959}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14967}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14967}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14982}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15008}, - {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 + 15033}, - {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 + 15042}, - {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 + 15053}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15060}, - {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 + 15074}, - {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 + 15074}, - {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 + 15080}, - {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 + 15080}, - {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 + 15086}, - {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 + 15086}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15091}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15091}, - {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 + 15091}, - {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 + 15095}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15095}, - {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 + 15095}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15099}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15106}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15114}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15121}, - {FnArg: int8(-1), 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 + 15134}, - {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 + 15149}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15176}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15180}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15187}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15194}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15212}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15227}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15244}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15255}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | 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 + 15301}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15309}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {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 + 15335}, - {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 + 15339}, - {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 + 15345}, - {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 + 15349}, - {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 + 15349}, - {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 + 15355}, - {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 + 15355}, - {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 + 15368}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14894}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14894}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6496}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6496}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15373}, - {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), FpUserData: 0, FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15398}, - {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 + 15401}, - {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 + 15405}, - {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 + 15411}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15424}, - {FnArg: int8(2), 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 + 15434}, + {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 + 14946}, + {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 + 14966}, + {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 + 14979}, + {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 + 14997}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15006}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15014}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15014}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15029}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15055}, + {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 + 15080}, + {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 + 15089}, + {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 + 15100}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15107}, + {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 + 15121}, + {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 + 15121}, + {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 + 15127}, + {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 + 15127}, + {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 + 15133}, + {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 + 15133}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15138}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15138}, + {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 + 15138}, + {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 + 15142}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15142}, + {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 + 15142}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15146}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15161}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15168}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15181}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15188}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15201}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, + {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 + 15211}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15223}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15227}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15234}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15241}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15252}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15259}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15274}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15291}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15308}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15326}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15348}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(3), 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_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15382}, + {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 + 15386}, + {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 + 15392}, + {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 + 15396}, + {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 + 15396}, + {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 + 15402}, + {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 + 15402}, + {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 + 15415}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14941}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14941}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6510}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6510}, + {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 + 15433}, {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(2), 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 + 15455}, - {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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15445}, + {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 + 15448}, + {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 + 15452}, + {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 + 15458}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15448}, {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 + 15467}, - {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 + 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 + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15494}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15513}, - {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 + 15524}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6496}, - {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 + 15529}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, + {FnArg: int8(2), 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 + 15481}, + {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}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15496}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15506}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15524}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15541}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15547}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15552}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15560}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15571}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6510}, + {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 + 15576}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -74579,7 +75073,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+15533, + ts+15580, 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) @@ -75239,8 +75733,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6362, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6358, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6376, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6372, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -75319,7 +75813,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5106) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5120) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -75421,7 +75915,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -75529,6 +76023,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -75569,13 +76084,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -75587,21 +76101,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -75672,7 +76176,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -75730,7 +76234,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7880, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7894, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76033,6 +76537,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -76196,7 +76702,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15578, + ts+15625, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -76221,7 +76727,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15619, + Xsqlite3ErrorMsg(tls, pParse, ts+15666, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -76370,7 +76876,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15651, + ts+15698, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -76380,7 +76886,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15703, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15750, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -76432,7 +76938,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15728, + Xsqlite3ErrorMsg(tls, pParse, ts+15775, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -76440,7 +76946,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15821, 0) goto insert_cleanup __57: ; @@ -76622,7 +77128,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -76637,137 +77156,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -76779,64 +77298,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15795) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15842) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -76844,7 +77367,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -77147,7 +77674,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11969, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11983, 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) @@ -78237,13 +78764,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1518 + zSql = ts + 1538 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -78682,6 +79209,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -78720,7 +79248,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12008, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12022, 0) __3: ; return SQLITE_ERROR @@ -78729,7 +79257,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15809 + zEntry = ts + 15856 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -78744,7 +79272,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11969, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11983, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -78780,7 +79308,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15832, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15879, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -78794,7 +79322,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15841, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15888, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -78818,7 +79346,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15845, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15892, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -78836,7 +79364,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15851, libc.VaList(bp+16, zEntry, zFile)) + ts+15898, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -78863,7 +79391,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15894, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15941, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -78901,7 +79429,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15926, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15973, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -78911,7 +79439,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15963, + ts + 16010, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79067,7 +79595,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+15966, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16013, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -79075,63 +79603,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5027, - ts + 16005, - ts + 8784, - ts + 16009, - ts + 16014, - ts + 16017, - ts + 16027, - ts + 16037, - ts + 16043, - ts + 16047, - ts + 16052, - ts + 16057, - ts + 16065, - ts + 16076, - ts + 16079, - ts + 16086, - ts + 16047, + ts + 5041, ts + 16052, - ts + 16093, - ts + 16098, - ts + 16101, - ts + 16108, - ts + 16043, - ts + 16047, - ts + 16114, - ts + 16119, - ts + 16124, - ts + 16047, - ts + 16128, - ts + 16052, - ts + 16136, + ts + 8798, + ts + 16056, + ts + 16061, + ts + 16064, + ts + 16074, + ts + 16084, + ts + 16090, + ts + 16094, + ts + 16099, + ts + 16104, + ts + 16112, + ts + 16123, + ts + 16126, + ts + 16133, + ts + 16094, + ts + 16099, ts + 16140, ts + 16145, - ts + 11400, - ts + 11396, - ts + 16151, - ts + 16156, + ts + 16148, + ts + 16155, + ts + 16090, + ts + 16094, ts + 16161, - ts + 16005, - ts + 16047, ts + 16166, - ts + 16173, - ts + 16180, - ts + 8784, - ts + 16188, - ts + 5030, - ts + 16194, - ts + 16005, - ts + 16047, - ts + 16199, - ts + 16204, - ts + 15401, - ts + 16209, - ts + 16222, - ts + 16231, - ts + 16238, - ts + 16249, + ts + 16171, + ts + 16094, + ts + 16175, + ts + 16099, + ts + 16183, + ts + 16187, + ts + 16192, + ts + 11414, + ts + 11410, + ts + 16198, + ts + 16203, + ts + 16208, + ts + 16052, + ts + 16094, + ts + 16213, + ts + 16220, + ts + 16227, + ts + 8798, + ts + 16235, + ts + 5044, + ts + 16241, + ts + 16052, + ts + 16094, + ts + 16246, + ts + 16251, + ts + 15448, + ts + 16256, + ts + 16269, + ts + 16278, + ts + 16285, + ts + 16296, } // Definitions of all built-in pragmas @@ -79149,238 +79677,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16257, + {FzName: ts + 16304, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16272, + {FzName: ts + 16319, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16287, + {FzName: ts + 16334, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16299, + {FzName: ts + 16346, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16238, + {FzName: ts + 16285, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16328, + {FzName: ts + 16375, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16340, + {FzName: ts + 16387, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16360, + {FzName: ts + 16407, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16397, + {FzName: ts + 16444, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16412, + {FzName: ts + 16459, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16442, + {FzName: ts + 16489, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16455, + {FzName: ts + 16502, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16469, + {FzName: ts + 16516, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16488, + {FzName: ts + 16535, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16507, + {FzName: ts + 16554, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16530, + {FzName: ts + 16577, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16539, + {FzName: ts + 16586, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16557, + {FzName: ts + 16604, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16574, + {FzName: ts + 16621, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16587, + {FzName: ts + 16634, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16602, + {FzName: ts + 16649, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16620, + {FzName: ts + 16667, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16630, + {FzName: ts + 16677, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16644, + {FzName: ts + 16691, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16685, + {FzName: ts + 16732, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16704, + {FzName: ts + 16751, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16715, + {FzName: ts + 16762, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16726, + {FzName: ts + 16773, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16738, + {FzName: ts + 16785, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16767, + {FzName: ts + 16814, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16786, + {FzName: ts + 16833, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16805, + {FzName: ts + 16852, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16818, + {FzName: ts + 16865, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16833, + {FzName: ts + 16880, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16843, + {FzName: ts + 16890, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16855, + {FzName: ts + 16902, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16864, + {FzName: ts + 16911, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16875, + {FzName: ts + 16922, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16885, + {FzName: ts + 16932, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16897, + {FzName: ts + 16944, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16908, + {FzName: ts + 16955, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16920, + {FzName: ts + 16967, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16937, + {FzName: ts + 16984, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16956, + {FzName: ts + 17003, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16982, + {FzName: ts + 17029, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 16997, + {FzName: ts + 17044, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17011, + {FzName: ts + 17058, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17030, + {FzName: ts + 17077, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17044, + {FzName: ts + 17091, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17072, + {FzName: ts + 17119, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17083, + {FzName: ts + 17130, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17094, + {FzName: ts + 17141, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17106, + {FzName: ts + 17153, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17117, + {FzName: ts + 17164, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17138, + {FzName: ts + 17185, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17146, + {FzName: ts + 17193, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17161, + {FzName: ts + 17208, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17174, + {FzName: ts + 17221, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17193, + {FzName: ts + 17240, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17208, + {FzName: ts + 17255, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -79402,7 +79930,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17224)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17271)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -79414,10 +79942,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17296) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17259) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17306) { return PAGER_LOCKINGMODE_NORMAL } } @@ -79426,13 +79954,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7928) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7942) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17266) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17313) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17271) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17318) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -79447,9 +79975,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+16199) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16246) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17283) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17330) == 0 { return 2 } else { return 0 @@ -79463,7 +79991,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+17290, 0) + ts+17337, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -79554,19 +80082,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17352 + zName = ts + 17399 break case OE_SetDflt: - zName = ts + 17361 + zName = ts + 17408 break case OE_Cascade: - zName = ts + 17373 + zName = ts + 17420 break case OE_Restrict: - zName = ts + 17381 + zName = ts + 17428 break default: - zName = ts + 17390 + zName = ts + 17437 break } return zName @@ -79583,7 +80111,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17400, ts + 17407, ts + 17415, ts + 17419, ts + 17283, ts + 17428, + ts + 17447, ts + 17454, ts + 17462, ts + 17466, ts + 17330, ts + 17475, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -79630,13 +80158,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17432 + zType = ts + 17479 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17434 + zType = ts + 17481 } else { - zType = ts + 7438 + zType = ts + 7452 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17436, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17483, 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), @@ -79644,7 +80172,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17443, ts + 17448, ts + 17456} +var azEnc = [4]uintptr{uintptr(0), ts + 17490, ts + 17495, ts + 17503} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -79669,8 +80197,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(608) - defer tls.Free(608) + bp := tls.Alloc(664) + defer tls.Free(664) var zLeft uintptr var zRight uintptr @@ -79777,13 +80305,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -79803,6 +80340,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -79853,7 +80392,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -79868,7 +80407,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -79878,7 +80417,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17464, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17511, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -79895,30 +80434,30 @@ __6: goto pragma_out __7: ; - *(*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) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) 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))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3633, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -80139,7 +80678,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17468) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17515) == 0) { goto __64 } b = 2 @@ -80173,7 +80712,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -80182,36 +80721,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17259 + zRet = ts + 17306 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80249,7 +80788,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17249 + zRet = ts + 17296 __83: ; returnSingleText(tls, v, zRet) @@ -80330,21 +80869,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -80386,15 +80925,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -80431,14 +80970,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -80495,11 +81034,11 @@ __116: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __118 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+504) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 504)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+544) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 544)) == 0) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+17473, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17520, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __119: @@ -80518,7 +81057,7 @@ __120: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __121 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+16, zRight)) goto __122 __121: Xsqlite3_temp_directory = uintptr(0) @@ -80540,7 +81079,7 @@ __123: goto __125 } Xsqlite3ErrorMsg(tls, pParse, - ts+17498, 0) + ts+17545, 0) goto __126 __125: if !(iDb != 1) { @@ -80594,7 +81133,7 @@ __132: __134: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17551) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17598) == 0) { goto __135 } @@ -80691,13 +81230,13 @@ __148: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17557 + return ts + 17604 } - return ts + 17565 + return ts + 17612 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1518), + Xsqlite3ColumnType(tls, pCol, ts+1538), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -80762,20 +81301,20 @@ __163: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __164 } - zSql = Xsqlite3MPrintf(tls, db, ts+17572, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17619, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __165 } - *(*uintptr)(unsafe.Pointer(bp + 512)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+512, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 512))) + *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+552, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 552))) Xsqlite3DbFree(tls, db, zSql) __165: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __166 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1454, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1474, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __166: ; @@ -80808,29 +81347,29 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __171 } - zType = ts + 10399 + zType = ts + 10413 goto __172 __171: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __173 } - zType = ts + 12681 + zType = ts + 12695 goto __174 __173: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __175 } - zType = ts + 17588 + zType = ts + 17635 goto __176 __175: - zType = ts + 8784 + zType = ts + 8798 __176: ; __174: ; __172: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17595, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -80896,7 +81435,7 @@ __183: goto __185 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17649, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -80906,7 +81445,7 @@ __183: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __186 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17654, 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)))) @@ -80943,12 +81482,12 @@ __189: if !(pIdx1 != 0) { goto __191 } - *(*[3]uintptr)(unsafe.Pointer(bp + 520)) = [3]uintptr{ts + 17612, ts + 17614, ts + 16076} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17616, + *(*[3]uintptr)(unsafe.Pointer(bp + 560)) = [3]uintptr{ts + 17659, ts + 17661, ts + 16123} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17663, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 520 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 560 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __190 __190: @@ -80977,7 +81516,7 @@ __192: goto __193 __195: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17622, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17669, 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))) @@ -80993,13 +81532,13 @@ __194: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __196: if !(p != 0) { goto __198 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17626, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17673, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __197 __197: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81038,7 +81577,7 @@ __200: goto __201 __201: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __205: if !(j != 0) { goto __207 @@ -81057,13 +81596,13 @@ __207: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __208: if !(j1 != 0) { goto __210 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7438, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7452, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __209 __209: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81079,7 +81618,7 @@ __211: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __213 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7438, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7452, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __212 __212: i6++ @@ -81114,7 +81653,7 @@ __219: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __221 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17629, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17676, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81122,7 +81661,7 @@ __219: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17638)) + ts+17685)) goto __220 __220: j2++ @@ -81195,20 +81734,20 @@ __228: goto __229 __231: ; - *(*uintptr)(unsafe.Pointer(bp + 544)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 584)) = 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+544, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+584, uintptr(0)) if !(x1 == 0) { goto __232 } - if !(*(*uintptr)(unsafe.Pointer(bp + 544)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 584)) == uintptr(0)) { goto __234 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __235 __234: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 544)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 544))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 584)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 584))) __235: ; goto __233 @@ -81246,12 +81785,12 @@ __238: goto __240 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 544)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 584)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) if !(pParent != 0) { goto __241 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+544, bp+552) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+584, bp+592) __241: ; @@ -81268,8 +81807,8 @@ __243: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __245 } - if *(*uintptr)(unsafe.Pointer(bp + 552)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 592)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -81282,11 +81821,11 @@ __244: goto __245 __245: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 544)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 584)) != 0) { goto __246 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 544))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 584))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __247 @@ -81311,10 +81850,10 @@ __249: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __250: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17643, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17690, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))) goto __239 __239: i8++ @@ -81352,17 +81891,17 @@ __252: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 600)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __253 } - if !(Xsqlite3GetInt32(tls, zRight, bp+560) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+600) != 0) { goto __254 } - if !(*(*int32)(unsafe.Pointer(bp + 560)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 600)) <= 0) { goto __256 } - *(*int32)(unsafe.Pointer(bp + 560)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 600)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __256: ; goto __255 @@ -81378,7 +81917,7 @@ __255: ; __253: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 560))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 600))-1, 1) i9 = 0 __257: @@ -81528,7 +82067,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+17647, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17694, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -81555,178 +82094,307 @@ __286: goto __284 __287: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __288 } + pPk1 = uintptr(0) + r2 = 0 + goto __289 +__288: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__289: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+564, bp+568) + 1, uintptr(0), bp+604, bp+608) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__288: +__290: if !(pIdx5 != 0) { - goto __290 + goto __292 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __289 -__289: + goto __291 +__291: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __288 goto __290 -__290: + goto __292 +__292: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 564)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 604)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__293: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __294 + } + mxCol-- + goto __293 +__294: + ; + if !(mxCol >= 0) { + goto __295 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__295: + ; if !!(isQuick != 0) { - goto __291 + goto __296 } + if !(pPk1 != 0) { + goto __297 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 604)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 564)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__291: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17718, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__298: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __300 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 604)), j4, r2+j4) + goto __299 +__299: + j4++ + goto __298 + goto __300 +__300: + ; +__297: + ; +__296: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__292: +__301: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __294 + goto __303 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __295 + goto __304 } - goto __293 -__295: + goto __302 +__304: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __296 + if !(bStrict != 0) { + goto __305 } - goto __293 -__296: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __306 +__305: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__306: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __307 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 564)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __297 + goto __302 +__307: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __308 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__297: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) + p11 = -1 + p3 = 3 + goto __309 +__308: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __310 + } + *(*uintptr)(unsafe.Pointer(bp + 616)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+616) + if !(*(*uintptr)(unsafe.Pointer(bp + 616)) != 0) { + goto __311 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) +__311: ; +__310: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 604)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __312 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __313 +__312: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__313: + ; +__309: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __298 + goto __314 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17671, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17754, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __299 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __315 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __300 -__299: - integrityCheckResultRow(tls, v) -__300: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__298: + goto __316 +__315: + ; +__316: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __301 +__314: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __317 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+17691, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17774, + 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__301: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __318 +__317: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __319 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17796, + libc.VaList(bp+416, (*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, zErr1, -6) + goto __320 +__319: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __321 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __322 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) +__322: ; - goto __293 -__293: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17819, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17821, + libc.VaList(bp+432, (*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, zErr1, -6) +__321: + ; +__320: + ; +__318: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __302 +__302: j4++ - goto __292 - goto __294 -__294: + goto __301 + goto __303 +__303: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __302 + goto __323 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __303 + goto __324 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 564)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 604)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__304: +__325: if !(k3 > 0) { - goto __306 + goto __327 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __305 -__305: + goto __326 +__326: k3-- - goto __304 - goto __306 -__306: + goto __325 + goto __327 +__327: ; 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+17713, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17841, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__303: +__324: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__302: +__323: ; if !!(isQuick != 0) { - goto __307 + goto __328 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__308: +__329: if !(pIdx5 != 0) { - goto __310 + goto __331 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __311 + goto __332 } - goto __309 -__311: + goto __330 +__332: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 564)), 0, 0, bp+572, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 604)), 0, 0, bp+624, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 568))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 608))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17743) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17871) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17748) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17876) 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) @@ -81734,87 +82402,93 @@ __311: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __312 + goto __333 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__313: +__334: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __315 + goto __336 } 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 __316 + goto __337 } - goto __314 -__316: + goto __335 +__337: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __314 -__314: + goto __335 +__335: kk++ - goto __313 - goto __315 -__315: + goto __334 + goto __336 +__336: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 608))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 608))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17769) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17897) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__312: +__333: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 572))) - goto __309 -__309: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 624))) + goto __330 +__330: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __308 - goto __310 -__310: + goto __329 + goto __331 +__331: ; -__307: +__328: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 564)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 604)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __317 + goto __338 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17796) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17924) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__318: +__339: if !(pIdx5 != 0) { - goto __320 + goto __341 } if !(pPk1 == pIdx5) { - goto __321 + goto __342 } - goto __319 -__321: + goto __340 +__342: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 568))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 608))+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 __319 -__319: + goto __340 +__340: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __318 - goto __320 -__320: + goto __339 + goto __341 +__341: ; -__317: + if !(pPk1 != 0) { + goto __343 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__343: + ; +__338: ; goto __284 __284: @@ -81832,14 +82506,14 @@ __259: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __322 + goto __344 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 560)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 600)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17825 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17953 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__322: +__344: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -81847,27 +82521,27 @@ __322: __45: if !!(zRight != 0) { - goto __323 + goto __345 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __325 + goto __347 } goto pragma_out -__325: +__347: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __324 -__323: + goto __346 +__345: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __326 + goto __348 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__327: +__349: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __329 + goto __351 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __330 + goto __352 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -81876,25 +82550,25 @@ __327: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __329 -__330: + goto __351 +__352: ; - goto __328 -__328: + goto __350 +__350: pEnc += 16 - goto __327 - goto __329 -__329: + goto __349 + goto __351 +__351: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __331 + goto __353 } - Xsqlite3ErrorMsg(tls, pParse, ts+17828, libc.VaList(bp+416, zRight)) -__331: + Xsqlite3ErrorMsg(tls, pParse, ts+17956, libc.VaList(bp+456, zRight)) +__353: ; -__326: +__348: ; -__324: +__346: ; goto __15 @@ -81902,50 +82576,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __332 + goto __354 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __334 + goto __356 } goto __15 -__334: +__356: ; (*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 __333 -__332: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __357 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__357: + ; + goto __355 +__354: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __335 + goto __358 } goto __15 -__335: +__358: ; (*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) -__333: +__355: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__336: +__359: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __337 + goto __360 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __336 -__337: + goto __359 +__360: ; Xsqlite3VdbeReusable(tls, v) @@ -81960,31 +82641,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __338 + goto __361 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17266) == 0) { - goto __339 + if !(Xsqlite3StrICmp(tls, zRight, ts+17313) == 0) { + goto __362 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __340 -__339: - if !(Xsqlite3StrICmp(tls, zRight, ts+17853) == 0) { - goto __341 + goto __363 +__362: + if !(Xsqlite3StrICmp(tls, zRight, ts+17981) == 0) { + goto __364 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __342 -__341: - if !(Xsqlite3StrICmp(tls, zRight, ts+17419) == 0) { - goto __343 + goto __365 +__364: + if !(Xsqlite3StrICmp(tls, zRight, ts+17466) == 0) { + goto __366 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__343: +__366: ; -__342: +__365: ; -__340: +__363: ; -__338: +__361: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -81994,10 +82675,10 @@ __338: __49: if !(zRight != 0) { - goto __344 + goto __367 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__344: +__367: ; returnSingleInt(tls, v, func() int64 { @@ -82017,19 +82698,19 @@ __50: __51: if !(zRight != 0) { - goto __345 + goto __368 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __347 + goto __370 } goto __15 -__347: +__370: ; - goto __346 -__345: + goto __369 +__368: opMask = U32(0xfffe) -__346: +__369: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82038,86 +82719,86 @@ __346: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__348: +__371: if !(iDb <= iDbLast) { - goto __350 + goto __373 } if !(iDb == 1) { - goto __351 + goto __374 } - goto __349 -__351: + goto __372 +__374: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__352: +__375: if !(k4 != 0) { - goto __354 + goto __377 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __355 + goto __378 } - goto __353 -__355: + goto __376 +__378: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__356: +__379: if !(pIdx6 != 0) { - goto __358 + goto __381 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __359 + goto __382 } szThreshold = int16(0) - goto __358 -__359: + goto __381 +__382: ; - goto __357 -__357: + goto __380 +__380: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __356 - goto __358 -__358: + goto __379 + goto __381 +__381: ; if !(szThreshold != 0) { - goto __360 + goto __383 } 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)) -__360: +__383: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17861, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+17989, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __361 + goto __384 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __362 -__361: + goto __385 +__384: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__362: +__385: ; - goto __353 -__353: + goto __376 +__376: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __352 - goto __354 -__354: + goto __375 + goto __377 +__377: ; - goto __349 -__349: + goto __372 +__372: iDb++ - goto __348 - goto __350 -__350: + goto __371 + goto __373 +__373: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82125,60 +82806,60 @@ __350: __52: ; if !(zRight != 0) { - goto __363 + goto __386 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__363: +__386: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+576) == SQLITE_OK) { - goto __364 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+632) == SQLITE_OK) { + goto __387 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 576))) -__364: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 632))) +__387: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __365 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __388 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 584)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 584)))) { - goto __366 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 640)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 640)))) { + goto __389 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__366: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__389: ; -__365: +__388: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) >= int64(0)) { - goto __367 + Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) >= int64(0)) { + goto __390 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592))&int64(0x7fffffff))) -__367: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648))&int64(0x7fffffff))) +__390: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __368 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __391 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) & int64(0x7fffffff)) -__368: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) & int64(0x7fffffff)) +__391: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82186,10 +82867,10 @@ __368: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __369 + goto __392 } -__369: +__392: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82222,6 +82903,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -82233,14 +82922,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17879, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17884, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17890, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17899, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17908, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17916, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924}, - {FzName: ts + 17931}, + {FzName: ts + 18007, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18012, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18018, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18044, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052}, + {FzName: ts + 18059}, {}, } var setCookie = [2]VdbeOpList{ @@ -82292,7 +82981,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+17937) + Xsqlite3_str_appendall(tls, bp+32, ts+18065) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82300,7 +82989,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17952, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18080, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -82313,19 +83002,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17959, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18087, 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+17965) + Xsqlite3_str_appendall(tls, bp+32, ts+18093) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17977) + Xsqlite3_str_appendall(tls, bp+32, ts+18105) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4927, 1) + Xsqlite3_str_append(tls, bp+32, ts+4941, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -82341,7 +83030,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -82489,7 +83178,7 @@ __1: 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+3633, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -82505,13 +83194,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+17992) + Xsqlite3_str_appendall(tls, bp+32, ts+18120) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18000, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18128, 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+18004, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18132, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -82520,7 +83209,7 @@ __3: 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+3633, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -82588,33 +83277,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18008, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18136, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 4978 + zObj = ts + 4992 } - z = Xsqlite3MPrintf(tls, db, ts+18036, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18164, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18067, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18195, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18075, - ts + 18082, - ts + 18094, + ts + 18203, + ts + 18210, + ts + 18222, } // Check to see if any sibling index (another index on the same table) @@ -82674,7 +83363,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+14100) + corruptSchema(tls, pData, argv, ts+14114) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -82706,13 +83395,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+18105) + corruptSchema(tls, pData, argv, ts+18233) } 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+14100) + corruptSchema(tls, pData, argv, ts+14114) } } } @@ -82745,16 +83434,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8784 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8798 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7848 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18118 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7862 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18246 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -82839,7 +83528,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11683) + ts+11697) rc = SQLITE_ERROR goto initone_error_out __13: @@ -82874,7 +83563,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+18190) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18318) rc = SQLITE_ERROR goto initone_error_out __17: @@ -82888,7 +83577,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18214, + ts+18342, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83071,16 +83760,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -83148,20 +83841,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1454, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1474, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -83173,8 +83866,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -83183,7 +83876,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1454, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1474, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -83194,7 +83887,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -83214,7 +83907,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18248, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18376, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83230,100 +83923,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18278, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18406, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3633, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3647, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -83336,7 +84033,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -83435,7 +84132,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -83578,7 +84275,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -83753,8 +84450,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10828 - var zSp2 uintptr = ts + 10828 + var zSp1 uintptr = ts + 10842 + var zSp2 uintptr = ts + 10842 if pB == uintptr(0) { zSp1++ } @@ -83762,13 +84459,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18297, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18425, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18327)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18455)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -83943,7 +84640,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18361, libc.VaList(bp, 0)) + ts+18489, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -83988,7 +84685,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18411, libc.VaList(bp+8, zName)) + ts+18539, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -83999,7 +84696,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18475, + Xsqlite3ErrorMsg(tls, pParse, ts+18603, libc.VaList(bp+16, zName)) break } @@ -84043,7 +84740,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6496, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6510, Fn: uint32(8)} // 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. @@ -84390,6 +85087,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -84565,7 +85265,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -84627,16 +85327,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18512 + z = ts + 18640 break case TK_INTERSECT: - z = ts + 18522 + z = ts + 18650 break case TK_EXCEPT: - z = ts + 18532 + z = ts + 18660 break default: - z = ts + 18539 + z = ts + 18667 break } return z @@ -84646,7 +85346,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18545, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18673, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -84852,8 +85552,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1083 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16188 + zType = ts + 1103 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16235 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -84992,13 +85692,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16188 + zCol = ts + 16235 } 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+11969, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11983, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -85006,7 +85706,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+18568, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18696, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85096,7 +85796,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16188 + zName = ts + 16235 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85106,7 +85806,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18568, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18696, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -85122,7 +85822,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18577, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -85409,7 +86109,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18585, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18713, 0) return __1: ; @@ -85500,7 +86200,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18634, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18762, 0) goto end_of_recursive_query __15: ; @@ -85520,7 +86220,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18676, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18804, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -85557,7 +86257,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18682, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -85591,11 +86291,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+18697, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18825, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1518 + return ts + 1538 } - return ts + 18720 + return ts + 18848 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -85696,8 +86396,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18722, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18737, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18850, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18865, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -85744,7 +86444,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18512, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18640, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -85811,7 +86511,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18756, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18884, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -85873,7 +86573,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18756, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18884, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -86026,10 +86726,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18777, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18905, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18823, + ts+18951, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86283,8 +86983,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+7144) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7144) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7158) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7158) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -86311,13 +87011,13 @@ 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+18905, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19033, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+18916, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19044, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -86329,7 +87029,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+18921, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -86430,7 +87130,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -86456,6 +87156,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -86472,7 +87173,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -86509,7 +87210,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -86520,6 +87222,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -86544,15 +87247,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1063 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1083 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -86729,9 +87437,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -86800,7 +87515,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -86816,17 +87530,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -86847,7 +87552,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -86859,6 +87563,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -87014,6 +87729,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -87037,8 +87753,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -87214,8 +87930,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -87232,6 +87948,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -87261,6 +87982,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -87294,12 +88016,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15091) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15138) == 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+15095) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15142) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -87365,7 +88087,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+18927, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19055, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -87448,7 +88170,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18945, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19073, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -87577,7 +88299,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+18968, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19096, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -87603,7 +88325,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18988, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19116, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -87619,7 +88341,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19031 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19159 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -87645,7 +88367,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+19054, + Xsqlite3ErrorMsg(tls, pParse, ts+19182, 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 @@ -87656,9 +88378,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 + 19092 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19220 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19126 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19254 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -87685,9 +88407,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -87705,7 +88427,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+19164, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19292, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -87817,7 +88539,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19168, + Xsqlite3ErrorMsg(tls, pParse, ts+19296, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -87836,7 +88558,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+19207, + Xsqlite3ErrorMsg(tls, pParse, ts+19335, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -87844,7 +88566,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+19238, + Xsqlite3ErrorMsg(tls, pParse, ts+14707, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -87945,7 +88667,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6356 + zSchemaName = ts + 6370 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -87960,7 +88682,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19271, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19366, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -88025,7 +88747,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19276, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19371, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88037,7 +88759,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11969, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11983, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88056,9 +88778,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19285, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19380, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19303, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19398, 0) } } } @@ -88068,7 +88790,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+19323, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19418, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88218,13 +88940,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19354, 0) + ts+19449, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19405, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19500, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -88405,19 +89127,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+19438, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19533, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19450 + return ts + 19545 } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1518 + return ts + 1538 }())) } } @@ -88430,7 +89152,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+7848) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7862) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -88588,7 +89310,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -88687,7 +89408,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19473, + ts+19568, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -88748,7 +89469,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19527, + Xsqlite3ErrorMsg(tls, pParse, ts+19622, 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 __15: @@ -88852,7 +89573,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1518, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1538, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -88862,7 +89583,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -88894,7 +89615,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19567, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19662, 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), 5, 0x20) @@ -88952,8 +89673,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19582, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19677, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -88987,7 +89711,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -89080,16 +89804,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -89098,13 +89827,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -89116,52 +89845,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -89179,111 +89908,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -89302,33 +90031,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -89336,28 +90065,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -89368,7 +90097,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -89379,7 +90108,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -89405,7 +90134,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -89418,27 +90147,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 19598 + return ts + 19693 } - return ts + 19607 + return ts + 19702 }()) groupBySort = 1 @@ -89446,49 +90175,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -89502,45 +90231,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -89559,16 +90288,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -89599,16 +90328,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -89621,98 +90350,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -89721,79 +90450,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19598) -__147: + explainTempTable(tls, pParse, ts+19693) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19616 + return ts + 19711 } - return ts + 19639 + return ts + 19734 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -89868,7 +90597,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -89890,7 +90619,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19648, 0) + ts+19743, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -89986,7 +90715,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+3633, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -90078,7 +90807,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -90123,7 +90852,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+19713, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19808, 0) goto trigger_cleanup __3: ; @@ -90167,7 +90896,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19759, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19854, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -90185,7 +90914,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19767, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19862, 0) goto trigger_orphan_error __11: ; @@ -90197,7 +90926,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19759, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19854, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90212,7 +90941,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19808, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19903, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90224,22 +90953,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8042, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19834, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19929, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19872, + Xsqlite3ErrorMsg(tls, pParse, ts+19967, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19909 + return ts + 20004 } - return ts + 19916 + return ts + 20011 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90248,7 +90977,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19922, libc.VaList(bp+24, pTableName+8)) + ts+20017, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -90277,9 +91006,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -90397,7 +91126,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19759, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19854, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -90430,7 +91159,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19968, + ts+20063, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -90455,13 +91184,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20016, + ts+20111, libc.VaList(bp+16, (*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+20091, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20186, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -90717,7 +91446,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20120, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20215, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -90756,9 +91485,9 @@ 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 + 12056 + return ts + 12070 } - return ts + 5863 + return ts + 5877 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -90770,7 +91499,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20140, + ts+20235, 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) @@ -90884,12 +91613,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20202, + ts+20297, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20250 + return ts + 20345 } - return ts + 20257 + return ts + 20352 }())) __15: ; @@ -91003,7 +91732,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20264, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20359, 0) return 1 } @@ -91054,7 +91783,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -91123,7 +91852,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6050, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6064, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -91186,8 +91915,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91220,26 +91949,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20306, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20401, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -91256,7 +91985,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -91449,10 +92178,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -91461,7 +92192,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -91823,7 +92554,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20320, + ts+20415, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -91855,7 +92586,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20356, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20451, 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: @@ -91865,7 +92596,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7623 + return ts + 7637 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -92735,7 +93466,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20375) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20470) __169: ; update_cleanup: @@ -93041,10 +93772,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+20388, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20483, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20392, libc.VaList(bp+8, bp+216)) + ts+20487, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -93135,7 +93866,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+12110, -1) + ts+12124, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93167,7 +93898,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20465, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20469, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20560, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20564, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -93304,23 +94035,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20473) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20568) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20513) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20608) return SQLITE_ERROR __2: ; @@ -93331,7 +94064,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20556) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20651) return SQLITE_ERROR __5: ; @@ -93340,7 +94073,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1518 + zOut = ts + 1538 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -93359,7 +94092,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20574, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20669, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -93379,20 +94112,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20597) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20692) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14463) + rc = execSql(tls, db, pzErrMsg, ts+14477) if !(rc != SQLITE_OK) { goto __9 } @@ -93437,7 +94172,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20624, + ts+20719, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -93446,7 +94181,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20732, + ts+20827, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -93457,7 +94192,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20786, + ts+20881, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -93468,7 +94203,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20937, + ts+21032, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -93590,7 +94325,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -93632,7 +94367,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -93789,7 +94524,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -93813,7 +94548,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+12337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12351, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -93897,11 +94632,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+21067, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21162, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21091, + ts+21186, 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, @@ -93911,7 +94646,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21190, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21285, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -93945,7 +94680,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -93972,7 +94707,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+21209, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21304, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94010,9 +94745,9 @@ 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+21251, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21346, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3633, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3647, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -94022,7 +94757,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 + 21281 + var zFormat uintptr = ts + 21376 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94034,12 +94769,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1518) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1538) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16079, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16126, 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 @@ -94092,17 +94827,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21327, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21422, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+3633, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -94151,10 +94886,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+21327, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21422, 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) @@ -94174,8 +94909,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94188,7 +94923,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -94230,7 +94965,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -94598,7 +95333,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -94641,7 +95376,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -94668,7 +95403,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -94896,31 +95631,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21346 + return ts + 21441 } if i == -1 { - return ts + 16188 + return ts + 16235 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -94929,35 +95646,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21353, 5) + Xsqlite3_str_append(tls, pStr, ts+21448, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21359, 1) + Xsqlite3_str_append(tls, pStr, ts+21454, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12727, 1) + Xsqlite3_str_append(tls, pStr, ts+12741, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4927, 1) + Xsqlite3_str_append(tls, pStr, ts+4941, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21359, 1) + Xsqlite3_str_append(tls, pStr, ts+21454, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12727, 1) + Xsqlite3_str_append(tls, pStr, ts+12741, 1) } - Xsqlite3_str_append(tls, pStr, ts+4978, 1) + Xsqlite3_str_append(tls, pStr, ts+4992, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4927, 1) + Xsqlite3_str_append(tls, pStr, ts+4941, 1) } } @@ -94974,29 +95691,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+21361, 2) + Xsqlite3_str_append(tls, pStr, ts+21456, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21353, 5) + Xsqlite3_str_append(tls, pStr, ts+21448, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21364 + return ts + 21459 } - return ts + 21369 + return ts + 21464 }(), 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))), j, i, ts+21377) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21472) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21379) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21474) } - Xsqlite3_str_append(tls, pStr, ts+4927, 1) + Xsqlite3_str_append(tls, pStr, ts+4941, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -95037,11 +95754,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21381, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21476, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21387 + return ts + 21482 } - return ts + 21394 + return ts + 21489 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95051,43 +95768,43 @@ 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 + 10884 + zFmt = ts + 10898 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21399 + zFmt = ts + 21494 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21432 + zFmt = ts + 21527 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21457 + zFmt = ts + 21552 } else { - zFmt = ts + 21475 + zFmt = ts + 21570 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21484, 7) + Xsqlite3_str_append(tls, bp+64, ts+21579, 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 + 16188 - Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16235 + Xsqlite3_str_appendf(tls, bp+64, ts+21587, 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+21523, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21618, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21533, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21628, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21538, + Xsqlite3_str_appendf(tls, bp+64, ts+21633, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21565, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21660, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95119,25 +95836,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21576, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21671, 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+21364, 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+21459, 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+21597, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21692, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21353, 5) + Xsqlite3_str_append(tls, bp+24, ts+21448, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21364, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21459, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4927, 1) + Xsqlite3_str_append(tls, bp+24, ts+4941, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -95498,7 +96215,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -95551,104 +96268,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -95687,7 +96306,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -95707,6 +96326,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -95857,12 +96478,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -95881,13 +96502,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -95900,7 +96521,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -95962,7 +96583,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -96109,6 +96730,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -96451,13 +97074,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -96465,104 +97095,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -96571,92 +97210,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -96666,24 +97299,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -96703,152 +97336,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21605, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21700, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21620, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21715, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -96857,121 +97491,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -96980,36 +97614,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -97027,219 +97661,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -97249,24 +97883,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -97277,41 +97911,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -97345,7 +97979,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -97353,13 +97987,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -97638,7 +98272,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -97651,7 +98285,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -97675,11 +98309,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -97711,10 +98345,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16037, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15368, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14894, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21643, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16084, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15415, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14941, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21738, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -97856,7 +98490,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -97873,10 +98507,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -97933,7 +98567,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -98119,6 +98753,7 @@ __3: 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 @@ -98174,7 +98809,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -98211,12 +98846,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21745, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21745, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98295,7 +98930,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6679 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6693 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -98389,7 +99024,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21691 + return ts + 21786 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -98583,7 +99218,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -98762,7 +99397,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21698, + Xsqlite3ErrorMsg(tls, pParse, ts+21793, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -98832,6 +99467,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -98858,10 +99496,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -98881,14 +99519,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -98925,14 +99563,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -99375,6 +100013,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -99384,11 +100034,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -99483,7 +100131,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21734, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21829, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -99554,7 +100202,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21760 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21855 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -99788,7 +100436,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -99850,11 +100498,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -99922,7 +100568,7 @@ __3: 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+1454, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1474, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -100044,9 +100690,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+3633, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3633, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3647, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -100114,7 +100760,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -100463,9 +101109,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -100489,7 +101138,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -100505,32 +101155,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -100676,7 +101316,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -100919,13 +101559,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -100936,7 +101573,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -100991,31 +101629,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -101218,6 +101858,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -101349,6 +102047,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -101363,6 +102064,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -101393,7 +102097,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -101549,7 +102253,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+21771, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -101607,7 +102311,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21771, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -101965,7 +102669,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -101977,7 +102681,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -101992,7 +102696,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -102005,7 +102709,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21797, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21892, 0) rc = SQLITE_OK } else { goto __3 @@ -102106,7 +102810,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -102280,7 +102984,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -102332,7 +103036,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -102360,7 +103064,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -102381,7 +103084,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -102403,7 +103105,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -102465,9 +103167,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -102483,7 +103184,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -102503,6 +103206,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -102599,8 +103307,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21832, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21927, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -102612,7 +103320,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -102627,7 +103335,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -102647,7 +103355,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -102655,7 +103363,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -102665,7 +103373,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -102673,7 +103381,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -102705,7 +103413,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -102762,10 +103470,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -102809,16 +103517,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -102851,7 +103559,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -102863,9 +103571,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -102883,6 +103591,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -102969,7 +103729,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -103026,7 +103786,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21850, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21945, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -103049,31 +103809,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -103091,13 +103850,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21878, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21973, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -103108,169 +103867,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -103279,26 +104043,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -103306,37 +104070,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -103344,92 +104108,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -103439,24 +104209,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -103466,96 +104236,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -103563,30 +104333,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -103606,7 +104374,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -103742,11 +104510,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -103785,6 +104550,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -103957,7 +104732,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21896, -1) + pCtx, ts+21991, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104090,7 +104865,7 @@ 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+21952, -1) + pCtx, ts+22047, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104180,17 +104955,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21997)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22008)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22019)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22024)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22037)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22047)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22053)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22064)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22074)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22086)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22091)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22092)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22103)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22114)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22119)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22132)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22142)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22148)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22159)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22169)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22181)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22186)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -104236,7 +105011,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22095, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22190, libc.VaList(bp, zName)) } return p } @@ -104280,12 +105055,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+22114, 0) + ts+22209, 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+22185, 0) + ts+22280, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -104308,7 +105083,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+7848) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7862) } break } @@ -104476,7 +105251,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -104513,7 +105287,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+22248, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22343, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -104629,7 +105403,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7440)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7454)) } pSub = Xsqlite3SelectNew(tls, @@ -104743,7 +105517,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22274, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22369, 0) goto windowAllocErr __2: ; @@ -104808,15 +105582,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22306 + zErr = ts + 22401 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22323 + zErr = ts + 22418 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22339 + zErr = ts + 22434 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22359, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22454, 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 { @@ -104837,7 +105611,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+22392, 0) + ts+22487, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -104975,7 +105749,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1518, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1538, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -104993,11 +105767,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22439, - ts + 22492, - ts + 21896, - ts + 22543, - ts + 22595, + ts + 22534, + ts + 22587, + ts + 21991, + ts + 22638, + ts + 22690, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -105478,13 +106252,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1518, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1538, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -106392,19 +107170,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22645, + Xsqlite3ErrorMsg(tls, pParse, ts+22740, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19639 + return ts + 19734 } - return ts + 22687 + return ts + 22782 }(), 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+22693, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22788, 0) } } @@ -106472,7 +107250,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+22727, + Xsqlite3ErrorMsg(tls, pParse, ts+22822, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -107569,7 +108347,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22765, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22860, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -108544,21 +109322,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16188, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16235, 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+22787, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22882, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16101, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16148, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22787, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22882, 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)) @@ -109301,7 +110079,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+22814) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22909) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -109465,7 +110243,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22823, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22918, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -109682,9 +110460,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6674 + return ts + 6688 } - return ts + 6679 + return ts + 6693 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -109963,19 +110741,19 @@ 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+22847, 0) + ts+22942, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22942, 0) + ts+23037, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23026, 0) + ts+23121, 0) } break case uint32(273): @@ -110354,9 +111132,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22823, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22918, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23111, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23206, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111124,7 +111902,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23128, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23223, libc.VaList(bp, bp+2464)) break } } @@ -111145,9 +111923,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+3633, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3647, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23153, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23248, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -111160,7 +111938,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -111320,7 +112098,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23164, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23259, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -111333,11 +112111,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19759, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19854, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23266, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23176, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23271, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -111350,9 +112128,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23186, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23281, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23190, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23285, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -111462,36 +112240,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -111608,7 +112364,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -111879,16 +112635,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -111952,6 +112709,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -112002,6 +112760,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -112150,7 +112909,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -112180,7 +112939,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112195,7 +112954,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23198, 0) + ts+23293, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -112291,7 +113050,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -112302,8 +113061,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -112313,13 +113072,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -112386,23 +113145,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 23266 + var zErr uintptr = ts + 23361 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23280 + zErr = ts + 23375 break } case SQLITE_ROW: { - zErr = ts + 23302 + zErr = ts + 23397 break } case SQLITE_DONE: { - zErr = ts + 23324 + zErr = ts + 23419 break } @@ -112420,35 +113179,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23347, - ts + 23360, + ts + 23442, + ts + 23455, uintptr(0), - ts + 23376, - ts + 23401, - ts + 23415, - ts + 23434, - ts + 1454, - ts + 23459, + ts + 23471, ts + 23496, - ts + 23508, - ts + 23523, - ts + 23556, - ts + 23574, - ts + 23599, - ts + 23628, + ts + 23510, + ts + 23529, + ts + 1474, + ts + 23554, + ts + 23591, + ts + 23603, + ts + 23618, + ts + 23651, + ts + 23669, + ts + 23694, + ts + 23723, uintptr(0), - ts + 5818, - ts + 5304, - ts + 23645, - ts + 23663, - ts + 23681, + ts + 5832, + ts + 5318, + ts + 23740, + ts + 23758, + ts + 23776, uintptr(0), - ts + 23715, + ts + 23810, uintptr(0), - ts + 23736, - ts + 23762, - ts + 23785, - ts + 23806, + ts + 23831, + ts + 23857, + ts + 23880, + ts + 23901, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -112563,7 +113322,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -112608,7 +113367,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+23822, 0) + ts+23917, 0) return SQLITE_BUSY } else { @@ -112725,7 +113484,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23885, libc.VaList(bp, zName)) + ts+23980, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -112741,6 +113500,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -112750,7 +113512,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -112958,7 +113720,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+23936, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24031, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113051,7 +113813,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113121,7 +113883,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113131,7 +113893,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113163,20 +113925,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+23957, 0) + ts+24052, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -113300,7 +114062,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+24025, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24120, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -113345,10 +114107,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24031, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24126, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24041, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24136, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -113453,7 +114215,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24069, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24164, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -113464,17 +114226,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24073, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24168, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24073 + zModeType = ts + 24168 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24079, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24174, zOpt, uint64(4)) == 0) { goto __32 } @@ -113482,7 +114244,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3242 + zModeType = ts + 3256 __32: ; if !(aMode != 0) { @@ -113512,7 +114274,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24084, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24179, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -113520,7 +114282,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24104, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24199, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -113560,7 +114322,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24128, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24223, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -113584,15 +114346,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24144, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24151, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24239, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24246, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24159, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24162, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17283, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24254, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24257, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24260, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17330, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -113707,7 +114469,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -113726,8 +114488,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -113738,10 +114500,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+21691, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21786, 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+24169, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24264, 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) { @@ -113755,7 +114517,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -113772,7 +114534,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -113806,9 +114568,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6351 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6365 (*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 + 23171 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23266 (*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) @@ -113913,7 +114675,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24175 + zFilename = ts + 24270 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114016,21 +114778,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24178, + Xsqlite3_log(tls, iErr, ts+24273, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24203) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24298) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24223) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24318) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24230) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24325) } // This is a convenience routine that makes sure that all thread-specific @@ -114141,7 +114903,7 @@ __4: 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 + 1083 + zDataType = ts + 1103 primarykey = 1 __13: ; @@ -114188,14 +114950,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24247, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24342, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3633 + return ts + 3647 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -114265,6 +115027,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -114841,7 +115606,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24275, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24370, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -114874,7 +115639,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -114885,7 +115650,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -114959,7 +115724,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 + 24283 + return ts + 24378 } return uintptr(0) }(), 0) @@ -115054,7 +115819,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -115137,7 +115902,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6151, ts + 6674, ts + 6679, ts + 6161, ts + 6156, ts + 7915, ts + 24306, ts + 24312, + ts + 6165, ts + 6688, ts + 6693, ts + 6175, ts + 6170, ts + 7929, ts + 24401, ts + 24407, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -115290,7 +116055,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 + 24319 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24414 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -115316,7 +116081,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6151, uint32(4)) + jsonAppendRaw(tls, p, ts+6165, uint32(4)) break } @@ -115345,7 +116110,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24336, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24431, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -115403,19 +116168,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+6151, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6165, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6674, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6688, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6679, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6693, uint32(5)) break } @@ -115960,17 +116725,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6151, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6165, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6674, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6688, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+6679, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6693, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116071,7 +116836,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+24365, -1) + Xsqlite3_result_error(tls, pCtx, ts+24460, -1) } } jsonParseReset(tls, pParse) @@ -116377,7 +117142,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+24380, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24475, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -116392,7 +117157,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24384, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24479, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -116446,7 +117211,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24410, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24505, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -116551,11 +117316,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24453, uint32(2)) + jsonAppendRaw(tls, bp, ts+24548, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+4968, uint32(2)) + jsonAppendRaw(tls, bp, ts+4982, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24456, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24551, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -116596,7 +117361,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+6151, uint32(4)) + jsonAppendRaw(tls, bp, ts+6165, uint32(4)) } } if i == argc { @@ -116712,14 +117477,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24459, -1) + ts+24554, -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+24510, -1) + Xsqlite3_result_error(tls, ctx, ts+24605, -1) jsonReset(tls, bp) return } @@ -116814,7 +117579,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15301) + jsonWrongNumArgs(tls, ctx, ts+15348) return __2: ; @@ -116889,9 +117654,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24544 + return ts + 24639 } - return ts + 24548 + return ts + 24643 }()) return __2: @@ -117024,7 +117789,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24555, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24650, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117121,7 +117886,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24653, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117165,7 +117930,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24561) + ts+24656) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -117296,7 +118061,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24644, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24739, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -117315,7 +118080,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+24650, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24745, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -117411,7 +118176,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24650, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24745, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -117435,7 +118200,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 + 24655 + zRoot = ts + 24750 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -117551,7 +118316,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+24365, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24460, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -117646,25 +118411,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 24657}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24662}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24673}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24673}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 24704}, - {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 + 24707}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24711}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24723}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24735}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24746}, + {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 + 24757}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24769}, - {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 + 24782}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24791}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24801}, - {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 + 24812}, - {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 + 24829}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, + {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), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24799}, + {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 + 24802}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24806}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24818}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24830}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24841}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24852}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24864}, + {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 + 24877}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24886}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24896}, + {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 + 24907}, + {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 + 24924}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -117683,8 +118448,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24847, FpModule: 0}, - {FzName: ts + 24857, FpModule: 0}, + {FzName: ts + 24942, FpModule: 0}, + {FzName: ts + 24952, FpModule: 0}, } type Rtree1 = struct { @@ -117944,11 +118709,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+24867, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24962, 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+24875, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24970, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -118159,7 +118924,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24880, + ts+24975, 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)) @@ -118862,7 +119627,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24962) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25057) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -119074,7 +119839,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+3633, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -120203,7 +120968,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24976, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25071, 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 { @@ -120215,12 +120980,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24996, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25091, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25028, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25123, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -120261,7 +121026,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -120446,7 +121211,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25065, 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+25160, 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)) @@ -120469,14 +121234,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25210 + var zFmt uintptr = ts + 25305 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11256, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11270, 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 { @@ -120517,7 +121282,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25266, ts + 5030, ts + 16188, + ts + 25361, ts + 5044, ts + 16235, } var rtreeModule = Sqlite3_module{ @@ -120560,19 +121325,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+25271, + ts+25366, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25333, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25428, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25338, + ts+25433, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25402, + ts+25497, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25472, + ts+25567, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -120601,7 +121366,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25521 + zFormat = ts + 25616 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -120613,7 +121378,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+25629, + ts+25724, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -120621,18 +121386,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+25674, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25769, 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+12727, 1) + Xsqlite3_str_append(tls, p, ts+12741, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25701, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25796, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25723, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25818, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25731, 0) + Xsqlite3_str_appendf(tls, p, ts+25826, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -120647,14 +121412,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25747, - ts + 25800, - ts + 25845, - ts + 25897, - ts + 25951, - ts + 25996, - ts + 26054, - ts + 26109, + ts + 25842, + ts + 25895, + ts + 25940, + ts + 25992, + ts + 26046, + ts + 26091, + ts + 26149, + ts + 26204, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -120683,7 +121448,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26156, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26251, 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 @@ -120691,19 +121456,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+26176, + ts+26271, 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+3633, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, 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+26233, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26328, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -120745,16 +121510,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 26268, - ts + 26311, - ts + 26346, - ts + 26382, + ts + 26363, + ts + 26406, + ts + 26441, + ts + 26477, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -120779,7 +121544,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26419, + Xsqlite3_str_appendf(tls, pSql, ts+26514, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -120791,7 +121556,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26443, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26538, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -120814,7 +121579,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26449, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26544, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -120825,14 +121590,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, 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+3633, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -120875,7 +121640,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -120892,7 +121657,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -120910,7 +121675,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26452, ts + 26463} +var azFormat = [2]uintptr{ts + 26547, ts + 26558} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -120948,13 +121713,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10828, 1) + Xsqlite3_str_append(tls, pOut, ts+10842, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26473, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26568, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26479, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26574, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26483, 1) + Xsqlite3_str_append(tls, pOut, ts+26578, 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}))) @@ -120965,7 +121730,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+26485, -1) + Xsqlite3_result_error(tls, ctx, ts+26580, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121043,12 +121808,12 @@ 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+26518, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26613, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 4032 + return ts + 4046 } - return ts + 1518 + return ts + 1538 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -121067,7 +121832,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+26525, + ts+26620, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121086,7 +121851,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+26570, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26665, libc.VaList(bp+16, iNode)) } } @@ -121100,8 +121865,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 26602, - ts + 26656, + ts + 26697, + ts + 26751, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -121116,23 +121881,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+26704, + rtreeCheckAppendMsg(tls, pCheck, ts+26799, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26749 + return ts + 26844 } - return ts + 26757 + return ts + 26852 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26766, + ts+26861, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26749 + return ts + 26844 } - return ts + 26757 + return ts + 26852 }(), iKey, iVal)) } } @@ -121156,7 +121921,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+26824, libc.VaList(bp, i, iCell, iNode)) + ts+26919, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121176,7 +121941,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+26872, libc.VaList(bp+24, i, iCell, iNode)) + ts+26967, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121193,14 +121958,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+26939, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27034, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26973, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27068, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121208,7 +121973,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+27003, + ts+27098, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -121237,14 +122002,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27058, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27153, 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+27089, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27184, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -121266,12 +122031,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14463, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14477, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27156, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27251, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -121280,12 +122045,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24976, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25071, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27184, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27279, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -121299,8 +122064,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+27215, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27222, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27310, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27317, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -121308,7 +122073,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27230, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27325, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -121323,7 +122088,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27234, -1) + ts+27329, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -121331,7 +122096,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6351 + zDb = ts + 6365 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -121341,7 +122106,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 17825 + return ts + 17953 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -121710,11 +122475,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+27285, 1) + Xsqlite3_str_append(tls, x, ts+27380, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27287, 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+27382, 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+27298, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27393, 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) } @@ -121734,19 +122499,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+27309, 0) + Xsqlite3_str_appendf(tls, x, ts+27404, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27327, 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+27422, 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+27335, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27430, 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+27343, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27438, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27347, 0) + Xsqlite3_str_appendf(tls, x, ts+27442, 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) } @@ -122652,7 +123417,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27360, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27455, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -122661,7 +123426,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27382, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27477, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -122669,7 +123434,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26449, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26544, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -122680,7 +123445,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -122705,7 +123470,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -122894,7 +123659,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16188 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16235 (*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 @@ -122904,7 +123669,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27386 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27481 (*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 @@ -122912,7 +123677,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27392 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27487 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123024,7 +123789,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27401, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27496, 0) __4: ; goto geopoly_update_end @@ -123154,14 +123919,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+27441) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27536) == 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+27457) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27552) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123226,7 +123991,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27472, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27567, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -123238,25 +124003,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27480}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27493}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27506}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27519}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27457}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27531}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27441}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27554}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27568}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27581}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27595}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27611}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27575}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27588}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27601}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27614}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27626}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27536}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27649}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27663}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27676}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27690}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27706}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27623}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27718}, } // Register the r-tree module with database handle db. This creates the @@ -123266,26 +124031,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27642, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27737, 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+27652, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27747, 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+27663, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27758, -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+27386, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27481, 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+27674, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27769, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -123339,7 +124104,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24962, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25057, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -123406,6 +124171,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -123664,7 +124431,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27684, -1) + Xsqlite3_result_error(tls, context, ts+27779, -1) return } @@ -123675,7 +124442,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+27684, -1) + Xsqlite3_result_error(tls, context, ts+27779, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -123688,7 +124455,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -123700,7 +124467,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -123776,7 +124543,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27705, uintptr(0), uintptr(0), p+64) + ts+27800, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -123840,7 +124607,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+24875, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24970, 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++ { } @@ -123861,16 +124628,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27876, libc.VaList(bp, func() uintptr { + ts+27971, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28026 + return ts + 28121 } - return ts + 1518 + return ts + 1538 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28067) + ts+28162) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -123968,7 +124735,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -123986,7 +124753,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+28192, libc.VaList(bp, zTab))) + ts+28287, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124004,7 +124771,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+28311, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28406, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124022,7 +124789,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28332, libc.VaList(bp+16, zIdx))) + ts+28427, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124045,7 +124812,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28383, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28478, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124091,7 +124858,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28404, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28499, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124106,7 +124873,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+28432, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28527, 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)), 1) if iCid >= 0 { @@ -124146,7 +124913,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+19285, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19380, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124156,18 +124923,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28461, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28556, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+28480, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28575, 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+28485, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28580, zName) { bRbuRowid = 1 } } @@ -124179,18 +124946,18 @@ 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+28495, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28590, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28524 + return ts + 28619 } - return ts + 28537 + return ts + 28632 }())) } 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+28546, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28641, 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)), 1) @@ -124204,7 +124971,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+28568, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28663, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -124247,12 +125014,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+28595, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14574 + zList = rbuMPrintf(tls, p, ts+28690, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14588 } return zList } @@ -124263,13 +125030,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+28604, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -124291,25 +125058,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+28617, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28712, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28649, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28744, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14574, ts+28672) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28678, ts+28685, ts+4927) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14574, ts+1518) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+28767) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28773, ts+28780, ts+4941) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+1538) 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+28693, + ts+28788, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+28735, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28830, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -124346,12 +125113,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1518 + zSep = ts + 1538 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28527, 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 @@ -124386,7 +125153,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28755 + zCol = ts + 28850 __7: ; goto __5 @@ -124394,13 +125161,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28763, + zLhs = rbuMPrintf(tls, p, ts+28858, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28784, + zOrder = rbuMPrintf(tls, p, ts+28879, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28820, + zSelect = rbuMPrintf(tls, p, ts+28915, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14574 + zSep = ts + 14588 iCol++ goto __1 __2: @@ -124418,12 +125185,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28847, + Xsqlite3_mprintf(tls, ts+28942, 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 + 1518 + zSep = ts + 1538 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -124445,8 +125212,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28895, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14574 + zVector = rbuMPrintf(tls, p, ts+28990, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14588 goto __15 __15: iCol++ @@ -124457,7 +125224,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28902, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28997, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -124484,13 +125251,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1518 - var zAnd uintptr = ts + 1518 + var zCom uintptr = ts + 1538 + var zAnd uintptr = ts + 1538 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -124502,9 +125269,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28914, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29009, 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 + zType = ts + 1538 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -124514,37 +125281,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 + 28755 + zCol = ts + 28850 } else { - zCol = ts + 28485 + zCol = ts + 28580 } - zType = ts + 1083 + zType = ts + 1103 } 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+28936, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29031, 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 + 28672 + return ts + 28767 } - return ts + 1518 + return ts + 1538 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28956, + zImpPK = Xsqlite3_mprintf(tls, ts+29051, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28977, + zImpCols = Xsqlite3_mprintf(tls, ts+29072, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29010, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29105, 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 + 14574 - zAnd = ts + 21353 + zCom = ts + 14588 + zAnd = ts + 21448 nBind++ } @@ -124578,16 +125345,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1518 + var zS uintptr = ts + 1538 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+29034, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29129, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29046, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29141, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14574 + zS = ts + 14588 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -124595,7 +125362,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29055, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29150, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -124607,27 +125374,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+29070, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29165, 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 zSep uintptr = ts + 1538 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+29084, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21353 + zList = rbuMPrintf(tls, p, ts+29179, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21448 } } zList = rbuMPrintf(tls, p, - ts+29096, libc.VaList(bp+40, zList)) + ts+29191, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+29146, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21353 + zList = rbuMPrintf(tls, p, ts+29241, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21448 } } } @@ -124636,7 +125403,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29159, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29254, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -124650,21 +125417,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+29146, + zList = rbuMPrintf(tls, p, ts+29241, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14574 + zSep = ts + 14588 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29185, + zList = rbuMPrintf(tls, p, ts+29280, 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 + 14574 + zSep = ts + 14588 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29215, + zList = rbuMPrintf(tls, p, ts+29310, 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 + 14574 + zSep = ts + 14588 } } } @@ -124699,19 +125466,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29252 + var zSep uintptr = ts + 29347 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28404, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28499, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16076) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16123) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp+8, zIdx))) } break } @@ -124723,15 +125490,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28672 + zDesc = ts + 28767 } else { - zDesc = ts + 1518 + zDesc = ts + 1538 } - z = rbuMPrintf(tls, p, ts+29265, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14574 + z = rbuMPrintf(tls, p, ts+29360, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14588 } } - z = rbuMPrintf(tls, p, ts+29276, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -124746,12 +125513,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1518 + var zComma uintptr = ts + 1538 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29280) + ts+29375) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -124760,7 +125527,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28432, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -124770,25 +125537,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+29330, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29425, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29352, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29447, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28672 + return ts + 28767 } - return ts + 1518 + return ts + 1538 }())) - zComma = ts + 14574 + zComma = ts + 14588 } } - zCols = rbuMPrintf(tls, p, ts+29362, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29457, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29377, + ts+29472, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) } } @@ -124798,50 +125565,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1518 + var zComma uintptr = ts + 1538 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1518 + var zPk uintptr = ts + 1538 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, (*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 { - zPk = ts + 29439 + zPk = ts + 29534 } - zSql = rbuMPrintf(tls, p, ts+29452, + zSql = rbuMPrintf(tls, p, ts+29547, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29479 + return ts + 29574 } - return ts + 1518 + return ts + 1538 }())) - zComma = ts + 14574 + zComma = ts + 14588 } 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+29489, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29584, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29496, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29591, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29528 + return ts + 29623 } - return ts + 1518 + return ts + 1538 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) } } @@ -124854,7 +125621,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29543, + ts+29638, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -124891,7 +125658,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29600) + ts+29695) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -124996,7 +125763,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+29666, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29761, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125016,24 +125783,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29686, + ts+29781, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+29751, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29846, libc.VaList(bp+128, zTbl, zBind))) } 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+29787, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29882, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125049,7 +125816,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29821, + ts+29916, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125057,31 +125824,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29882 + return ts + 29977 } - return ts + 29886 + return ts + 29981 }() } - return ts + 1518 + return ts + 1538 }(), 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+29892, + ts+29987, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29953, + ts+30048, 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 + 29882 + return ts + 29977 } - return ts + 29886 + return ts + 29981 }(), zCollist, zLimit)) } @@ -125106,8 +125873,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+6362) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6358) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6376) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6372) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125116,52 +125883,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1518 + return ts + 1538 } - return ts + 30112 + return ts + 30207 }() 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+30121, + ts+30216, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30157 + return ts + 30252 } - return ts + 1518 + return ts + 1538 }(), zBindings))) } 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+30167, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30262, 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 + var zRbuRowid uintptr = ts + 1538 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30195 + zRbuRowid = ts + 30290 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30207, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30302, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30283 + return ts + 30378 } - return ts + 1518 + return ts + 1538 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30300, + ts+30395, 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+30599, + ts+30694, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125169,14 +125936,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1518 + var zRbuRowid uintptr = ts + 1538 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30698 + zRbuRowid = ts + 30793 } else { - zRbuRowid = ts + 30708 + zRbuRowid = ts + 30803 } } @@ -125189,35 +125956,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28755, 0) + zOrder = rbuMPrintf(tls, p, ts+28850, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14574, ts+1518) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+1538) } } 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+30719, + ts+30814, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30767 + return ts + 30862 } - return ts + 1518 + return ts + 1538 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if zOrder != 0 { - return ts + 19639 + return ts + 19734 } - return ts + 1518 + return ts + 1538 }(), zOrder, zLimit))) } @@ -125280,12 +126047,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1518 + var zPrefix uintptr = ts + 1538 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30112 + zPrefix = ts + 30207 } - zUpdate = Xsqlite3_mprintf(tls, ts+30773, + zUpdate = Xsqlite3_mprintf(tls, ts+30868, 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) @@ -125312,7 +126079,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -125344,7 +126111,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30803, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30898, 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)), 0) { case RBU_STATE_STAGE: @@ -125414,28 +126181,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+6351, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365, 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+6351) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30833, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30928, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30860, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+3256, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30956, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3270, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6351, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6365, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30878, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30974, 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+6351, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -125468,11 +126235,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+30944, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31040, 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+24025, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24120, (*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)))) == '?' { @@ -125484,16 +126251,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30976, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6351), + zTarget = Xsqlite3_mprintf(tls, ts+31072, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365), func() uintptr { if zExtra == uintptr(0) { - return ts + 1518 + return ts + 1538 } - return ts + 31008 + return ts + 31104 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1518 + return ts + 1538 } return zExtra }())) @@ -125509,37 +126276,37 @@ 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+31010, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31106, -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+31025, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31121, 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+31042, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31138, -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+6351, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31058, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31154, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 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+31086, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31182, 0) } } @@ -125568,14 +126335,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+31058, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31154, uintptr(0), uintptr(0), uintptr(0)) } } 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+31104, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31200, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -125684,7 +126451,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6351, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6365, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -125701,23 +126468,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+31139, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31235, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6351) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6351) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365) } - zOal = Xsqlite3_mprintf(tls, ts+31164, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31171, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31260, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31267, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -125738,12 +126505,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -125837,7 +126601,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+23663, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23758, 0) return } @@ -125930,7 +126694,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31178) + ts+31274) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -125938,7 +126702,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31200, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31296, libc.VaList(bp, iCookie+1)) } } } @@ -125959,7 +126723,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31227, + ts+31323, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -125989,9 +126753,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31385, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31481, 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+31400, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31496, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126005,10 +126769,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31420, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31516, 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+31445) + ts+31541) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126022,12 +126786,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31553) + ts+31649) } 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+31618) + ts+31714) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126039,7 +126803,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31662, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31758, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126059,15 +126823,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+17161) - rbuCopyPragma(tls, p, ts+16272) + rbuCopyPragma(tls, p, ts+17208) + rbuCopyPragma(tls, p, ts+16319) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+31687, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31783, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126091,10 +126855,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14492, 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14492, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126189,7 +126953,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31715, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31811, 0) } if rc == SQLITE_OK { @@ -126205,7 +126969,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31164, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31260, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -126221,7 +126985,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31740, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31836, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -126255,7 +127019,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31751, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31847, 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)), -1) } else { @@ -126285,13 +127049,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31823, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31919, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31837) + ts+31933) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -126302,7 +127066,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+31894) + ts+31990) 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)), 0) @@ -126332,10 +127096,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -126346,7 +127111,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+3633, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3647, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -126375,7 +127140,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+31968, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32064, 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 @@ -126393,12 +127158,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32000, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32096, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32032 + return ts + 32128 } - return ts + 32039 + return ts + 32135 }())) } } @@ -126406,7 +127171,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+14463, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14477, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -126417,19 +127182,19 @@ 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+16875) - rbuCopyPragma(tls, p, ts+16287) + rbuCopyPragma(tls, p, ts+16922) + rbuCopyPragma(tls, p, ts+16334) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32046, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32142, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6351, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6365, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32062, uintptr(0), uintptr(0), p+64) + db, ts+32158, uintptr(0), uintptr(0), p+64) } } @@ -126483,7 +127248,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32086, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32182, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -126510,7 +127275,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+30112, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30207, 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++ @@ -126527,7 +127292,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14492, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -126540,13 +127305,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+14478, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14492, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+32094, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32190, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -126641,7 +127406,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14478, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14492, uintptr(0), uintptr(0), uintptr(0)) } } @@ -126658,19 +127423,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14478, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14492, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14463 + zBegin = ts + 14477 } else { - zBegin = ts + 32046 + zBegin = ts + 32142 } 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+32046, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32142, uintptr(0), uintptr(0), uintptr(0)) } } @@ -126678,6 +127443,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -126696,7 +127483,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -126991,7 +127778,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32121, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32217, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127016,7 +127803,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+32144, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32240, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127061,7 +127848,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -129872,7 +130659,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -129914,7 +130701,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -129975,7 +130762,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -130049,13 +130836,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -130117,7 +130904,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -130129,6 +130916,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -130481,7 +131277,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -130649,45 +131445,45 @@ 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+11256) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11270) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 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+32731, bp+16) + sessionAppendStr(tls, bp, ts+32827, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32744, bp+16) + sessionAppendStr(tls, bp, ts+32840, bp+16) 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+32750, bp+16) + sessionAppendStr(tls, bp, ts+32846, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14574 + zSep = ts + 14588 } } - zSep = ts + 1518 - sessionAppendStr(tls, bp, ts+32679, bp+16) + zSep = ts + 1538 + sessionAppendStr(tls, bp, ts+32775, 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+32755, bp+16) + ts+32851, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32687, bp+16) + sessionAppendStr(tls, bp, ts+32783, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21353 + zSep = ts + 21448 } } @@ -130734,42 +131530,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1518 + var zSep uintptr = ts + 1538 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32830, bp+16) + sessionAppendStr(tls, bp, ts+32926, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32679, bp+16) + sessionAppendStr(tls, bp, ts+32775, 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+32750, bp+16) + sessionAppendStr(tls, bp, ts+32846, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21353 + zSep = ts + 21448 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32848, bp+16) + sessionAppendStr(tls, bp, ts+32944, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32391, bp+16) + sessionAppendStr(tls, bp, ts+32487, bp+16) - zSep = ts + 1518 + zSep = ts + 1538 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+32687, bp+16) + sessionAppendStr(tls, bp, ts+32783, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32856 + zSep = ts + 32952 } } - sessionAppendStr(tls, bp, ts+4927, bp+16) + sessionAppendStr(tls, bp, ts+4941, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -130782,7 +131578,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+6351, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6365, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -130793,21 +131589,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32861, bp+16) + sessionAppendStr(tls, bp, ts+32957, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21359, bp+16) + sessionAppendStr(tls, bp, ts+21454, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14574, bp+16) + sessionAppendStr(tls, bp, ts+14588, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32879, bp+16) + sessionAppendStr(tls, bp, ts+32975, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32890, bp+16) + sessionAppendStr(tls, bp, ts+32986, bp+16) } - sessionAppendStr(tls, bp, ts+4927, bp+16) + sessionAppendStr(tls, bp, ts+4941, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -130821,14 +131617,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+11256, p) + var rc int32 = sessionSelectRow(tls, db, ts+11270, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32894) + ts+32990) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33007) + ts+33103) } return rc } @@ -130856,7 +131652,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131109,7 +131905,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+33151, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33247, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131125,7 +131921,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+33172, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33268, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131198,10 +131994,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+33191, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33287, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33217, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33313, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -131234,7 +132030,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+3633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -131247,7 +132043,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6351, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6365, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -131260,19 +132056,19 @@ 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+33247, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33343, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33291, + ts+33387, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+33362, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33458, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11256) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11270) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -131323,14 +132119,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33422, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33518, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33452, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33548, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33476, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33452, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33572, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33548, uintptr(0), uintptr(0), uintptr(0)) } } @@ -131844,7 +132640,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -132578,7 +133374,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33504, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33600, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -132866,7 +133662,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33532, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33628, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133053,7 +133849,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+33563, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33659, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133121,7 +133917,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33570 + var zErr uintptr = ts + 33666 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133280,7 +134076,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1518 + return ts + 1538 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -133303,7 +134099,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33620 + var zErr uintptr = ts + 33716 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -133627,13 +134423,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33668, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33764, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33676, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33772, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33686, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33782, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134044,7 +134840,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6151, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6165, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -134184,7 +134980,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33691, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33787, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -134211,14 +135007,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+33698, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33794, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33729, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33825, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134229,7 +135025,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33762, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33858, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -134242,7 +135038,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33799, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33895, 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))) @@ -134251,7 +135047,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+33808, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33904, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -134270,7 +135066,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33841, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33937, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -134285,14 +135081,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33875, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33971, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33883, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+33915, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34011, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -134300,9 +135096,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33921, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34017, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33935, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34031, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -134310,9 +135106,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33973, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34069, 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+33984, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34080, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -134320,21 +135116,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+5045, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5059, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7928, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17266}, - {FzName: ts + 34019, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7942, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17313}, + {FzName: ts + 34115, 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+34027, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34123, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34058, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34154, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -134381,15 +135177,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22019) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16188) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34086, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22114) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16235) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34182, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34116) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34212) { *(*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+34126, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34222, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -134406,13 +135202,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34157, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34253, 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+34162, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34258, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34169, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34265, libc.VaList(bp+16, i)) } } } @@ -134450,8 +135246,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+22019) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34177, 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+22114) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34273, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -134483,7 +135279,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+34206, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34302, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -134492,13 +135288,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1518 + return ts + 1538 }(), pzErr) } else { @@ -134520,19 +135316,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 + 33875 + zTail = ts + 33971 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34226 + zTail = ts + 34322 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34234, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34330, 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+16188, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16235, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -134576,18 +135372,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34245, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34341, 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 + 1538 } - return ts + 14574 + return ts + 14588 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34261, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34268, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22019)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34364, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22114)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -134697,7 +135493,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34390) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -134707,7 +135503,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+34299) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34395) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -134717,7 +135513,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+34308) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34404) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -134730,7 +135526,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+34318) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34414) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -134740,7 +135536,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+34328) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34424) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -134756,7 +135552,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+22019) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22114) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -134779,7 +135575,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34340 + var zSelect uintptr = ts + 34436 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -134801,7 +135597,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34372) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34468) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -134815,7 +135611,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34380, + ts+34476, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -134913,7 +135709,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34445, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34541, 0) return FTS5_EOF } } @@ -134926,20 +135722,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+34465, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34561, 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+34496, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34592, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34595, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29882, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29977, uint64(3)) == 0 { tok = FTS5_AND } break @@ -136706,9 +137502,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34503, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34599, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33532, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33628, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -136724,7 +137520,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+34508, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34604, 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') @@ -136811,7 +137607,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20356, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20451, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -136892,7 +137688,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34537, 0) + ts+34633, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137062,12 +137858,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+34590, + ts+34686, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34640 + return ts + 34736 } - return ts + 34503 + return ts + 34599 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138010,7 +138806,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+34647, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34743, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -138089,7 +138885,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+34653, + ts+34749, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138114,7 +138910,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34704, + ts+34800, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -138137,7 +138933,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+34753, + ts+34849, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -138376,7 +139172,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+34793, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34889, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -138449,13 +139245,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -139575,7 +140371,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+34816, + ts+34912, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -140768,7 +141564,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1518 + return ts + 1538 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -140934,10 +141730,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -140965,7 +141761,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -141041,7 +141837,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+34900, + ts+34996, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -141084,7 +141880,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -141096,7 +141892,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -141216,7 +142012,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -141615,12 +142411,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -141631,7 +142427,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -141812,7 +142608,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -141936,7 +142732,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -141945,7 +142741,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -141977,8 +142773,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -142031,8 +142827,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -142102,7 +142898,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1518, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1538, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -142118,13 +142914,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+34957, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35053, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24875, ts+34965, 0, pzErr) + pConfig, ts+24970, ts+35061, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11396, - ts+35000, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11410, + ts+35096, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -142377,7 +143173,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+34647, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34743, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -142491,7 +143287,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35044, + ts+35140, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -142650,6 +143446,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -142657,7 +143457,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+35130) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35226) 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)) @@ -142928,7 +143728,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+35135, 0) + ts+35231, 0) return SQLITE_ERROR } @@ -142959,7 +143759,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4945, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4959, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -142974,7 +143774,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4945, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4959, 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) @@ -143288,7 +144088,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -143320,7 +144120,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -143352,25 +144152,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35174, + ts+35270, 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 + 14574 + return ts + 14588 } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1518 + return ts + 1538 }(), func() uintptr { if bDesc != 0 { - return ts + 35229 + return ts + 35325 } - return ts + 35234 + return ts + 35330 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -143416,12 +144216,12 @@ 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+35238, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35334, 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+5027, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5041, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35244, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35340, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -143452,7 +144252,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35272, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35368, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -143483,7 +144283,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+35282, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35378, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -143515,14 +144315,14 @@ 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+35303, libc.VaList(bp, z)) + ts+35399, 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 + 33686 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33782 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -143578,7 +144378,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+35135, 0) + ts+35231, 0) return SQLITE_ERROR __1: ; @@ -143621,7 +144421,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1518 + zText = ts + 1538 __14: ; iCol = 0 @@ -143795,7 +144595,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35336, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35432, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -143916,7 +144716,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+3633, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3647, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -143940,28 +144740,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35372, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35468, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35383, 0) + ts+35479, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35463, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35559, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35471, 0) + ts+35567, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16855, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16902, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35527, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35623, 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+35533, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35629, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144019,7 +144819,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+17400, z) { + 0 == Xsqlite3_stricmp(tls, ts+17447, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -144032,12 +144832,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35549, + ts+35645, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20257 + return ts + 20352 } - return ts + 35586 + return ts + 35682 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -144667,7 +145467,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+35598, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35694, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -144911,7 +145711,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+35619, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35715, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -144930,7 +145730,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+35641, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35737, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -144977,7 +145777,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35672) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35768) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -144986,7 +145786,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35685, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35781, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145000,7 +145800,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35776, ts + 33875, ts + 24875, ts + 34226, ts + 11396, + ts + 35872, ts + 33971, ts + 24970, ts + 34322, ts + 11410, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145024,7 +145824,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+35783, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35879, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145042,13 +145842,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35879, 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+35788, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35884, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145103,17 +145903,17 @@ 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)) = [11]uintptr{ - ts + 35803, - ts + 35871, - ts + 35940, - ts + 35973, - ts + 36012, - ts + 36052, - ts + 36091, - ts + 36132, - ts + 36171, - ts + 36213, - ts + 36253, + ts + 35899, + ts + 35967, + ts + 36036, + ts + 36069, + ts + 36108, + ts + 36148, + ts + 36187, + ts + 36228, + ts + 36267, + ts + 36309, + ts + 36349, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -145180,7 +145980,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+3633, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3647, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -145215,18 +146015,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36276, + ts+36372, 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+36380, + ts+36476, 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+36418, + ts+36514, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -145238,7 +146038,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36456, + ts+36552, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -145250,14 +146050,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24875, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11396, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35776, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24970, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11410, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35872, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34226, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34322, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33875, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33971, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -145269,17 +146069,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36498, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36594, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29528 + return ts + 29623 } - return ts + 1518 + return ts + 1538 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36528, + ts+36624, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -145316,27 +146116,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36572, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36668, 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+36595, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36691, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33875, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33971, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34226, ts+36601, 0, pzErr) + pConfig, ts+34322, ts+36697, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35776, ts+36633, 1, pzErr) + pConfig, ts+35872, ts+36729, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34372, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34468, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -145542,12 +146342,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36650, + ts+36746, 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+36700, + ts+36796, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -145555,7 +146355,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34372, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34468, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -145731,7 +146531,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36729, + zSql = Xsqlite3_mprintf(tls, ts+36825, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -145913,14 +146713,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33875, bp+48) + rc = fts5StorageCount(tls, p, ts+33971, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34226, bp+56) + rc = fts5StorageCount(tls, p, ts+34322, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146115,9 +146915,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+36761) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36857) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36772) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36868) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -146332,7 +147132,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 + 36783 + var zCat uintptr = ts + 36879 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -146344,7 +147144,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36792) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36888) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -146355,18 +147155,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+36803) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36899) { 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+36761) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36857) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36772) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36868) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36792) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36888) { } else { rc = SQLITE_ERROR } @@ -146642,7 +147442,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)) = uintptr(0) - var zBase uintptr = ts + 36821 + var zBase uintptr = ts + 36917 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -146784,7 +147584,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36831, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36927, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146792,11 +147592,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36930, 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+36839, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36935, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -146804,7 +147604,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36844, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146812,7 +147612,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146820,11 +147620,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, 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+36855, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -146832,19 +147632,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36956, 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+36864, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36960, 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+36870, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36966, 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+36875, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36971, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146852,11 +147652,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36879, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36975, 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+36883, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -146864,7 +147664,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36982, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146872,11 +147672,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36890, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36986, 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+36894, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36990, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146884,7 +147684,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36898, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146892,7 +147692,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146900,7 +147700,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -146916,24 +147716,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36910, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36890, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36916, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37012, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36920, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36906, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37016, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -146948,137 +147748,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+36923, aBuf+uintptr(nBuf-7), uint64(7)) { + 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+36890, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36931, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37027, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36938, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37034, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36839, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36935, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37044, 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+36930, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, 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+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36958, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15401, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15448, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36963, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36916, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37012, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } 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+37068, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36875, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36971, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36978, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37074, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36982, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37078, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36984, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37080, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36898, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36994, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36990, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37086, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36906, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37094, 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+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36890, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36986, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37105, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37111, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36902, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36998, 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+37119, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37031, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37127, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37131, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36898, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36994, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37139, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37049, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37145, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36902, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36998, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37151, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36916, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37012, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147093,16 +147893,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37062, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37158, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37163, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147110,21 +147910,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37168, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37078, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36847, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147132,7 +147932,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37180, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147140,9 +147940,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37090, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37186, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36831, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147157,12 +147957,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+37096, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37192, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37100, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37196, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37199, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147171,7 +147971,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -147327,7 +148127,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+37110) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37206) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -147507,22 +148307,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36821, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36917, 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 + 37125, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37221, 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 + 37131, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37227, 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 + 37138, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37234, 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 @@ -148665,14 +149465,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+37146) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37242) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37150) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37246) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37154) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37250) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37163, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37259, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -148698,19 +149498,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 37197, - ts + 37237, - ts + 37272, + ts + 37293, + ts + 37333, + ts + 37368, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23171, *(*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+23266, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37315, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37411, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -148843,11 +149643,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+37348, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37444, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37379, + ts+37475, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -148871,7 +149671,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37430, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37526, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -149155,7 +149955,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1518 + zCopy = ts + 1538 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -149266,7 +150066,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37456, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37552, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -149288,7 +150088,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 37466 + return ts + 37562 } func init() { @@ -149829,7 +150629,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -150139,16 +150939,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -150205,12 +151005,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -150225,6 +151025,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -150246,5 +151047,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.39.4\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=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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.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_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 f251811317..740fae3aae 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-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -4194,7 +4194,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -10935,7 +10934,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -10948,49 +10947,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -10999,21 +10998,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -11025,8 +11024,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -11038,22 +11037,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -11061,13 +11060,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -11082,13 +11081,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 ORD_LANGDRIVER = 1 OR_INVALID_OID = 1911 @@ -14638,7 +14637,7 @@ const ( SQLITE_DEFAULT_FILE_FORMAT = 4 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -14733,6 +14732,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -14867,6 +14867,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -14899,6 +14900,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -14998,6 +15000,7 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 0 @@ -15077,7 +15080,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -15188,8 +15191,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -17105,6 +17108,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WHITEONBLACK = 2 @@ -22198,7 +22202,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -22529,6 +22542,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -22539,6 +22553,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -24293,6 +24325,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -24332,6 +24375,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -24382,7 +24426,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -24397,6 +24441,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -24768,8 +24813,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -24786,7 +24830,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -25048,8 +25091,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -25394,17 +25437,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -25434,7 +25466,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 46, @@ -25443,49 +25482,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 112, ts + 142, ts + 162, - ts + 185, - ts + 210, - ts + 237, - ts + 262, - ts + 284, - ts + 316, - ts + 342, - ts + 367, - ts + 390, - ts + 402, - ts + 417, - ts + 439, - ts + 464, - ts + 487, - ts + 509, - ts + 520, - ts + 533, - ts + 548, - ts + 564, - ts + 577, - ts + 598, - ts + 622, - ts + 645, - ts + 661, - ts + 677, - ts + 701, - ts + 728, + ts + 182, + ts + 205, + ts + 230, + ts + 257, + ts + 282, + ts + 304, + ts + 336, + ts + 362, + ts + 387, + ts + 410, + ts + 422, + ts + 437, + ts + 459, + ts + 484, + ts + 507, + ts + 529, + ts + 540, + ts + 553, + ts + 568, + ts + 584, + ts + 597, + ts + 618, + ts + 642, + ts + 665, + ts + 681, + ts + 697, + ts + 721, ts + 748, - ts + 769, - ts + 791, - ts + 821, - ts + 846, - ts + 872, + ts + 768, + ts + 789, + ts + 811, + ts + 841, + ts + 866, ts + 892, - ts + 918, - ts + 941, - ts + 967, - ts + 989, - ts + 1010, - ts + 1021, - ts + 1029, - ts + 1043, - ts + 1056, + ts + 912, + ts + 938, + ts + 961, + ts + 987, + ts + 1009, + ts + 1030, + ts + 1041, + ts + 1049, + ts + 1063, + ts + 1076, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -25587,7 +25627,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -25635,10 +25674,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1089)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -25650,10 +25689,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -25663,21 +25698,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1076, - ts + 1080, - ts + 1085, - ts + 1089, - ts + 1097, - ts + 1102, + ts + 1096, + ts + 1100, + ts + 1105, + ts + 1109, + ts + 1117, + ts + 1122, } // SQL is translated into a sequence of instructions to be @@ -25976,7 +26003,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -26113,6 +26140,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -26136,6 +26165,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -26150,9 +26180,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -26410,7 +26443,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1107, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1127, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -26436,13 +26469,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1115, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1135, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1123, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1143, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -26518,7 +26551,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -26540,7 +26573,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1127, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1147, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -26597,7 +26630,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1139) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1159) == 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))) @@ -26730,7 +26763,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 88)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+88, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1143, -1) + Xsqlite3_result_error(tls, pCtx, ts+1163, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -26754,12 +26787,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1166)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1173)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1180)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1187)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1194)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1201)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1186)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1193)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1200)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1207)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1214)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1221)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -26771,7 +26804,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1208) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1228) == 0 { if idx > 1 { return 1 } @@ -26793,7 +26826,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1213) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1233) == 0 { if idx > 1 { return 1 } @@ -26807,7 +26840,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -26815,7 +26848,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -26827,7 +26860,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -26861,9 +26894,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1247, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1267, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -26882,7 +26915,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1256, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1276, 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) { @@ -26896,14 +26929,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1266) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1286) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1272) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1292) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1277) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1297) == 0 { rc = 0 } break @@ -27229,7 +27262,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -27239,13 +27272,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1286, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1306, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -27263,41 +27296,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1293, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1313, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1298, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1318, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1304, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1324, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -27310,7 +27343,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1329, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -27360,15 +27393,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1213}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1233}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1314}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1319}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1253}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1339}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1353}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1362}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1375}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1393}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -27519,7 +27552,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -27780,7 +27813,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { p = libc.Xmalloc(tls, uint64(nByte)) if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1386, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1406, libc.VaList(bp, nByte)) } return p } @@ -27800,7 +27833,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { var p uintptr = libc.Xrealloc(tls, pPrior, uint64(nByte)) if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1424, + ts+1444, libc.VaList(bp, libc.X_msize(tls, pPrior), nByte)) } return p @@ -54824,7 +54857,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -54860,7 +54893,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -54880,7 +54913,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -54929,24 +54962,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -55262,7 +55322,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1460, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1480, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -55335,8 +55395,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1474)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1507)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1494)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1527)) 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)}, @@ -55548,7 +55608,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1514, 1) + Xsqlite3_str_append(tls, pAccum, ts+1534, 1) goto __5 __11: ; @@ -56105,7 +56165,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1516 + bufpt = ts + 1536 length = 3 goto __58 __127: @@ -56165,7 +56225,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1520, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1540, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -56506,7 +56566,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1524 + bufpt = ts + 1544 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -56630,9 +56690,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1525 + return ts + 1545 } - return ts + 1530 + return ts + 1550 }() __220: ; @@ -56780,7 +56840,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1537, 1) + Xsqlite3_str_append(tls, pAccum, ts+1557, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -56797,10 +56857,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1539, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -56855,7 +56915,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1563)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1583)) // 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 @@ -57020,7 +57080,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1524, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1544, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -57252,20 +57312,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -57278,46 +57444,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -58733,7 +58899,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1572 + var pow63 uintptr = ts + 1592 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -59284,7 +59450,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1591, + ts+1611, libc.VaList(bp, zType)) } @@ -59303,13 +59469,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1525) + logBadConnection(tls, ts+1545) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1636) + logBadConnection(tls, ts+1656) } return 0 } else { @@ -59322,7 +59488,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1645) + logBadConnection(tls, ts+1665) return 0 } else { return 1 @@ -59795,193 +59961,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1653, - ts + 1663, - ts + 1674, - ts + 1686, - ts + 1697, - ts + 1709, - ts + 1716, - ts + 1724, - ts + 1732, - ts + 1737, - ts + 1743, + ts + 1673, + ts + 1683, + ts + 1694, + ts + 1706, + ts + 1717, + ts + 1729, + ts + 1736, + ts + 1744, + ts + 1752, ts + 1757, - ts + 1763, - ts + 1773, - ts + 1778, - ts + 1783, - ts + 1786, - ts + 1792, - ts + 1805, - ts + 1815, - ts + 1819, - ts + 1826, - ts + 1833, - ts + 1840, - ts + 1847, - ts + 1857, + ts + 1762, + ts + 1768, + ts + 1782, + ts + 1788, + ts + 1798, + ts + 1803, + ts + 1808, + ts + 1811, + ts + 1817, + ts + 1824, + ts + 1828, + ts + 1838, + ts + 1845, + ts + 1852, + ts + 1859, ts + 1866, - ts + 1877, - ts + 1886, - ts + 1892, - ts + 1902, - ts + 1912, - ts + 1917, - ts + 1927, - ts + 1938, - ts + 1943, - ts + 1950, - ts + 1961, - ts + 1966, - ts + 1971, - ts + 1977, - ts + 1983, - ts + 1989, - ts + 1995, - ts + 1998, + ts + 1876, + ts + 1885, + ts + 1896, + ts + 1905, + ts + 1911, + ts + 1921, + ts + 1931, + ts + 1936, + ts + 1946, + ts + 1957, + ts + 1962, + ts + 1969, + ts + 1980, + ts + 1985, + ts + 1990, + ts + 1996, ts + 2002, - ts + 2013, - ts + 2024, + ts + 2008, + ts + 2011, + ts + 2015, + ts + 2021, ts + 2032, - ts + 2041, - ts + 2047, - ts + 2054, - ts + 2062, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, + ts + 2043, + ts + 2051, + ts + 2060, + ts + 2067, + ts + 2075, + ts + 2078, + ts + 2081, + ts + 2084, ts + 2087, - ts + 2097, - ts + 2110, - ts + 2121, - ts + 2127, - ts + 2134, - ts + 2139, - ts + 2148, - ts + 2157, - ts + 2164, - ts + 2177, - ts + 2188, - ts + 2193, - ts + 2201, + ts + 2090, + ts + 2093, + ts + 2100, + ts + 2106, + ts + 2116, + ts + 2129, + ts + 2140, + ts + 2146, + ts + 2153, + ts + 2162, + ts + 2171, + ts + 2178, + ts + 2191, + ts + 2202, ts + 2207, - ts + 2214, - ts + 2226, - ts + 2231, + ts + 2215, + ts + 2221, + ts + 2228, ts + 2240, ts + 2245, ts + 2254, ts + 2259, - ts + 2264, - ts + 2270, + ts + 2268, + ts + 2273, ts + 2278, - ts + 2286, - ts + 2296, - ts + 2304, - ts + 2311, - ts + 2324, - ts + 2329, - ts + 2341, - ts + 2349, - ts + 2356, - ts + 2367, - ts + 2374, + ts + 2284, + ts + 2292, + ts + 2300, + ts + 2310, + ts + 2318, + ts + 2325, + ts + 2338, + ts + 2343, + ts + 2355, + ts + 2363, + ts + 2370, ts + 2381, - ts + 2391, - ts + 2400, - ts + 2411, - ts + 2417, - ts + 2428, - ts + 2438, - ts + 2448, - ts + 2455, - ts + 2461, - ts + 2471, - ts + 2482, - ts + 2486, - ts + 2495, - ts + 2504, - ts + 2511, - ts + 2521, - ts + 2528, - ts + 2537, - ts + 2547, - ts + 2554, - ts + 2562, + ts + 2388, + ts + 2395, + ts + 2405, + ts + 2414, + ts + 2425, + ts + 2431, + ts + 2442, + ts + 2452, + ts + 2462, + ts + 2469, + ts + 2475, + ts + 2485, + ts + 2496, + ts + 2500, + ts + 2509, + ts + 2518, + ts + 2525, + ts + 2535, + ts + 2542, + ts + 2551, + ts + 2561, + ts + 2568, ts + 2576, - ts + 2584, + ts + 2590, ts + 2598, - ts + 2609, - ts + 2622, - ts + 2633, - ts + 2639, - ts + 2651, - ts + 2660, - ts + 2668, - ts + 2677, - ts + 2686, - ts + 2693, - ts + 2701, - ts + 2708, - ts + 2719, + ts + 2612, + ts + 2623, + ts + 2636, + ts + 2647, + ts + 2653, + ts + 2665, + ts + 2674, + ts + 2682, + ts + 2691, + ts + 2700, + ts + 2707, + ts + 2715, + ts + 2722, ts + 2733, - ts + 2744, - ts + 2752, + ts + 2747, ts + 2758, ts + 2766, - ts + 2774, - ts + 2784, - ts + 2797, - ts + 2807, - ts + 2820, - ts + 2829, - ts + 2840, - ts + 2848, + ts + 2772, + ts + 2780, + ts + 2788, + ts + 2798, + ts + 2811, + ts + 2821, + ts + 2834, + ts + 2843, ts + 2854, - ts + 2866, - ts + 2878, - ts + 2886, - ts + 2898, - ts + 2911, - ts + 2921, - ts + 2931, - ts + 2936, - ts + 2948, - ts + 2960, - ts + 2970, - ts + 2976, - ts + 2986, - ts + 2993, - ts + 3005, - ts + 3016, - ts + 3024, - ts + 3033, - ts + 3042, - ts + 3051, - ts + 3058, - ts + 3069, - ts + 3082, - ts + 3092, - ts + 3099, - ts + 3107, - ts + 3116, - ts + 3122, + ts + 2862, + ts + 2868, + ts + 2880, + ts + 2892, + ts + 2900, + ts + 2912, + ts + 2925, + ts + 2935, + ts + 2945, + ts + 2950, + ts + 2962, + ts + 2974, + ts + 2984, + ts + 2990, + ts + 3000, + ts + 3007, + ts + 3019, + ts + 3030, + ts + 3038, + ts + 3047, + ts + 3056, + ts + 3065, + ts + 3072, + ts + 3083, + ts + 3096, + ts + 3106, + ts + 3113, + ts + 3121, ts + 3130, - ts + 3138, - ts + 3146, - ts + 3156, - ts + 3165, - ts + 3176, - ts + 3186, - ts + 3192, - ts + 3203, - ts + 3214, - ts + 3219, - ts + 3227, + ts + 3136, + ts + 3144, + ts + 3152, + ts + 3160, + ts + 3170, + ts + 3179, + ts + 3190, + ts + 3200, + ts + 3206, + ts + 3217, + ts + 3228, + ts + 3233, + ts + 3241, } type winShm = struct { @@ -60060,86 +60226,86 @@ type win_syscall = struct { } var aSyscall = [80]win_syscall{ - {FzName: ts + 3237, FpCurrent: 0}, - {FzName: ts + 3253}, - {FzName: ts + 3264}, - {FzName: ts + 3275, FpCurrent: 0}, - {FzName: ts + 3287, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3311, FpCurrent: 0}, - {FzName: ts + 3330, FpCurrent: 0}, - {FzName: ts + 3349, FpCurrent: 0}, - {FzName: ts + 3362, FpCurrent: 0}, - {FzName: ts + 3374, FpCurrent: 0}, - {FzName: ts + 3386}, - {FzName: ts + 3410}, - {FzName: ts + 3431, FpCurrent: 0}, - {FzName: ts + 3448, FpCurrent: 0}, - {FzName: ts + 3463, FpCurrent: 0}, - {FzName: ts + 3478, FpCurrent: 0}, - {FzName: ts + 3490, FpCurrent: 0}, - {FzName: ts + 3510, FpCurrent: 0}, - {FzName: ts + 3528, FpCurrent: 0}, - {FzName: ts + 3546, FpCurrent: 0}, - {FzName: ts + 3565, FpCurrent: 0}, - {FzName: ts + 3584, FpCurrent: 0}, - {FzName: ts + 3605, FpCurrent: 0}, - {FzName: ts + 3617, FpCurrent: 0}, - {FzName: ts + 3634, FpCurrent: 0}, - {FzName: ts + 3651, FpCurrent: 0}, - {FzName: ts + 3664, FpCurrent: 0}, - {FzName: ts + 3680, FpCurrent: 0}, + {FzName: ts + 3251, FpCurrent: 0}, + {FzName: ts + 3267}, + {FzName: ts + 3278}, + {FzName: ts + 3289, FpCurrent: 0}, + {FzName: ts + 3301, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3344, FpCurrent: 0}, + {FzName: ts + 3363, FpCurrent: 0}, + {FzName: ts + 3376, FpCurrent: 0}, + {FzName: ts + 3388, FpCurrent: 0}, + {FzName: ts + 3400}, + {FzName: ts + 3424}, + {FzName: ts + 3445, FpCurrent: 0}, + {FzName: ts + 3462, FpCurrent: 0}, + {FzName: ts + 3477, FpCurrent: 0}, + {FzName: ts + 3492, FpCurrent: 0}, + {FzName: ts + 3504, FpCurrent: 0}, + {FzName: ts + 3524, FpCurrent: 0}, + {FzName: ts + 3542, FpCurrent: 0}, + {FzName: ts + 3560, FpCurrent: 0}, + {FzName: ts + 3579, FpCurrent: 0}, + {FzName: ts + 3598, FpCurrent: 0}, + {FzName: ts + 3619, FpCurrent: 0}, + {FzName: ts + 3631, FpCurrent: 0}, + {FzName: ts + 3648, FpCurrent: 0}, + {FzName: ts + 3665, FpCurrent: 0}, + {FzName: ts + 3678, FpCurrent: 0}, {FzName: ts + 3694, FpCurrent: 0}, {FzName: ts + 3708, FpCurrent: 0}, - {FzName: ts + 3732, FpCurrent: 0}, - {FzName: ts + 3745, FpCurrent: 0}, - {FzName: ts + 3758, FpCurrent: 0}, - {FzName: ts + 3771, FpCurrent: 0}, + {FzName: ts + 3722, FpCurrent: 0}, + {FzName: ts + 3746, FpCurrent: 0}, + {FzName: ts + 3759, FpCurrent: 0}, + {FzName: ts + 3772, FpCurrent: 0}, {FzName: ts + 3785, FpCurrent: 0}, {FzName: ts + 3799, FpCurrent: 0}, - {FzName: ts + 3809, FpCurrent: 0}, - {FzName: ts + 3820, FpCurrent: 0}, - {FzName: ts + 3832, FpCurrent: 0}, - {FzName: ts + 3841, FpCurrent: 0}, - {FzName: ts + 3853, FpCurrent: 0}, - {FzName: ts + 3862, FpCurrent: 0}, - {FzName: ts + 3875, FpCurrent: 0}, - {FzName: ts + 3887, FpCurrent: 0}, - {FzName: ts + 3900, FpCurrent: 0}, - {FzName: ts + 3913, FpCurrent: 0}, - {FzName: ts + 3923, FpCurrent: 0}, - {FzName: ts + 3932, FpCurrent: 0}, - {FzName: ts + 3943, FpCurrent: 0}, + {FzName: ts + 3813, FpCurrent: 0}, + {FzName: ts + 3823, FpCurrent: 0}, + {FzName: ts + 3834, FpCurrent: 0}, + {FzName: ts + 3846, FpCurrent: 0}, + {FzName: ts + 3855, FpCurrent: 0}, + {FzName: ts + 3867, FpCurrent: 0}, + {FzName: ts + 3876, FpCurrent: 0}, + {FzName: ts + 3889, FpCurrent: 0}, + {FzName: ts + 3901, FpCurrent: 0}, + {FzName: ts + 3914, FpCurrent: 0}, + {FzName: ts + 3927, FpCurrent: 0}, + {FzName: ts + 3937, FpCurrent: 0}, + {FzName: ts + 3946, FpCurrent: 0}, {FzName: ts + 3957, FpCurrent: 0}, - {FzName: ts + 3977, FpCurrent: 0}, - {FzName: ts + 4001, FpCurrent: 0}, - {FzName: ts + 4010, FpCurrent: 0}, - {FzName: ts + 4023, FpCurrent: 0}, - {FzName: ts + 4038, FpCurrent: 0}, - {FzName: ts + 4044, FpCurrent: 0}, - {FzName: ts + 4065, FpCurrent: 0}, - {FzName: ts + 4076, FpCurrent: 0}, - {FzName: ts + 4089, FpCurrent: 0}, - {FzName: ts + 4105, FpCurrent: 0}, - {FzName: ts + 4125, FpCurrent: 0}, - {FzName: ts + 4135}, - {FzName: ts + 4150, FpCurrent: 0}, - {FzName: ts + 4170, FpCurrent: 0}, - {FzName: ts + 4192}, - {FzName: ts + 4209}, - {FzName: ts + 4238}, - {FzName: ts + 4259}, - {FzName: ts + 4271}, - {FzName: ts + 4291}, - {FzName: ts + 4306}, - {FzName: ts + 4326, FpCurrent: 0}, - {FzName: ts + 4345, FpCurrent: 0}, - {FzName: ts + 4364, FpCurrent: 0}, - {FzName: ts + 4379}, - {FzName: ts + 4404}, - {FzName: ts + 4431}, - {FzName: ts + 4442}, - {FzName: ts + 4463, FpCurrent: 0}, + {FzName: ts + 3971, FpCurrent: 0}, + {FzName: ts + 3991, FpCurrent: 0}, + {FzName: ts + 4015, FpCurrent: 0}, + {FzName: ts + 4024, FpCurrent: 0}, + {FzName: ts + 4037, FpCurrent: 0}, + {FzName: ts + 4052, FpCurrent: 0}, + {FzName: ts + 4058, FpCurrent: 0}, + {FzName: ts + 4079, FpCurrent: 0}, + {FzName: ts + 4090, FpCurrent: 0}, + {FzName: ts + 4103, FpCurrent: 0}, + {FzName: ts + 4119, FpCurrent: 0}, + {FzName: ts + 4139, FpCurrent: 0}, + {FzName: ts + 4149}, + {FzName: ts + 4164, FpCurrent: 0}, + {FzName: ts + 4184, FpCurrent: 0}, + {FzName: ts + 4206}, + {FzName: ts + 4223}, + {FzName: ts + 4252}, + {FzName: ts + 4273}, + {FzName: ts + 4285}, + {FzName: ts + 4305}, + {FzName: ts + 4320}, + {FzName: ts + 4340, FpCurrent: 0}, + {FzName: ts + 4359, FpCurrent: 0}, + {FzName: ts + 4378, FpCurrent: 0}, + {FzName: ts + 4393}, + {FzName: ts + 4418}, + {FzName: ts + 4445}, + {FzName: ts + 4456}, + {FzName: ts + 4477, FpCurrent: 0}, } func winSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { @@ -60468,7 +60634,7 @@ __3: if !(zValue != 0 && *(*int8)(unsafe.Pointer(zValue)) != 0) { goto __7 } - zCopy = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, zValue)) + zCopy = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, zValue)) if !(zCopy == uintptr(0)) { goto __8 } @@ -60559,9 +60725,9 @@ func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr } } if DWORD(0) == dwLen { - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4482, libc.VaList(bp, lastErrno, lastErrno)) + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4496, libc.VaList(bp, lastErrno, lastErrno)) } else { - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4479, libc.VaList(bp+16, zOut)) + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4493, libc.VaList(bp+16, zOut)) Xsqlite3_free(tls, zOut) } @@ -60578,13 +60744,13 @@ func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uint winGetLastErrorMsg(tls, lastErrno, int32(unsafe.Sizeof([500]int8{})), bp+40) if zPath == uintptr(0) { - zPath = ts + 1524 + zPath = ts + 1544 } for i = 0; *(*int8)(unsafe.Pointer(bp + 40 + uintptr(i))) != 0 && int32(*(*int8)(unsafe.Pointer(bp + 40 + uintptr(i)))) != '\r' && int32(*(*int8)(unsafe.Pointer(bp + 40 + uintptr(i)))) != '\n'; i++ { } *(*int8)(unsafe.Pointer(bp + 40 + uintptr(i))) = int8(0) Xsqlite3_log(tls, errcode, - ts+4502, + ts+4516, libc.VaList(bp, iLine, lastErrno, zFunc, zPath, bp+40)) return errcode @@ -60618,7 +60784,7 @@ func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { if nRetry != 0 { Xsqlite3_log(tls, SQLITE_NOTICE, - ts+4533, + ts+4547, libc.VaList(bp, winIoerrRetryDelay*nRetry*(nRetry+1)/2, lineno)) } } @@ -60671,7 +60837,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+4583, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46194) + winLogErrorAtLine(tls, SQLITE_IOERR|int32(22)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4597, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47395) return 1 } @@ -60697,7 +60863,7 @@ func winClose(tls *libc.TLS, id uintptr) int32 { 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+4595, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46290) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4609, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47491) } func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { @@ -60731,9 +60897,9 @@ func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_ } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 40)) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4604, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46358) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4618, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47559) } - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 46361) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 47562) if *(*DWORD)(unsafe.Pointer(bp + 32)) < DWORD(amt) { libc.Xmemset(tls, pBuf+uintptr(*(*DWORD)(unsafe.Pointer(bp + 32))), 0, uint64(DWORD(amt)-*(*DWORD)(unsafe.Pointer(bp + 32)))) @@ -60789,12 +60955,12 @@ func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 if rc != 0 { 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+4612, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46470) + return winLogErrorAtLine(tls, SQLITE_FULL, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4626, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47671) } - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4622, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46475) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4636, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47676) } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 46478) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 47679) } return SQLITE_OK @@ -60821,10 +60987,10 @@ func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { winUnmapfile(tls, pFile) if winSeekFile(tls, pFile, nByte) != 0 { - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4632, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46541) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4646, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47742) } 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+4645, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46546) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4659, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47747) } if rc == SQLITE_OK && oldMmapSize > int64(0) { @@ -60850,7 +61016,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { } 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+4658, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46638) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4672, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47839) } } rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 13*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) @@ -60860,7 +61026,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { } 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+4667, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46653) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4681, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47854) } return int32(0) } @@ -60881,7 +61047,7 @@ func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { 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+4676, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46694) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(7)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4690, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47895) } } @@ -60923,7 +61089,7 @@ func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { } 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+4688, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46789) + winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4702, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47990) } return res @@ -61049,7 +61215,7 @@ func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { if type1 >= EXCLUSIVE_LOCK { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+2), uint32(0), uint32(SHARED_SIZE), uint32(0)) if locktype == SHARED_LOCK && !(winGetReadLock(tls, pFile) != 0) { - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4706, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47015) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4720, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 48216) } } if type1 >= RESERVED_LOCK { @@ -61156,7 +61322,7 @@ func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*WinFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*WinFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK @@ -61352,7 +61518,7 @@ func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { 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+4716, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 47481) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4730, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 48682) } } @@ -61394,7 +61560,7 @@ __1: __2: ; (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename = pNew + 1*160 - Xsqlite3_snprintf(tls, nName+15, (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename, ts+4736, libc.VaList(bp, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath)) + Xsqlite3_snprintf(tls, nName+15, (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename, ts+4750, libc.VaList(bp, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath)) winShmEnterMutex(tls) pShmNode = winShmNodeList @@ -61444,7 +61610,7 @@ __10: ; __9: ; - if !(0 == Xsqlite3_uri_boolean(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, ts+4743, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, ts+4757, 0)) { goto __11 } inFlags = inFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) @@ -61459,7 +61625,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+4756, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 47563) + rc = winLogErrorAtLine(tls, rc, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4770, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 48764) goto shm_open_err __13: ; @@ -61687,7 +61853,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+4767, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47834) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4781, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 49035) goto shmpage_out __6: ; @@ -61705,7 +61871,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+4778, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47849) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4792, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 49050) goto shmpage_out __9: ; @@ -61753,7 +61919,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+4789, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47908) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno, ts+4803, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 49109) if !(hMap != 0) { goto __16 } @@ -61799,7 +61965,7 @@ func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { 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+4800, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47957) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4814, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 49158) } (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion = uintptr(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) @@ -61808,7 +61974,7 @@ func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { 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+4814, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47968) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4828, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 49169) } (*WinFile)(unsafe.Pointer(pFile)).FhMap = uintptr(0) } @@ -61852,7 +62018,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { 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+4828, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 48045) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4842, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 49246) return SQLITE_OK } @@ -61862,7 +62028,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { (*(*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+4840, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 48063) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4854, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 49264) return SQLITE_OK } @@ -62000,7 +62166,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { var i Size_t var j Size_t - var nPre int32 = Xsqlite3Strlen30(tls, ts+4852) + var nPre int32 = Xsqlite3Strlen30(tls, ts+4866) var nMax int32 var nBuf int32 var nDir int32 @@ -62026,9 +62192,9 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4860, uintptr(0), 48364) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4874, uintptr(0), 49566) } - Xsqlite3_snprintf(tls, nMax, zBuf, ts+4479, libc.VaList(bp, Xsqlite3_temp_directory)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+4493, libc.VaList(bp, Xsqlite3_temp_directory)) } Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) } else if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { @@ -62043,11 +62209,11 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { 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+4876, uintptr(0), 48464) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4890, uintptr(0), 49666) } zMulti = winUnicodeToUtf8(tls, zWidePath) if zMulti != 0 { - Xsqlite3_snprintf(tls, nMax, zBuf, ts+4479, libc.VaList(bp+8, zMulti)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+4493, libc.VaList(bp+8, zMulti)) Xsqlite3_free(tls, zMulti) Xsqlite3_free(tls, zWidePath) } else { @@ -62067,11 +62233,11 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { 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+4892, uintptr(0), 48491) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4906, uintptr(0), 49693) } zUtf8 = winMbcsToUtf8(tls, zMbcsPath, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) if zUtf8 != 0 { - Xsqlite3_snprintf(tls, nMax, zBuf, ts+4479, libc.VaList(bp+16, zUtf8)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+4493, libc.VaList(bp+16, zUtf8)) Xsqlite3_free(tls, zUtf8) } else { Xsqlite3_free(tls, zBuf) @@ -62083,17 +62249,17 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { if !(winMakeEndInDirSep(tls, nDir+1, zBuf) != 0) { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4908, uintptr(0), 48515) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4922, uintptr(0), 49717) } nLen = Xsqlite3Strlen30(tls, zBuf) if nLen+nPre+17 > nBuf { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4924, uintptr(0), 48533) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4938, uintptr(0), 49735) } - Xsqlite3_snprintf(tls, nBuf-16-nLen, zBuf+uintptr(nLen), ts+4852, 0) + Xsqlite3_snprintf(tls, nBuf-16-nLen, zBuf+uintptr(nLen), ts+4866, 0) j = Size_t(Xsqlite3Strlen30(tls, zBuf)) Xsqlite3_randomness(tls, 15, zBuf+uintptr(j)) @@ -62121,7 +62287,7 @@ __3: return SQLITE_OK } -var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4940)) +var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4954)) func winIsDir(tls *libc.TLS, zConverted uintptr) int32 { bp := tls.Alloc(44) @@ -62213,7 +62379,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 dwCreationDisposition = DWORD(OPEN_EXISTING) } - if 0 == Xsqlite3_uri_boolean(tls, zName, ts+5003, 0) { + if 0 == Xsqlite3_uri_boolean(tls, zName, ts+5017, 0) { dwShareMode = DWORD(FILE_SHARE_READ | FILE_SHARE_WRITE) } else { dwShareMode = DWORD(0) @@ -62272,7 +62438,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 } } } - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8)), 48822) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8)), 50024) if h == libc.UintptrFromInt64(int64(-1)) { Xsqlite3_free(tls, zConverted) @@ -62283,8 +62449,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)) - winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+5013, zUtf8Name, 48837) - return Xsqlite3CantopenError(tls, 48838) + winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+5027, zUtf8Name, 50039) + return Xsqlite3CantopenError(tls, 50040) } } @@ -62316,7 +62482,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(WINFILE_RDONLY) } if flags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+5021, SQLITE_POWERSAFE_OVERWRITE) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+5035, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(WINFILE_PSOW) } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = DWORD(0) @@ -62399,9 +62565,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)), ts+5026, zFilename, 49010) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, *(*DWORD)(unsafe.Pointer(bp + 4)), ts+5040, zFilename, 50212) } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp)), 49012) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp)), 50214) } Xsqlite3_free(tls, zConverted) @@ -62439,10 +62605,10 @@ func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pRes attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp)).FdwFileAttributes } } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 49062) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 50264) 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)), ts+5036, zFilename, 49065) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(13)<<8, *(*DWORD)(unsafe.Pointer(bp + 40)), ts+5050, zFilename, 50267) } else { attr = libc.Uint32(libc.Uint32FromInt32(-1)) } @@ -62507,7 +62673,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname - }(), zFull, ts+5046, + }(), zFull, ts+5060, libc.VaList(bp, Xsqlite3_data_directory, '\\', zRelative)) return SQLITE_OK } @@ -62520,7 +62686,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5053, zRelative, 49282) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5067, zRelative, 50484) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(WCHAR(0)))) @@ -62532,7 +62698,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5070, zRelative, 49295) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5084, zRelative, 50497) } Xsqlite3_free(tls, zConverted) zOut = winUnicodeToUtf8(tls, zTemp) @@ -62542,7 +62708,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5087, zRelative, 49308) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5101, zRelative, 50510) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(int8(0)))) @@ -62554,7 +62720,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5104, zRelative, 49321) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5118, zRelative, 50523) } Xsqlite3_free(tls, zConverted) zOut = winMbcsToUtf8(tls, zTemp, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) @@ -62566,7 +62732,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname - }(), zFull, ts+4479, libc.VaList(bp+24, zOut)) + }(), zFull, ts+4493, libc.VaList(bp+24, zOut)) Xsqlite3_free(tls, zOut) return SQLITE_OK } else { @@ -62577,7 +62743,8 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32, zFull uintptr) int32 { var rc int32 - var pMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) + var pMutex uintptr + pMutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pMutex) rc = winFullPathnameNoMutex(tls, pVfs, zRelative, nFull, zFull) Xsqlite3_mutex_leave(tls, pMutex) @@ -62748,7 +62915,7 @@ var winVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: MAX_PATH * 4, - FzName: ts + 5121, + FzName: ts + 5135, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62771,7 +62938,7 @@ var winLongPathVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: int32(uint64(unsafe.Sizeof(WCHAR(0))) * uint64(32767)), - FzName: ts + 5127, + FzName: ts + 5141, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62794,7 +62961,7 @@ var winNolockVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: MAX_PATH * 4, - FzName: ts + 5142, + FzName: ts + 5156, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62817,7 +62984,7 @@ var winLongPathNolockVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: int32(uint64(unsafe.Sizeof(WCHAR(0))) * uint64(32767)), - FzName: ts + 5153, + FzName: ts + 5167, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62885,7 +63052,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 5173, + FzName: ts + 5187, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -63052,40 +63219,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -63096,7 +63308,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+5179, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+5193, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -63152,7 +63364,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -63228,7 +63440,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+4479, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+4493, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -63349,7 +63561,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+5194, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+5208, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -63422,7 +63634,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+5217, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+5231, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -63485,6 +63697,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -64168,6 +64385,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -64200,6 +64418,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -66630,7 +66849,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+5232, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+5246, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -67767,7 +67986,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -67828,7 +68047,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+5259, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+5273, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -67841,7 +68060,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+5268, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+5282, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -67893,9 +68112,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5273, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5287, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5280, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5294, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -68159,7 +68378,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -68283,7 +68502,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -68322,7 +68541,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -68399,7 +68618,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -68526,6 +68745,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -69399,7 +69619,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -69584,7 +69804,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+5290, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+5304, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -70156,7 +70376,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -70255,7 +70475,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -70423,7 +70643,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+5308, + ts+5322, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -70841,7 +71061,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -70986,7 +71206,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+5345, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+5359, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -71116,7 +71336,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -71589,7 +71809,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -72094,7 +72314,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -72485,7 +72705,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5371)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5385)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -72750,7 +72970,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -72887,7 +73107,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -72904,7 +73124,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -72912,7 +73132,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -72955,7 +73175,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -72965,7 +73185,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -73215,7 +73435,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -73247,8 +73467,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -73263,7 +73482,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -73273,7 +73492,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -73286,7 +73505,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -73295,14 +73514,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -73312,7 +73531,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -73359,63 +73578,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -73447,10 +73660,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -73461,15 +73673,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -73494,7 +73706,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -73505,7 +73717,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -73553,26 +73765,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -73582,7 +73794,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -73590,7 +73802,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -73598,10 +73810,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -73670,7 +73882,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -73700,11 +73912,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -73715,15 +73927,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -73751,14 +73963,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -73772,7 +73984,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -73784,7 +73996,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -73887,7 +74099,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -73915,7 +74127,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -73954,7 +74166,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -73978,7 +74190,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -74027,7 +74239,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+5387) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+5401) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -74799,7 +75011,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+5396, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+5410, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -74837,7 +75049,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -75252,7 +75464,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -75278,7 +75490,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -75286,6 +75498,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -75295,7 +75510,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -75311,7 +75526,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -75372,7 +75587,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -75407,7 +75622,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -75467,7 +75682,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -75506,7 +75721,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -75537,7 +75752,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -75878,7 +76093,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -76122,14 +76337,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -76174,7 +76389,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -76223,7 +76438,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -76302,10 +76517,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -76313,7 +76526,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -76375,7 +76589,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -76395,7 +76609,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -76415,7 +76629,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -76627,7 +76841,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -76831,7 +77045,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -76896,7 +77110,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -76944,7 +77158,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -77063,7 +77277,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -77223,7 +77437,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -77288,7 +77502,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -77324,7 +77538,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -77368,7 +77582,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -77480,7 +77694,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -77638,7 +77852,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -77695,7 +77909,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -77711,7 +77925,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -77785,7 +77999,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -77797,7 +78011,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -77808,7 +78022,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -77973,7 +78187,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -78245,12 +78459,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -78258,7 +78472,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -78318,7 +78532,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -78407,7 +78621,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -78523,7 +78737,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -78841,7 +79055,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -78852,7 +79066,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -79010,7 +79224,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -79084,7 +79298,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -79146,7 +79360,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -79174,7 +79388,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -79435,7 +79649,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -79627,7 +79841,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -79664,6 +79878,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -79754,7 +79970,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -79777,7 +79993,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -79857,7 +80073,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -79970,7 +80186,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -80031,7 +80247,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -80069,13 +80285,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -80182,7 +80398,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -80205,7 +80421,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -80306,7 +80522,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -80314,11 +80530,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -80393,7 +80609,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -80462,7 +80678,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -80491,7 +80707,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -80567,7 +80783,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -80581,7 +80797,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -80715,7 +80931,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -80903,7 +81119,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+5400, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+5414, 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)) @@ -80928,11 +81144,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+5402, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+5416, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+5425, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+5439, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -80953,13 +81169,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+5450, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+5464, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+5479, + ts+5493, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -80978,7 +81194,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+5533, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+5547, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -80989,7 +81205,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+5555, libc.VaList(bp+8, iPage)) + ts+5569, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -81012,12 +81228,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+5594, + ts+5608, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 5620 + return ts + 5634 } - return ts + 5625 + return ts + 5639 }(), expected-N, expected)) } @@ -81124,13 +81340,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5646 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5660 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+5656, libc.VaList(bp, rc)) + ts+5670, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -81141,7 +81357,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+5694, libc.VaList(bp+8, rc)) + ts+5708, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -81149,14 +81365,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+5732, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+5746, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5754 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5768 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -81173,7 +81389,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5780 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5794 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -81198,7 +81414,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+5808, + checkAppendMsg(tls, pCheck, ts+5822, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -81211,7 +81427,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+5838, 0) + checkAppendMsg(tls, pCheck, ts+5852, 0) doCoverageCheck = 0 goto __10 __13: @@ -81227,7 +81443,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+5862, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+5876, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -81265,7 +81481,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+5886, 0) + checkAppendMsg(tls, pCheck, ts+5900, 0) depth = d2 __21: ; @@ -81338,7 +81554,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+5911, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+5925, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -81355,7 +81571,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+5948, + ts+5962, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -81475,7 +81691,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 6000 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 6014 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)).FzPfx = uintptr(0) @@ -81511,7 +81727,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+6016, + ts+6030, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -81521,7 +81737,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+6061, 0) + ts+6075, 0) __16: ; __10: @@ -81568,13 +81784,13 @@ __23: 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+6116, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+6130, 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+6138, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+6152, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -81809,6 +82025,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -81822,8 +82047,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -81831,7 +82056,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+4479, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+4493, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -81842,7 +82067,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+6172, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+6186, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -81857,7 +82082,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+6192, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+6206, 0) return SQLITE_ERROR } return SQLITE_OK @@ -81877,7 +82102,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+6223, 0) + pDestDb, SQLITE_ERROR, ts+6237, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -82326,7 +82551,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+6263, + Xsqlite3_str_appendf(tls, bp+16, ts+6277, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -82743,6 +82968,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -82758,7 +82996,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -82818,6 +83056,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -82900,7 +83141,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1524 + return ts + 1544 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -83132,7 +83373,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -83364,7 +83605,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+4479, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+4493, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -83426,7 +83667,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1524 + zNeg = ts + 1544 rc = SQLITE_OK __1: @@ -83467,7 +83708,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 6270 + zNeg = ts + 6284 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -83486,7 +83727,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+6272, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+6286, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -83790,7 +84031,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -83805,14 +84046,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -83871,6 +84112,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -83895,10 +84139,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -83936,21 +84180,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -84299,85 +84551,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -84477,6 +84761,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -84504,7 +84798,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -84512,12 +84806,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -84536,7 +84830,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -84587,7 +84883,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -84716,8 +85012,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -84728,10 +85024,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -84742,6 +85034,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -84757,34 +85054,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+6277, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+6291, 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 + 1524 + zColl = ts + 1544 } - if libc.Xstrcmp(tls, zColl, ts+1069) == 0 { - zColl = ts + 6282 + if libc.Xstrcmp(tls, zColl, ts+1089) == 0 { + zColl = ts + 6296 } - Xsqlite3_str_appendf(tls, bp+144, ts+6284, + Xsqlite3_str_appendf(tls, bp+144, ts+6298, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 6270 + return ts + 6284 } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 6292 + return ts + 6306 } - return ts + 1524 + return ts + 1544 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+6295, 1) + Xsqlite3_str_append(tls, bp+144, ts+6309, 1) break } @@ -84792,7 +85089,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+6297, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+6311, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -84800,32 +85097,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+6306, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+6320, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+6306, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+6320, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1304, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1324, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+6313, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+6327, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1298, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -84835,13 +85132,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1304, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1324, 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+1298, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1525 + zP4 = ts + 1545 } else { - zP4 = ts + 6316 + zP4 = ts + 6330 } break @@ -84849,7 +85146,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+6323, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+6337, libc.VaList(bp+120, pVtab)) break } @@ -84860,20 +85157,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+6331, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+6345, 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+6336, 1) + Xsqlite3_str_append(tls, bp+144, ts+6350, 1) break } case -4: { - zP4 = ts + 6338 + zP4 = ts + 6352 break } @@ -84898,7 +85195,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 6346, ts + 6348, ts + 6350, ts + 6355} +var encnames = [4]uintptr{ts + 6360, ts + 6362, ts + 6364, ts + 6369} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -85000,7 +85297,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -85349,8 +85646,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 6360, ts + 6365, ts + 6372, ts + 6375, ts + 6378, ts + 6381, ts + 6384, ts + 6387, - ts + 6395, ts + 6398, ts + 6405, ts + 6413, + ts + 6374, ts + 6379, ts + 6386, ts + 6389, ts + 6392, ts + 6395, ts + 6398, ts + 6401, + ts + 6409, ts + 6412, ts + 6419, ts + 6427, } // Close a VDBE cursor and release all the resources that cursor @@ -85559,7 +85856,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+6420, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+6434, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -85567,16 +85864,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+6432, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+6446, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+6446, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+6460, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+6461, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+6475, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -85722,7 +86019,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+6474, 0) + Xsqlite3VdbeError(tls, p, ts+6488, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -86002,7 +86299,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -86012,14 +86309,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -86030,16 +86329,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -86056,7 +86351,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -86607,16 +86902,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -86634,7 +86933,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -86664,7 +86967,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -86698,7 +87001,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -86721,7 +87024,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -86743,7 +87046,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -86887,7 +87197,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -87058,7 +87368,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -87084,7 +87394,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -87127,7 +87437,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -87195,13 +87505,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 6504 + zContext = ts + 6518 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 6523 + zContext = ts + 6537 } else { - zContext = ts + 6542 + zContext = ts + 6556 } - zMsg = Xsqlite3_mprintf(tls, ts+6551, + zMsg = Xsqlite3_mprintf(tls, ts+6565, 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) @@ -87232,7 +87542,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -87287,7 +87597,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -87306,7 +87616,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+6587, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+6601, 0) return 1 } else { return 0 @@ -87316,7 +87626,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+6632, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+6646, 0) return 1 } else { return vdbeSafety(tls, p) @@ -87358,14 +87668,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -87577,6 +87888,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -87773,7 +88088,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+6672, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+6686, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -87964,7 +88279,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -88039,7 +88354,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+6695) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+6709) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -88468,35 +88783,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+6705, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+6719, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -88511,7 +88825,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -88543,7 +88857,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88558,7 +88872,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88569,7 +88883,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -88579,7 +88893,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88655,7 +88969,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88799,7 +89113,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -88817,8 +89131,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -88882,7 +89199,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -89026,7 +89343,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -89198,7 +89515,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+6745, 3) + Xsqlite3_str_append(tls, bp+48, ts+6759, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -89234,11 +89551,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1525, 4) + Xsqlite3_str_append(tls, bp+48, ts+1545, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1304, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1324, 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+6263, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+6277, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -89253,21 +89570,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+6749, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+6763, 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+6756, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+6770, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+6769, 2) + Xsqlite3_str_append(tls, bp+48, ts+6783, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+6772, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+6786, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+6777, 1) + Xsqlite3_str_append(tls, bp+48, ts+6791, 1) } } } @@ -89323,7 +89640,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -89427,12 +89745,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -89484,11 +89801,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1085, - ts + 1097, - ts + 1102, - ts + 1080, - ts + 1525, + ts + 1105, + ts + 1117, + ts + 1122, + ts + 1100, + ts + 1545, } // Execute as much of a VDBE program as we can. @@ -89526,7 +89843,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -89555,11 +89871,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -89629,42 +89948,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -89672,52 +89992,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -89759,19 +90079,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -89780,7 +90100,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -89788,11 +90108,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -90028,7 +90348,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -90523,20 +90843,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+6779, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+6793, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+6800, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+6814, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+6807, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+6821, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -90926,14 +91246,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -91011,72 +91331,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -91093,10 +91421,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -91108,33 +91436,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -91143,43 +91471,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -91195,26 +91523,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -91222,12 +91550,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -91242,17 +91570,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -91267,163 +91595,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -91432,20 +91760,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -91455,15 +91783,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -91471,9 +91799,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -91485,52 +91813,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -91539,24 +91867,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -91570,13 +91898,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -91585,38 +91913,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -91625,10 +91953,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -91636,10 +91964,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -91647,35 +91975,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -91683,372 +92049,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -92056,15 +92423,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -92073,124 +92440,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+6831, + Xsqlite3VdbeError(tls, p, ts+6845, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -92200,40 +92567,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -92251,339 +92618,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -92592,20 +92959,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -92616,244 +92983,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+6872, 0) + Xsqlite3VdbeError(tls, p, ts+6886, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+6923, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+6937, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+6945, 0) + ts+6959, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -92862,172 +93229,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+6999, 0) + ts+7013, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 7054 + return ts + 7068 } return func() uintptr { if iRollback != 0 { - return ts + 7102 + return ts + 7116 } - return ts + 7145 + return ts + 7159 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+7186) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+7200) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -93047,36 +93414,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -93084,22 +93451,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -93110,24 +93477,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -93135,30 +93502,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -93174,10 +93541,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -93186,10 +93553,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -93209,83 +93576,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1544 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -93294,31 +93661,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -93326,10 +93693,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -93350,105 +93717,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -93460,231 +93827,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -93694,85 +94063,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -93780,59 +94149,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -93847,121 +94216,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -93969,93 +94338,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -94068,7 +94437,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -94083,81 +94452,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -94167,38 +94536,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -94206,205 +94575,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -94414,90 +94783,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -94506,36 +94875,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -94546,88 +94915,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+7214) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+7228) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -94639,35 +95008,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -94676,63 +95045,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -94741,13 +95110,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -94755,20 +95124,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -94778,45 +95147,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -94829,10 +95198,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -94843,10 +95212,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -94854,30 +95223,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 7231 + goto __797 +__796: + zSchema = ts + 7245 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+7245, + ts+7259, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -94887,36 +95256,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -94924,10 +95293,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -94959,22 +95328,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -94984,15 +95353,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -95002,17 +95371,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -95022,34 +95391,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -95058,48 +95427,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+7288, 0) + Xsqlite3VdbeError(tls, p, ts+7302, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -95107,10 +95476,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -95132,24 +95501,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -95181,78 +95550,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -95260,11 +95629,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -95280,14 +95649,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -95295,16 +95664,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -95312,16 +95681,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -95332,10 +95701,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -95358,73 +95727,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -95434,22 +95803,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -95462,32 +95831,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -95499,70 +95868,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+7325, + ts+7339, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 7377 + return ts + 7391 } - return ts + 7382 + return ts + 7396 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -95570,17 +95939,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -95590,10 +95959,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -95607,10 +95976,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -95620,69 +95989,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+7389, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+7403, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -95690,16 +96059,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -95712,17 +96081,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -95732,24 +96101,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -95757,52 +96126,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+6695, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+6709, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -95811,54 +96180,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -95866,69 +96235,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -95940,27 +96309,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -95968,42 +96337,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -96012,41 +96381,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -96060,16 +96429,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -96081,25 +96450,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -96108,24 +96477,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -96150,16 +96519,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -96174,66 +96543,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+7418, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+7432, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -96254,73 +96623,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+7424, + Xsqlite3_log(tls, rc, ts+7438, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -96328,13 +96697,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+6672, 0) + Xsqlite3VdbeError(tls, p, ts+6686, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1460, 0) + Xsqlite3VdbeError(tls, p, ts+1480, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -96345,10 +96714,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 7456, ts + 7465, ts + 7472, - ts + 7478} +var azType = [4]uintptr{ts + 7470, ts + 7479, ts + 7486, + ts + 7492} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -96397,16 +96770,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7490, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7504, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 7519 + return ts + 7533 } return func() uintptr { if type1 == U32(7) { - return ts + 7524 + return ts + 7538 } - return ts + 7529 + return ts + 7543 }() }())) rc = SQLITE_ERROR @@ -96426,10 +96799,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+7537, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7551, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+4479, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+4493, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -96439,8 +96812,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -96460,7 +96833,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -96480,8 +96853,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -96489,21 +96862,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+7557, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+7571, 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+7587, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+7601, 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+7623, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+7637, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -96512,8 +96885,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -96546,8 +96919,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+7644, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+7658, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -96574,7 +96947,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 7665 + zFault = ts + 7679 __22: ; goto __20 @@ -96607,7 +96980,7 @@ __26: 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 + 7677 + zFault = ts + 7691 __29: ; goto __27 @@ -96627,8 +97000,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+7685, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+7699, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -96697,7 +97070,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -96725,12 +97098,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 4479 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 4493 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -96774,7 +97147,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -96857,7 +97230,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -96870,7 +97243,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -99310,11 +99683,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -99474,7 +99843,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+7719, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+7733, zDb) == 0) { goto __8 } @@ -99595,7 +99964,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+7724) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+7738) != 0) { goto __33 } goto __14 @@ -99751,14 +100120,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+7726, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+7740, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+7730, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+7744, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -99775,7 +100144,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+7734, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+7748, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -99869,7 +100238,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -99878,7 +100247,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -99933,7 +100302,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+7743, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+7757, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -99941,14 +100310,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+7774, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+7788, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) return WRC_Abort __87: ; @@ -100000,7 +100369,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+7829, libc.VaList(bp+16, zCol)) + ts+7843, 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 @@ -100037,7 +100406,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7864 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7878 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -100050,23 +100419,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 7873 + zErr = ts + 7887 } else { - zErr = ts + 7888 + zErr = ts + 7902 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7924, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+7923, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7937, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+7933, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7947, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -100169,15 +100538,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 7940 + var zIn uintptr = ts + 7954 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 7968 + zIn = ts + 7982 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 7986 + zIn = ts + 8000 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 8004 + zIn = ts + 8018 } - Xsqlite3ErrorMsg(tls, pParse, ts+8022, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+8036, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -100256,10 +100625,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 8042 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8056 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8047 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8061 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -100306,7 +100675,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+8053, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+8067, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -100370,7 +100739,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+8070, libc.VaList(bp, pExpr)) + ts+8084, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -100386,7 +100755,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+8134, + Xsqlite3ErrorMsg(tls, pParse, ts+8148, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -100400,7 +100769,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+8170, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+8184, uintptr(0), pExpr) } } else { @@ -100423,30 +100792,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+8198, libc.VaList(bp+16, pExpr)) + ts+8212, 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 + 8241 + zType = ts + 8255 } else { - zType = ts + 8248 + zType = ts + 8262 } - Xsqlite3ErrorMsg(tls, pParse, ts+8258, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8272, 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+8286, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8300, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+8308, + Xsqlite3ErrorMsg(tls, pParse, ts+8322, 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+8352, + ts+8366, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -100518,7 +100887,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+8400, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+8414, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -100534,7 +100903,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+8411, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+8425, pExpr, pExpr) } break @@ -100590,7 +100959,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -100665,7 +101034,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+8422, libc.VaList(bp, i, zType, mx)) + ts+8436, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -100685,7 +101054,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+8478, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+8492, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -100720,7 +101089,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+8512, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+8526, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -100777,7 +101146,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+8518, libc.VaList(bp, i+1)) + ts+8532, libc.VaList(bp, i+1)) return 1 } } @@ -100805,7 +101174,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+8579, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+8593, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -101019,7 +101388,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+8610, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+8624, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -101059,7 +101428,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8512) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8526) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -101070,7 +101439,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+8649) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+8663) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -101082,7 +101451,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+8655, 0) + ts+8669, 0) return WRC_Abort } @@ -101182,12 +101551,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -101223,12 +101592,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -101347,9 +101716,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -101437,14 +101804,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -101772,7 +102138,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) return } @@ -101847,7 +102213,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+8714, libc.VaList(bp, mxHeight)) + ts+8728, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -102015,12 +102381,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -102091,12 +102462,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+8762, + Xsqlite3ErrorMsg(tls, pParse, ts+8776, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 8806 + return ts + 8820 } - return ts + 1524 + return ts + 1544 }(), nElem)) break } @@ -102135,7 +102506,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+8808) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+8822) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -102161,7 +102532,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+8810, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+8824, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -102189,7 +102560,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+8844, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8858, libc.VaList(bp, pExpr)) } } } @@ -102236,7 +102607,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+8864, + Xsqlite3ErrorMsg(tls, pParse, ts+8878, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -102261,7 +102632,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+8907, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+8921, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -102282,11 +102653,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -102315,7 +102683,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -102411,7 +102783,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -102835,7 +103207,7 @@ __2: 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+8930, + Xsqlite3ErrorMsg(tls, pParse, ts+8944, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -102958,7 +103330,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+8960, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+8974, libc.VaList(bp, zObject)) } } @@ -102968,10 +103340,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -103012,10 +103386,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+8042) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+8056) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+8047) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+8061) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -103445,13 +103819,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+8983) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8997) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8991) == 0 { + if Xsqlite3StrICmp(tls, z, ts+9005) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8997) == 0 { + if Xsqlite3StrICmp(tls, z, ts+9011) == 0 { return 1 } return 0 @@ -103655,7 +104029,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9001, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9015, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -103733,7 +104107,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+9248, + Xsqlite3ErrorMsg(tls, pParse, ts+9262, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -105127,7 +105540,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -105141,10 +105554,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -105157,8 +105570,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -105166,12 +105579,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -105197,10 +105610,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -105211,14 +105622,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -105248,27 +105661,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -105277,9 +105690,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -105287,15 +105700,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+9301, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+9315, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -105326,8 +105739,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+9328, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+9342, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -105449,8 +105862,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -105471,9 +105884,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -105486,13 +105899,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+8930, + Xsqlite3ErrorMsg(tls, pParse, ts+8944, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -105503,11 +105916,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -105529,12 +105942,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -105549,14 +105962,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -105564,9 +106001,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -105576,15 +106013,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -105594,22 +106031,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -105618,51 +106055,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+9352, 0) + ts+9366, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -105671,18 +106108,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9402)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9416)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -105894,7 +106331,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -106131,6 +106568,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -106355,6 +106793,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -106500,7 +106939,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -107027,7 +107470,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -107045,8 +107490,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -107114,6 +107558,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -107137,7 +107583,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -107160,7 +107608,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -107173,7 +107621,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -107193,7 +107643,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -107333,7 +107785,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -107341,7 +107793,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -107392,11 +107844,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 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+9418, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9432, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -107408,13 +107860,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+9446, + ts+9460, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+9621, + ts+9635, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -107424,10 +107876,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+9795, libc.VaList(bp, zDb, zDb)) + ts+9809, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+9942, 0) + ts+9956, 0) } } @@ -107491,7 +107943,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+10093, libc.VaList(bp, zName)) + ts+10107, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -107501,7 +107953,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+10152, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+10166, zName)) { goto __6 } goto exit_rename_table @@ -107510,7 +107962,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10158, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10172, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -107551,19 +108003,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+10185, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+10199, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+10369, + ts+10383, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+10674, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+10688, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+10690, + ts+10704, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -107571,7 +108023,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+10748, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+10762, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -107583,7 +108035,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11013, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11027, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -107595,7 +108047,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+11026, + ts+11040, libc.VaList(bp, zErr, zDb, zTab)) } @@ -107641,12 +108093,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+11064, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11078, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+11096, 0) + ts+11110, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -107656,11 +108108,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+11123) + ts+11137) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+11182) + ts+11196) } if pDflt != 0 { @@ -107673,12 +108125,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+11235) + ts+11249) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11281) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11295) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -107689,7 +108141,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+11308, + ts+11322, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -107711,7 +108163,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+11454, + ts+11468, libc.VaList(bp+40, zTab, zDb)) } } @@ -107759,14 +108211,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+11684, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11698, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+11718, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11732, 0) goto exit_begin_add_column __4: ; @@ -107794,7 +108246,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+11748, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+11762, 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 } @@ -107834,18 +108286,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 11767 + zType = ts + 11781 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 11772 + zType = ts + 11786 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+11786, + Xsqlite3ErrorMsg(tls, pParse, ts+11800, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 11804 + return ts + 11818 } - return ts + 11821 + return ts + 11835 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -107929,11 +108381,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+11839, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+11853, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1524, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1544, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -107946,17 +108398,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+11860, + ts+11874, 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+12042, + ts+12056, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+11013, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+11027, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -108151,7 +108603,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -108214,12 +108666,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12173, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12187, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 12196 + return ts + 12210 } - return ts + 1524 + return ts + 1544 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -108259,8 +108711,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+12198, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+12212, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -108277,7 +108729,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -108299,7 +108751,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+12206, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+12220, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -108339,12 +108791,12 @@ 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+12212, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+12226, 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 + 12196 + return ts + 12210 } - return ts + 1524 + return ts + 1544 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -108518,8 +108970,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -108602,15 +109054,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -108638,7 +109090,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -108671,13 +109123,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -108690,7 +109142,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -108705,7 +109157,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -108761,8 +109213,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -108810,7 +109262,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -108830,7 +109282,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1524, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1544, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -108878,8 +109330,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -108921,11 +109373,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -108995,7 +109447,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1524, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1544, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -109018,8 +109470,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -109037,16 +109489,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -109061,31 +109513,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -109103,8 +109555,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -109130,9 +109582,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -109160,8 +109612,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -109198,7 +109650,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -109222,7 +109674,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+12217, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+12231, 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) @@ -109303,19 +109755,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+11839, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+11853, libc.VaList(bp, pName)) goto exit_drop_column __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+12224, + Xsqlite3ErrorMsg(tls, pParse, ts+12238, 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 + 12252 + return ts + 12266 } - return ts + 7465 + return ts + 7479 }(), zCol)) goto exit_drop_column @@ -109324,7 +109776,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+12264, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+12278, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -109338,13 +109790,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1524, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1544, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+12312, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12326, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12433, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12447, 1) 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 @@ -109462,11 +109914,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12451}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12472}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12492}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12511}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12530}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12465}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12486}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12506}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12525}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12544}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -109500,7 +109952,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+12553, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+12567, 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) } @@ -109509,10 +109961,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+12576, + ts+12590, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+12606, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+12620, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -109530,9 +109982,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 12624, FzCols: ts + 12637}, - {FzName: ts + 12650, FzCols: ts + 12663}, - {FzName: ts + 12691}, + {FzName: ts + 12638, FzCols: ts + 12651}, + {FzName: ts + 12664, FzCols: ts + 12677}, + {FzName: ts + 12705}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -109723,7 +110175,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12704} + FzName: ts + 12718} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -109974,7 +110426,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12714} + FzName: ts + 12728} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -109988,7 +110440,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+12724, + Xsqlite3_str_appendf(tls, bp+24, ts+12738, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -110001,7 +110453,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+12729, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+12743, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -110043,7 +110495,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+12735, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+12749, 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)).FnChar-- @@ -110057,7 +110509,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12741} + FzName: ts + 12755} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -110101,7 +110553,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+12750, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+12764, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -110118,7 +110570,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+12624, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+12638, 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, -6) @@ -110274,7 +110726,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12760, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12774, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -110331,7 +110783,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+12760, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12774, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -110378,9 +110830,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+12764) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+12778) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12768) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12782) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -110463,7 +110915,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1524 + z = ts + 1544 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -110485,15 +110937,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+12772, z) == 0 { + if Xsqlite3_strglob(tls, ts+12786, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+12783, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+12797, 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+12793, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+12807, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -110769,11 +111221,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12650, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12664, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+12805, - ts+12859, + ts+12819, + ts+12873, zDb) } return rc @@ -110820,10 +111272,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12624, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12638, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+12911, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+12925, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -110881,7 +111333,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+7719, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+7733, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -110911,20 +111363,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1524 + zFile = ts + 1544 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1524 + zName = ts + 1544 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+5173) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+5187) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -110940,13 +111392,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12952, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12966, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12955, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12969, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -110960,7 +111412,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12992, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13006, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -110971,7 +111423,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -111024,7 +111476,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13022, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13036, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -111041,7 +111493,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+13051, 0) + ts+13065, 0) rc = SQLITE_ERROR __23: ; @@ -111107,13 +111559,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1460, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1480, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13119, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13133, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -111160,7 +111612,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1524 + zName = ts + 1544 __1: ; i = 0 @@ -111191,14 +111643,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13147, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13161, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13168, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13182, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -111206,7 +111658,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13194, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13208, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -111317,7 +111769,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 13216} + FzName: ts + 13230} // Called by the parser to compile an ATTACH statement. // @@ -111330,7 +111782,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 13230} + FzName: ts + 13244} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -111344,7 +111796,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+13244, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+13258, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -111376,7 +111828,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+13268, + ts+13282, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -111551,7 +112003,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+13314, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13328, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -111577,11 +112029,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+13337, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+13351, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+13343, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+13357, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+13349, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+13363, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -111628,7 +112080,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 8991 + zCol = ts + 9005 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -111652,7 +112104,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+13376, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13390, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -111746,6 +112198,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -111773,9 +112227,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -111794,62 +112247,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -111896,13 +112341,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -111927,25 +112372,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+7719) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+7733) == 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+9410, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9424, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13391+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13410+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7231+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13405+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7245+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+13424) + ts+13438) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13410+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+7231) + ts+7245) } } } @@ -111966,12 +112411,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9410, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13410+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+7231) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13391+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9424, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+7245) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13405+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+13424) + ts+13438) } } } @@ -112000,9 +112445,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+13443, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+13457, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -112013,21 +112458,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 13451 + zMsg = ts + 13465 } else { - zMsg = ts + 13464 + zMsg = ts + 13478 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7923, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7937, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+7933, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7947, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -112057,12 +112502,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+9410, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7231+7) == 0 { - return ts + 13410 + if Xsqlite3_strnicmp(tls, zName, ts+9424, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7245+7) == 0 { + return ts + 13424 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 { - return ts + 13391 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13438+7) == 0 { + return ts + 13405 } } return zName @@ -112167,10 +112612,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -112326,11 +112771,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -112347,7 +112792,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -112376,7 +112821,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -112420,7 +112865,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+7231) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+7245) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -112446,7 +112891,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+7719, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+7733, zName) { goto __3 } @@ -112499,13 +112944,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+13478, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13492, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13495, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+13509, libc.VaList(bp, pName1)) return -1 } } else { @@ -112543,13 +112988,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1524, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1544, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+9410, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+9424, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13515, + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -112709,9 +113154,9 @@ 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 + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -112727,7 +113172,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+13557, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13571, 0) return __4: ; @@ -112755,9 +113200,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 11767 + return ts + 11781 } - return ts + 10152 + return ts + 10166 }(), zName) != 0) { goto __8 } @@ -112773,9 +113218,9 @@ __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 + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -112806,12 +113251,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13598, + Xsqlite3ErrorMsg(tls, pParse, ts+13612, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 11767 + return ts + 11781 } - return ts + 10152 + return ts + 10166 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -112826,7 +113271,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13619, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13633, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -112861,8 +113306,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -112883,7 +113328,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -112913,7 +113358,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+13654, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+13668, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -112937,7 +113382,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13671, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13685, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -112946,7 +113391,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -112957,7 +113402,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13654 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13668 (*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) @@ -112969,7 +113414,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+13654, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+13668, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -113003,7 +113448,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+13705, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13719, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -113011,13 +113456,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+13728, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+13742, 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)).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+13735, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+13749, 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)).Fn-- @@ -113054,7 +113499,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+13745, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+13759, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -113218,10 +113663,10 @@ 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+13771, + Xsqlite3ErrorMsg(tls, pParse, ts+13785, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13816, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13830, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -113252,7 +113697,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13857, 0) + ts+13871, 0) } } @@ -113297,7 +113742,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+13909, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+13923, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -113386,7 +113831,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+13950, 0) + ts+13964, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -113412,7 +113857,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -113481,7 +113926,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+14006, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14020, 0) goto generated_done __2: ; @@ -113494,13 +113939,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14049, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14063, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14057, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14071, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -113533,7 +113978,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+14064, + Xsqlite3ErrorMsg(tls, pParse, ts+14078, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -113654,13 +114099,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1524 - zSep2 = ts + 14095 - zEnd = ts + 6295 + zSep = ts + 1544 + zSep2 = ts + 14109 + zEnd = ts + 6309 } else { - zSep = ts + 14097 - zSep2 = ts + 14101 - zEnd = ts + 14106 + zSep = ts + 14111 + zSep2 = ts + 14115 + zEnd = ts + 14120 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -113668,7 +114113,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+14109, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+14123, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -113702,16 +114147,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+4479, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+4493, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1524, - ts + 14123, - ts + 14129, - ts + 14134, - ts + 14139, + ts + 1544, + ts + 14137, + ts + 14143, + ts + 14148, + ts + 14153, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -113850,8 +114295,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -113978,7 +114423,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -114002,7 +114447,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -114101,7 +114546,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1524, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1544, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -114118,10 +114563,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+14145, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1524))) + ts+14159, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1544))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+14178, + Xsqlite3ErrorMsg(tls, pParse, ts+14192, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -114140,11 +114585,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+14205, 0) + ts+14219, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14255, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14269, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -114178,7 +114623,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14287, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14301, 0) return } } @@ -114203,11 +114648,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 10152 - zType2 = ts + 14331 + zType = ts + 10166 + zType2 = ts + 14345 } else { - zType = ts + 11767 - zType2 = ts + 14337 + zType = ts + 11781 + zType2 = ts + 14351 } if pSelect != 0 { @@ -114269,7 +114714,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -114278,11 +114723,11 @@ 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+14342, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+14356, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+14357, + ts+14371, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -114298,13 +114743,13 @@ 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+14455, + ts+14469, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14497, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14511, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -114319,7 +114764,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+10674) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+10688) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -114349,7 +114794,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+14531, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14545, 0) goto create_view_fail __1: ; @@ -114365,7 +114810,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+11767, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+11781, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -114428,10 +114873,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -114449,12 +114891,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14567, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14581, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -114514,6 +114952,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -114573,13 +115018,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+14597, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14611, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+14612, + ts+14626, 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) } @@ -114620,10 +115065,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14679, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14693, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+12576, + ts+12590, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -114655,12 +115100,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+14693, + ts+14707, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+14738, + ts+14752, 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) @@ -114688,11 +115133,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14805, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14819, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+8411, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+8425, 10) == 0 { return 0 } return 1 @@ -114770,9 +115215,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -114831,21 +115276,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+14810, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14824, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+14838, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14852, 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+14872, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14886, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -114857,7 +115302,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+12768, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+12782, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -114921,7 +115366,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+14904, + ts+14918, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -114933,7 +115378,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14967, 0) + ts+14981, 0) goto fk_end goto __7 __6: @@ -115018,7 +115463,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+15061, + ts+15075, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -115245,12 +115690,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+15107, + Xsqlite3ErrorMsg(tls, pParse, ts+15121, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 15135 + return ts + 15149 } - return ts + 15141 + return ts + 15155 }())) return 1 } @@ -115371,7 +115816,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15146, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15160, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -115390,7 +115835,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+15152, + ts+15166, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -115416,26 +115861,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+15202, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15216, 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+15230, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15244, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+15255, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15269, 0) goto exit_create_index __17: ; @@ -115449,7 +115894,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15146, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15160, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -115461,10 +115906,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+15289, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15303, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -115476,7 +115921,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+15323, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15337, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -115505,7 +115950,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+15347, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+15361, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -115526,9 +115971,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -115567,7 +116012,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15146) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15160) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -115668,7 +116113,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+15370, 0) + ts+15384, 0) goto exit_create_index __56: ; @@ -115682,6 +116127,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -115702,6 +116148,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -115883,7 +116330,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+15431, libc.VaList(bp+48, 0)) + ts+15445, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -115935,8 +116382,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+15473, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+15487, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -115982,12 +116429,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+15490, + zStmt = Xsqlite3MPrintf(tls, db, ts+15504, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1524 + return ts + 1544 } - return ts + 15510 + return ts + 15524 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -115995,7 +116442,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+15518, + ts+15532, 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, @@ -116009,7 +116456,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+15577, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+15591, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -116170,7 +116617,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+15604, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+15618, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -116185,7 +116632,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+15622, libc.VaList(bp+8, 0)) + ts+15636, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -116196,9 +116643,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -116224,9 +116671,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+15695, + ts+15709, 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+12764, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+12778, (*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) @@ -116307,6 +116754,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -116314,7 +116762,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -116360,7 +116808,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+15755, + Xsqlite3ErrorMsg(tls, pParse, ts+15769, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -116495,6 +116943,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -116506,11 +116955,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -116537,7 +116988,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -116565,12 +117016,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+15791, + Xsqlite3ErrorMsg(tls, pParse, ts+15805, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 15827 + return ts + 15841 } - return ts + 15830 + return ts + 15844 }())) goto append_from_error __1: @@ -116739,7 +117190,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15836, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15850, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -116775,9 +117226,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 15842 + return ts + 15856 } - return ts + 15851 + return ts + 15865 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -116802,7 +117253,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 15836, ts + 15858, ts + 15842} +var az = [3]uintptr{ts + 15850, ts + 15872, ts + 15856} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -116817,7 +117268,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+15866, 0) + ts+15880, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -116835,7 +117286,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13351, 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+15950, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15964, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -117121,7 +117572,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+15959, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15973, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -117217,7 +117668,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+16005, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16019, libc.VaList(bp, zName)) } } } @@ -117317,7 +117768,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -117331,7 +117782,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -117410,7 +117861,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+16035, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16049, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -117537,7 +117988,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -117571,7 +118022,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -117594,26 +118045,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -117679,10 +118131,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+16080, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -117695,19 +118163,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+16066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16113, 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+16095, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16142, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -117934,17 +118404,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -117957,10 +118429,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -117969,15 +118441,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -117986,98 +118458,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -118085,138 +118557,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16133) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16180) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -118319,7 +118796,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+12624) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12638) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -118549,7 +119026,7 @@ 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 + 7529, ts + 7524, ts + 9283, ts + 9278, ts + 7519} +var azType2 = [5]uintptr{ts + 7543, ts + 7538, ts + 9297, ts + 9292, ts + 7533} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -118608,7 +119085,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+16146, -1) + Xsqlite3_result_error(tls, context, ts+16193, -1) return } iVal = -iVal @@ -118912,7 +119389,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+16163, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+16210, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -119102,7 +119579,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -119215,13 +119692,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -119244,7 +119735,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+16168, -1) + Xsqlite3_result_error(tls, context, ts+16215, -1) return } if argc == 3 { @@ -119254,7 +119745,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+16201, -1) + ts+16248, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -119307,7 +119798,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+4479, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+4493, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -119347,13 +119838,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+6263, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+6277, 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+16246, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+16293, libc.VaList(bp+8, r1)) } } break @@ -119361,7 +119852,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1304, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1324, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -119390,13 +119881,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+16253, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+16300, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1525, 4) + Xsqlite3_str_append(tls, pStr, ts+1545, 4) break } @@ -119706,7 +120197,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 12196} +var azOne = [1]uintptr{ts + 12210} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -119718,7 +120209,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1524 + zIn = ts + 1544 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -119742,7 +120233,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+16256, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+16303, 4, uintptr(0)) } } @@ -119767,7 +120258,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+13376, -1) + Xsqlite3_result_error(tls, context, ts+13390, -1) return } @@ -119845,7 +120336,7 @@ func sumFinalize(tls *libc.TLS, context 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+16146, -1) + Xsqlite3_result_error(tls, context, ts+16193, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -120107,7 +120598,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+16261, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+16308, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -120127,14 +120618,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+16267, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+16314, 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+16267, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+16314, 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+16267, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16267, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16314, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16314, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -120374,107 +120865,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 16272}, - {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 + 16292}, - {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 + 16305}, - {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 + 16323}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16332}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16340}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16340}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16355}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16381}, - {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 + 16406}, - {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 + 16415}, - {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 + 16426}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 16433}, - {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 + 16447}, - {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 + 16447}, - {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 + 16453}, - {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 + 16453}, - {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 + 16459}, - {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 + 16459}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16464}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16464}, - {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 + 16464}, - {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 + 16468}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16468}, - {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 + 16468}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16479}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16487}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16494}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16500}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16507}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16514}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16522}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16527}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16531}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16531}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16543}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16549}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16553}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16560}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16567}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16578}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16585}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16600}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16617}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16628}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16634}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16652}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16660}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16674}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16682}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16691}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16691}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16698}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16698}, - {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 + 16708}, - {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 + 16712}, - {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 + 16718}, - {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 + 16722}, - {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 + 16722}, - {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 + 16728}, - {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 + 16728}, - {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 + 16741}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16267}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16267}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7864}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7864}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16746}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16751}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16759}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16771}, - {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 + 16774}, - {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 + 16778}, - {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 + 16784}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16774}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16789}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16793}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16797}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16803}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16807}, + {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 + 16319}, + {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 + 16339}, + {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 + 16352}, + {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 + 16370}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16379}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16387}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16402}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16428}, + {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 + 16453}, + {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 + 16462}, + {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 + 16473}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 16480}, + {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 + 16494}, + {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 + 16494}, + {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 + 16500}, + {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 + 16500}, + {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 + 16506}, + {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 + 16506}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16511}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16511}, + {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 + 16511}, + {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 + 16515}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16515}, + {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 + 16515}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16534}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16541}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16547}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16554}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16561}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16569}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16574}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16578}, + {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 + 16584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16590}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16596}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16600}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16607}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16614}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16625}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16632}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16647}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16664}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16675}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16681}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16699}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16707}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16721}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16729}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16738}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16738}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16745}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16745}, + {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 + 16755}, + {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 + 16759}, + {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 + 16765}, + {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 + 16769}, + {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 + 16769}, + {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 + 16775}, + {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 + 16775}, + {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 + 16788}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16314}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16314}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7878}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7878}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16793}, + {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 + 16806}, {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(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16822}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16828}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16832}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16818}, + {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 + 16821}, + {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 + 16825}, + {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 + 16831}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16821}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16836}, - {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 + 16845}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16850}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16855}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16861}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16867}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16873}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16878}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16886}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16894}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16897}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 7864}, - {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 + 16902}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16840}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16844}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16850}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16854}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16859}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16864}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16869}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16875}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16879}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16883}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16887}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16892}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16897}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16908}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16914}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16920}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16925}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16933}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16941}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16944}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 7878}, + {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 + 16949}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -120595,7 +121086,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+16906, + ts+16953, 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) @@ -121255,8 +121746,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 7730, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 7726, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 7744, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 7740, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -121335,7 +121826,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+6474) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+6488) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -121438,7 +121929,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -121546,6 +122037,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -121586,13 +122098,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -121604,21 +122115,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -121689,7 +122190,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -121747,7 +122248,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9248, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9262, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -122050,6 +122551,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -122213,7 +122716,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+16951, + ts+16998, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -122238,7 +122741,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16992, + Xsqlite3ErrorMsg(tls, pParse, ts+17039, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -122387,7 +122890,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+17024, + ts+17071, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -122397,7 +122900,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+17076, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+17123, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -122449,7 +122952,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+17101, + Xsqlite3ErrorMsg(tls, pParse, ts+17148, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -122457,7 +122960,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+17147, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17194, 0) goto insert_cleanup __57: ; @@ -122639,7 +123142,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -122654,137 +123170,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -122796,64 +123312,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17168) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17215) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -122861,7 +123381,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -123164,7 +123688,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13351, 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) @@ -124255,13 +124779,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1524 + zSql = ts + 1544 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -124700,6 +125224,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -124738,7 +125263,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13376, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13390, 0) __3: ; return SQLITE_ERROR @@ -124747,7 +125272,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 17182 + zEntry = ts + 17229 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -124762,7 +125287,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+13337, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+13351, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -124798,7 +125323,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+17205, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+17252, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/' || int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '\\')) { @@ -124812,7 +125337,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17214, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17261, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -124836,7 +125361,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17218, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17265, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -124854,7 +125379,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+17224, libc.VaList(bp+16, zEntry, zFile)) + ts+17271, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -124881,7 +125406,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17267, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17314, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -124919,7 +125444,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+17299, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+17346, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -124929,7 +125454,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 17336, + ts + 17383, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -125085,7 +125610,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+17340, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+17387, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -125093,63 +125618,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 6395, - ts + 17379, - ts + 10152, - ts + 17383, - ts + 17388, - ts + 17391, - ts + 17401, - ts + 17411, - ts + 17417, - ts + 17421, + ts + 6409, ts + 17426, - ts + 17431, - ts + 17439, - ts + 17450, - ts + 17453, - ts + 17460, - ts + 17421, - ts + 17426, - ts + 17467, - ts + 17472, - ts + 17475, - ts + 17482, - ts + 17417, - ts + 17421, - ts + 17488, - ts + 17493, - ts + 17498, - ts + 17421, - ts + 17502, - ts + 17426, - ts + 17510, + ts + 10166, + ts + 17430, + ts + 17435, + ts + 17438, + ts + 17448, + ts + 17458, + ts + 17464, + ts + 17468, + ts + 17473, + ts + 17478, + ts + 17486, + ts + 17497, + ts + 17500, + ts + 17507, + ts + 17468, + ts + 17473, ts + 17514, ts + 17519, - ts + 12768, - ts + 12764, - ts + 17525, - ts + 17530, + ts + 17522, + ts + 17529, + ts + 17464, + ts + 17468, ts + 17535, - ts + 17379, - ts + 17421, ts + 17540, - ts + 17547, - ts + 17554, - ts + 10152, - ts + 17562, - ts + 6398, - ts + 17568, - ts + 17379, - ts + 17421, - ts + 17573, - ts + 17578, - ts + 16774, - ts + 17583, - ts + 17596, - ts + 17605, - ts + 17612, - ts + 17623, + ts + 17545, + ts + 17468, + ts + 17549, + ts + 17473, + ts + 17557, + ts + 17561, + ts + 17566, + ts + 12782, + ts + 12778, + ts + 17572, + ts + 17577, + ts + 17582, + ts + 17426, + ts + 17468, + ts + 17587, + ts + 17594, + ts + 17601, + ts + 10166, + ts + 17609, + ts + 6412, + ts + 17615, + ts + 17426, + ts + 17468, + ts + 17620, + ts + 17625, + ts + 16821, + ts + 17630, + ts + 17643, + ts + 17652, + ts + 17659, + ts + 17670, } // Definitions of all built-in pragmas @@ -125167,241 +125692,241 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [67]PragmaName{ - {FzName: ts + 17631, + {FzName: ts + 17678, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17646, + {FzName: ts + 17693, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 17661, + {FzName: ts + 17708, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17673, + {FzName: ts + 17720, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 17689, + {FzName: ts + 17736, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 17612, + {FzName: ts + 17659, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17702, + {FzName: ts + 17749, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17714, + {FzName: ts + 17761, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17734, + {FzName: ts + 17781, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 17750, + {FzName: ts + 17797, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 17771, + {FzName: ts + 17818, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 17786, + {FzName: ts + 17833, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17802, + {FzName: ts + 17849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 17816, + {FzName: ts + 17863, FePragTyp: U8(PragTyp_DATA_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17837, + {FzName: ts + 17884, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 17850, + {FzName: ts + 17897, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 17864, + {FzName: ts + 17911, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 17883, + {FzName: ts + 17930, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 17902, + {FzName: ts + 17949, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 17925, + {FzName: ts + 17972, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17934, + {FzName: ts + 17981, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 17952, + {FzName: ts + 17999, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 17969, + {FzName: ts + 18016, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 17982, + {FzName: ts + 18029, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 17997, + {FzName: ts + 18044, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 18015, + {FzName: ts + 18062, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 18025, + {FzName: ts + 18072, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 18039, + {FzName: ts + 18086, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18055, + {FzName: ts + 18102, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 18080, + {FzName: ts + 18127, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 18099, + {FzName: ts + 18146, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 18110, + {FzName: ts + 18157, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 18121, + {FzName: ts + 18168, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 18133, + {FzName: ts + 18180, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 18149, + {FzName: ts + 18196, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18162, + {FzName: ts + 18209, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18181, + {FzName: ts + 18228, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 18200, + {FzName: ts + 18247, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18213, + {FzName: ts + 18260, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18228, + {FzName: ts + 18275, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 18238, + {FzName: ts + 18285, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 18250, + {FzName: ts + 18297, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 18259, + {FzName: ts + 18306, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18270, + {FzName: ts + 18317, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 18280, + {FzName: ts + 18327, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 18292, + {FzName: ts + 18339, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 18303, + {FzName: ts + 18350, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 18315, + {FzName: ts + 18362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 18332, + {FzName: ts + 18379, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 18351, + {FzName: ts + 18398, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 18377, + {FzName: ts + 18424, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 18392, + {FzName: ts + 18439, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18406, + {FzName: ts + 18453, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 18425, + {FzName: ts + 18472, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 18439, + {FzName: ts + 18486, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18455, + {FzName: ts + 18502, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 18467, + {FzName: ts + 18514, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 18478, + {FzName: ts + 18525, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 18489, + {FzName: ts + 18536, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 18501, + {FzName: ts + 18548, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 18512, + {FzName: ts + 18559, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 18533, + {FzName: ts + 18580, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18541, + {FzName: ts + 18588, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 18556, + {FzName: ts + 18603, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 18569, + {FzName: ts + 18616, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 18588, + {FzName: ts + 18635, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 18603, + {FzName: ts + 18650, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -125423,7 +125948,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 18619)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 18666)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -125435,10 +125960,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+5003) { + if 0 == Xsqlite3StrICmp(tls, z, ts+5017) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+18644) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18691) { return PAGER_LOCKINGMODE_NORMAL } } @@ -125447,13 +125972,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+9296) { + if 0 == Xsqlite3StrICmp(tls, z, ts+9310) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+18651) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18698) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+18656) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18703) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -125468,9 +125993,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+17573) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17620) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+18668) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+18715) == 0 { return 2 } else { return 0 @@ -125484,7 +126009,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+18675, 0) + ts+18722, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -125575,19 +126100,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 18737 + zName = ts + 18784 break case OE_SetDflt: - zName = ts + 18746 + zName = ts + 18793 break case OE_Cascade: - zName = ts + 18758 + zName = ts + 18805 break case OE_Restrict: - zName = ts + 18766 + zName = ts + 18813 break default: - zName = ts + 18775 + zName = ts + 18822 break } return zName @@ -125604,7 +126129,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 18785, ts + 18792, ts + 18800, ts + 18804, ts + 18668, ts + 18813, + ts + 18832, ts + 18839, ts + 18847, ts + 18851, ts + 18715, ts + 18860, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -125651,13 +126176,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 18817 + zType = ts + 18864 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 18819 + zType = ts + 18866 } else { - zType = ts + 8806 + zType = ts + 8820 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18821, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18868, 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), @@ -125665,7 +126190,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 18828, ts + 18833, ts + 18841} +var azEnc = [4]uintptr{uintptr(0), ts + 18875, ts + 18880, ts + 18888} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -125690,8 +126215,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(624) - defer tls.Free(624) + bp := tls.Alloc(680) + defer tls.Free(680) var zLeft uintptr var zRight uintptr @@ -125798,13 +126323,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -125824,6 +126358,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -125874,7 +126410,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+448) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+488) if !(iDb < 0) { goto __2 } @@ -125889,7 +126425,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 448))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 488))) if !!(zLeft != 0) { goto __4 } @@ -125899,7 +126435,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+18849, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+18896, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -125916,30 +126452,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 456 + 1*8)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 456 + 2*8)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 456 + 3*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 496)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 496 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 496 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 496 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+456) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+496) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 456)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 456))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 456))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 496)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 496))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 496))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 456)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 496)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+4479, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 456))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 496)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 496))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -126163,7 +126699,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+18853) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+18900) == 0) { goto __65 } b = 2 @@ -126197,7 +126733,7 @@ __67: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -126206,36 +126742,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __72 __71: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+488) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+528) == 0) { goto __73 } - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(0)) { goto __75 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0) goto __76 __75: - if !(*(*I64)(unsafe.Pointer(bp + 488)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 528)) > int64(0xfffffffe)) { goto __77 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0xfffffffe) __77: ; __76: ; goto __74 __73: - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0) __74: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 488)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 528)))) __72: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 18644 + zRet = ts + 18691 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -126273,7 +126809,7 @@ __79: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } - zRet = ts + 5003 + zRet = ts + 5017 __84: ; returnSingleText(tls, v, zRet) @@ -126354,21 +126890,21 @@ __96: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 496)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 536)) = int64(-2) if !(zRight != 0) { goto __98 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+496) - if !(*(*I64)(unsafe.Pointer(bp + 496)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+536) + if !(*(*I64)(unsafe.Pointer(bp + 536)) < int64(-1)) { goto __99 } - *(*I64)(unsafe.Pointer(bp + 496)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 536)) = int64(-1) __99: ; __98: ; - *(*I64)(unsafe.Pointer(bp + 496)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 496))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 496))) + *(*I64)(unsafe.Pointer(bp + 536)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 536))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 536))) goto __15 __23: @@ -126410,15 +126946,15 @@ __101: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 504)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+504) != 0) || *(*int32)(unsafe.Pointer(bp + 504)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 544)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+544) != 0) || *(*int32)(unsafe.Pointer(bp + 544)) <= 0) { goto __104 } - *(*int32)(unsafe.Pointer(bp + 504)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 544)) = 0x7fffffff __104: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 504)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 544)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -126455,14 +126991,14 @@ __26: }()) goto __108 __107: - *(*int32)(unsafe.Pointer(bp + 508)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+508) != 0) { + *(*int32)(unsafe.Pointer(bp + 548)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+548) != 0) { goto __109 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 508))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 548))) __109: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 508)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 548)) != 0))) != 0) { goto __110 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -126481,17 +127017,17 @@ __27: if !(zRight != 0) { goto __112 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+512) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+552) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) < int64(0)) { goto __113 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) = Xsqlite3Config.FszMmap __113: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __114 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) __114: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -126502,7 +127038,7 @@ __115: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __118 } - Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 552))) __118: ; goto __116 @@ -126514,12 +127050,12 @@ __117: ; __112: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+512) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+552) if !(rc == SQLITE_OK) { goto __119 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 552))) goto __120 __119: if !(rc != SQLITE_NOTFOUND) { @@ -126556,11 +127092,11 @@ __124: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __126 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+520) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 520)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+560) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 560)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+18858, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18905, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __127: @@ -126579,7 +127115,7 @@ __128: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __129 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+16, zRight)) goto __130 __129: Xsqlite3_temp_directory = uintptr(0) @@ -126601,11 +127137,11 @@ __131: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __133 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+524) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 524)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+564) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 564)) == 0) { goto __134 } - Xsqlite3ErrorMsg(tls, pParse, ts+18858, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18905, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __134: @@ -126616,7 +127152,7 @@ __133: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __135 } - Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+24, zRight)) + Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, zRight)) goto __136 __135: Xsqlite3_data_directory = uintptr(0) @@ -126638,7 +127174,7 @@ __137: goto __139 } Xsqlite3ErrorMsg(tls, pParse, - ts+18883, 0) + ts+18930, 0) goto __140 __139: if !(iDb != 1) { @@ -126692,7 +127228,7 @@ __146: __148: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+18936) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+18983) == 0) { goto __149 } @@ -126789,13 +127325,13 @@ __162: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 18942 + return ts + 18989 } - return ts + 18950 + return ts + 18997 }(), libc.VaList(bp+32, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1524), + Xsqlite3ColumnType(tls, pCol, ts+1544), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -126860,20 +127396,20 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __178 } - zSql = Xsqlite3MPrintf(tls, db, ts+18957, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+19004, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __179 } - *(*uintptr)(unsafe.Pointer(bp + 528)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+528, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 528))) + *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+568, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 568))) Xsqlite3DbFree(tls, db, zSql) __179: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __180 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1460, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1480, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __180: ; @@ -126906,29 +127442,29 @@ __184: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __185 } - zType = ts + 11767 + zType = ts + 11781 goto __186 __185: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __187 } - zType = ts + 14049 + zType = ts + 14063 goto __188 __187: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __189 } - zType = ts + 18973 + zType = ts + 19020 goto __190 __189: - zType = ts + 10152 + zType = ts + 10166 __190: ; __188: ; __186: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18980, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19027, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -126994,7 +127530,7 @@ __197: goto __199 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18987, libc.VaList(bp+144, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19034, libc.VaList(bp+144, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -127004,7 +127540,7 @@ __197: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __200 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18992, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+19039, 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)))) @@ -127041,12 +127577,12 @@ __203: if !(pIdx1 != 0) { goto __205 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536)) = [3]uintptr{ts + 18997, ts + 18999, ts + 17450} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19001, + *(*[3]uintptr)(unsafe.Pointer(bp + 576)) = [3]uintptr{ts + 19044, ts + 19046, ts + 17497} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19048, libc.VaList(bp+192, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 536 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 576 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __204 __204: @@ -127075,7 +127611,7 @@ __206: goto __207 __209: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19007, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19054, 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))) @@ -127091,13 +127627,13 @@ __208: __38: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __210: if !(p != 0) { goto __212 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19011, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19058, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __211 __211: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -127136,7 +127672,7 @@ __214: goto __215 __215: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __219: if !(j != 0) { goto __221 @@ -127155,13 +127691,13 @@ __221: __40: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __222: if !(j1 != 0) { goto __224 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8806, libc.VaList(bp+272, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8820, libc.VaList(bp+272, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __223 __223: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -127177,7 +127713,7 @@ __225: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __227 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8806, libc.VaList(bp+280, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8820, libc.VaList(bp+280, aPragmaName[i6].FzName)) goto __226 __226: i6++ @@ -127212,7 +127748,7 @@ __233: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __235 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19014, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19061, libc.VaList(bp+288, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -127220,7 +127756,7 @@ __233: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+19023)) + ts+19070)) goto __234 __234: j2++ @@ -127293,20 +127829,20 @@ __242: goto __243 __245: ; - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = 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+560, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, uintptr(0)) if !(x1 == 0) { goto __246 } - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) == uintptr(0)) { goto __248 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __249 __248: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 560))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 600))) __249: ; goto __247 @@ -127344,12 +127880,12 @@ __252: goto __254 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 608)) = uintptr(0) if !(pParent != 0) { goto __255 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+560, bp+568) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, bp+608) __255: ; @@ -127366,8 +127902,8 @@ __257: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __259 } - if *(*uintptr)(unsafe.Pointer(bp + 568)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 568)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 608)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 608)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -127380,11 +127916,11 @@ __258: goto __259 __259: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) != 0) { goto __260 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __261 @@ -127409,10 +127945,10 @@ __263: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __264: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+19028, libc.VaList(bp+352, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+19075, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 608))) goto __253 __253: i8++ @@ -127450,17 +127986,17 @@ __266: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __267 } - if !(Xsqlite3GetInt32(tls, zRight, bp+576) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+616) != 0) { goto __268 } - if !(*(*int32)(unsafe.Pointer(bp + 576)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 616)) <= 0) { goto __270 } - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __270: ; goto __269 @@ -127476,7 +128012,7 @@ __269: ; __267: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 576))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 616))-1, 1) i9 = 0 __271: @@ -127626,7 +128162,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+19032, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+19079, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -127653,178 +128189,307 @@ __300: goto __298 __301: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __302 } + pPk1 = uintptr(0) + r2 = 0 + goto __303 +__302: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__303: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+580, bp+584) + 1, uintptr(0), bp+620, bp+624) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__302: +__304: if !(pIdx5 != 0) { - goto __304 + goto __306 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __303 -__303: + goto __305 +__305: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __302 goto __304 -__304: + goto __306 +__306: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 580)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 620)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__307: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __308 + } + mxCol-- + goto __307 +__308: + ; + if !(mxCol >= 0) { + goto __309 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__309: + ; if !!(isQuick != 0) { - goto __305 + goto __310 } + if !(pPk1 != 0) { + goto __311 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 620)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 580)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__305: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+19103, + libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__312: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __314 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 620)), j4, r2+j4) + goto __313 +__313: + j4++ + goto __312 + goto __314 +__314: + ; +__311: + ; +__310: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__306: +__315: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __308 + goto __317 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __309 + goto __318 } - goto __307 -__309: + goto __316 +__318: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __310 + if !(bStrict != 0) { + goto __319 } - goto __307 -__310: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __320 +__319: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__320: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __321 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 580)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __311 + goto __316 +__321: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __322 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__311: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) + p11 = -1 + p3 = 3 + goto __323 +__322: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __324 + } + *(*uintptr)(unsafe.Pointer(bp + 632)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+632) + if !(*(*uintptr)(unsafe.Pointer(bp + 632)) != 0) { + goto __325 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) +__325: + ; +__324: ; + p11 = *(*int32)(unsafe.Pointer(bp + 620)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __326 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __327 +__326: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__327: + ; +__323: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __312 + goto __328 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+19056, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19139, libc.VaList(bp+384, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __313 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __329 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __314 -__313: - integrityCheckResultRow(tls, v) -__314: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__312: + goto __330 +__329: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __315 +__330: + ; +__328: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __331 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+19076, - libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19159, + libc.VaList(bp+400, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__315: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __332 +__331: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __333 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19181, + libc.VaList(bp+424, (*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, zErr1, -6) + goto __334 +__333: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __335 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __336 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) +__336: ; - goto __307 -__307: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+19204, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19206, + libc.VaList(bp+440, (*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, zErr1, -6) +__335: + ; +__334: + ; +__332: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __316 +__316: j4++ - goto __306 - goto __308 -__308: + goto __315 + goto __317 +__317: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __316 + goto __337 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __317 + goto __338 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 580)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 620)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__318: +__339: if !(k3 > 0) { - goto __320 + goto __341 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __319 -__319: + goto __340 +__340: k3-- - goto __318 - goto __320 -__320: + goto __339 + goto __341 +__341: ; 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+19098, - libc.VaList(bp+416, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+19226, + libc.VaList(bp+456, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__317: +__338: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__316: +__337: ; if !!(isQuick != 0) { - goto __321 + goto __342 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__322: +__343: if !(pIdx5 != 0) { - goto __324 + goto __345 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __325 + goto __346 } - goto __323 -__325: + goto __344 +__346: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 580)), 0, 0, bp+588, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 620)), 0, 0, bp+640, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 624))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+19128) + Xsqlite3VdbeLoadString(tls, v, 3, ts+19256) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+19133) + Xsqlite3VdbeLoadString(tls, v, 4, ts+19261) 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) @@ -127832,87 +128497,93 @@ __325: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __326 + goto __347 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__327: +__348: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __329 + goto __350 } 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 __330 + goto __351 } - goto __328 -__330: + goto __349 +__351: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __328 -__328: + goto __349 +__349: kk++ - goto __327 - goto __329 -__329: + goto __348 + goto __350 +__350: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 584))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 624))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 624))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+19154) + Xsqlite3VdbeLoadString(tls, v, 3, ts+19282) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__326: +__347: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 588))) - goto __323 -__323: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 640))) + goto __344 +__344: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __322 - goto __324 -__324: + goto __343 + goto __345 +__345: ; -__321: +__342: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 580)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 620)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __331 + goto __352 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+19181) + Xsqlite3VdbeLoadString(tls, v, 2, ts+19309) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__332: +__353: if !(pIdx5 != 0) { - goto __334 + goto __355 } if !(pPk1 == pIdx5) { - goto __335 + goto __356 } - goto __333 -__335: + goto __354 +__356: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 584))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 624))+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 __333 -__333: + goto __354 +__354: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __332 - goto __334 -__334: + goto __353 + goto __355 +__355: ; -__331: + if !(pPk1 != 0) { + goto __357 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__357: + ; +__352: ; goto __298 __298: @@ -127930,14 +128601,14 @@ __273: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __336 + goto __358 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 616)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19210 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19338 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__336: +__358: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -127945,27 +128616,27 @@ __336: __46: if !!(zRight != 0) { - goto __337 + goto __359 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __339 + goto __361 } goto pragma_out -__339: +__361: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __338 -__337: + goto __360 +__359: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __340 + goto __362 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__341: +__363: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __343 + goto __365 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __344 + goto __366 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -127974,25 +128645,25 @@ __341: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __343 -__344: + goto __365 +__366: ; - goto __342 -__342: + goto __364 +__364: pEnc += 16 - goto __341 - goto __343 -__343: + goto __363 + goto __365 +__365: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __345 + goto __367 } - Xsqlite3ErrorMsg(tls, pParse, ts+19213, libc.VaList(bp+424, zRight)) -__345: + Xsqlite3ErrorMsg(tls, pParse, ts+19341, libc.VaList(bp+464, zRight)) +__367: ; -__340: +__362: ; -__338: +__360: ; goto __15 @@ -128000,50 +128671,57 @@ __47: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __346 + goto __368 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __348 + goto __370 } goto __15 -__348: +__370: ; (*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 __347 -__346: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __371 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__371: + ; + goto __369 +__368: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __349 + goto __372 } goto __15 -__349: +__372: ; (*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) -__347: +__369: ; goto __15 __48: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__350: +__373: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __351 + goto __374 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __350 -__351: + goto __373 +__374: ; Xsqlite3VdbeReusable(tls, v) @@ -128058,31 +128736,31 @@ __49: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __352 + goto __375 } - if !(Xsqlite3StrICmp(tls, zRight, ts+18651) == 0) { - goto __353 + if !(Xsqlite3StrICmp(tls, zRight, ts+18698) == 0) { + goto __376 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __354 -__353: - if !(Xsqlite3StrICmp(tls, zRight, ts+19238) == 0) { - goto __355 + goto __377 +__376: + if !(Xsqlite3StrICmp(tls, zRight, ts+19366) == 0) { + goto __378 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __356 -__355: - if !(Xsqlite3StrICmp(tls, zRight, ts+18804) == 0) { - goto __357 + goto __379 +__378: + if !(Xsqlite3StrICmp(tls, zRight, ts+18851) == 0) { + goto __380 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__357: +__380: ; -__356: +__379: ; -__354: +__377: ; -__352: +__375: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -128092,10 +128770,10 @@ __352: __50: if !(zRight != 0) { - goto __358 + goto __381 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__358: +__381: ; returnSingleInt(tls, v, func() int64 { @@ -128115,19 +128793,19 @@ __51: __52: if !(zRight != 0) { - goto __359 + goto __382 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __361 + goto __384 } goto __15 -__361: +__384: ; - goto __360 -__359: + goto __383 +__382: opMask = U32(0xfffe) -__360: +__383: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -128136,86 +128814,86 @@ __360: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__362: +__385: if !(iDb <= iDbLast) { - goto __364 + goto __387 } if !(iDb == 1) { - goto __365 + goto __388 } - goto __363 -__365: + goto __386 +__388: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__366: +__389: if !(k4 != 0) { - goto __368 + goto __391 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __369 + goto __392 } - goto __367 -__369: + goto __390 +__392: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__370: +__393: if !(pIdx6 != 0) { - goto __372 + goto __395 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __373 + goto __396 } szThreshold = int16(0) - goto __372 -__373: + goto __395 +__396: ; - goto __371 -__371: + goto __394 +__394: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __370 - goto __372 -__372: + goto __393 + goto __395 +__395: ; if !(szThreshold != 0) { - goto __374 + goto __397 } 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)) -__374: +__397: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+19246, - libc.VaList(bp+432, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+19374, + libc.VaList(bp+472, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __375 + goto __398 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __376 -__375: + goto __399 +__398: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__376: +__399: ; - goto __367 -__367: + goto __390 +__390: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __366 - goto __368 -__368: + goto __389 + goto __391 +__391: ; - goto __363 -__363: + goto __386 +__386: iDb++ - goto __362 - goto __364 -__364: + goto __385 + goto __387 +__387: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -128223,60 +128901,60 @@ __364: __53: ; if !(zRight != 0) { - goto __377 + goto __400 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__377: +__400: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __378 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __401 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__378: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__401: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __55: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK) { - goto __379 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK) { + goto __402 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)))) { - goto __380 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)))) { + goto __403 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 600))) -__380: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 656))) +__403: ; -__379: +__402: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __381 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __404 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608))&int64(0x7fffffff))) -__381: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664))&int64(0x7fffffff))) +__404: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __57: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+616) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) >= int64(0)) { - goto __382 + Xsqlite3DecOrHexToI64(tls, zRight, bp+672) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) >= int64(0)) { + goto __405 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) & int64(0x7fffffff)) -__382: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) & int64(0x7fffffff)) +__405: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -128284,10 +128962,10 @@ __382: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __383 + goto __406 } -__383: +__406: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -128320,6 +128998,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -128331,14 +129017,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 19264, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 19269, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 19275, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 19284, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 19293, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 19301, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 19309}, - {FzName: ts + 19316}, + {FzName: ts + 19392, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 19397, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 19403, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 19412, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 19421, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 19429, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 19437}, + {FzName: ts + 19444}, {}, } var setCookie = [2]VdbeOpList{ @@ -128390,7 +129076,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+19322) + Xsqlite3_str_appendall(tls, bp+32, ts+19450) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -128398,7 +129084,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+19337, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+19465, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -128411,19 +129097,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19344, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+19472, 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+19350) + Xsqlite3_str_appendall(tls, bp+32, ts+19478) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+19362) + Xsqlite3_str_appendall(tls, bp+32, ts+19490) j++ } - Xsqlite3_str_append(tls, bp+32, ts+6295, 1) + Xsqlite3_str_append(tls, bp+32, ts+6309, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -128439,7 +129125,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -128587,7 +129273,7 @@ __1: 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+4479, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -128603,13 +129289,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+19377) + Xsqlite3_str_appendall(tls, bp+32, ts+19505) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+19513, 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+19389, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+19517, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -128618,7 +129304,7 @@ __3: 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+4479, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -128686,33 +129372,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+19393, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+19521, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 6346 + zObj = ts + 6360 } - z = Xsqlite3MPrintf(tls, db, ts+19421, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+19549, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+19452, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+19580, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 19460, - ts + 19467, - ts + 19479, + ts + 19588, + ts + 19595, + ts + 19607, } // Check to see if any sibling index (another index on the same table) @@ -128772,7 +129458,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+15473) + corruptSchema(tls, pData, argv, ts+15487) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -128804,13 +129490,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+19490) + corruptSchema(tls, pData, argv, ts+19618) } 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+15473) + corruptSchema(tls, pData, argv, ts+15487) } } } @@ -128843,16 +129529,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 10152 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 10166 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 9216 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19503 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 9230 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19631 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -128937,7 +129623,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+13051) + ts+13065) rc = SQLITE_ERROR goto initone_error_out __13: @@ -128972,7 +129658,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+19575) + Xsqlite3SetString(tls, pzErrMsg, db, ts+19703) rc = SQLITE_ERROR goto initone_error_out __17: @@ -128986,7 +129672,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+19599, + ts+19727, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -129169,16 +129855,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -129246,20 +129936,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1460, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1480, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -129271,8 +129961,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -129281,7 +129971,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1460, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1480, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -129292,7 +129982,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -129312,7 +130002,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+19633, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+19761, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -129328,100 +130018,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19663, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19791, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+4479, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+4493, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -129434,7 +130128,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -129533,7 +130227,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -129676,7 +130370,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -129851,8 +130545,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 12196 - var zSp2 uintptr = ts + 12196 + var zSp1 uintptr = ts + 12210 + var zSp2 uintptr = ts + 12210 if pB == uintptr(0) { zSp1++ } @@ -129860,13 +130554,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+19682, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+19810, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19712)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19840)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -130041,7 +130735,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19746, libc.VaList(bp, 0)) + ts+19874, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -130086,7 +130780,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19796, libc.VaList(bp+8, zName)) + ts+19924, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -130097,7 +130791,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19860, + Xsqlite3ErrorMsg(tls, pParse, ts+19988, libc.VaList(bp+16, zName)) break } @@ -130141,7 +130835,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 7864, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 7878, Fn: uint32(8)} // 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. @@ -130488,6 +131182,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -130663,7 +131360,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -130725,16 +131422,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 19897 + z = ts + 20025 break case TK_INTERSECT: - z = ts + 19907 + z = ts + 20035 break case TK_EXCEPT: - z = ts + 19917 + z = ts + 20045 break default: - z = ts + 19924 + z = ts + 20052 break } return z @@ -130744,7 +131441,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19930, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20058, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -130950,8 +131647,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1089 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 17562 + zType = ts + 1109 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 17609 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -131090,13 +131787,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 17562 + zCol = ts + 17609 } 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+13337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+13351, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -131104,7 +131801,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+19953, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+20081, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -131194,7 +131891,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 17562 + zName = ts + 17609 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -131204,7 +131901,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+19953, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+20081, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -131220,7 +131917,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+19962, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+20090, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -131507,7 +132204,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+19970, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20098, 0) return __1: ; @@ -131598,7 +132295,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+20019, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20147, 0) goto end_of_recursive_query __15: ; @@ -131618,7 +132315,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20061, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20189, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -131655,7 +132352,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20067, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20195, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -131689,11 +132386,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+20082, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20210, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1524 + return ts + 1544 } - return ts + 20105 + return ts + 20233 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -131794,8 +132491,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20107, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20122, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20235, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20250, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -131842,7 +132539,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19897, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20025, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -131909,7 +132606,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20141, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20269, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -131971,7 +132668,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20141, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20269, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -132124,10 +132821,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20162, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20290, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+20208, + ts+20336, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -132381,8 +133078,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+8512) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+8512) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8526) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+8526) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -132409,13 +133106,13 @@ 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+20290, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20418, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+20301, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20429, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -132427,7 +133124,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+20306, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20434, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -132528,7 +133225,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -132554,6 +133251,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -132570,7 +133268,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -132607,7 +133305,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -132618,6 +133317,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -132642,15 +133342,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1069 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1089 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -132827,9 +133532,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -132898,7 +133610,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -132914,17 +133625,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -132945,7 +133647,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -132957,6 +133658,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -133112,6 +133824,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -133135,8 +133848,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -133312,8 +134025,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -133330,6 +134043,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -133359,6 +134077,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -133392,12 +134111,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+16464) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+16511) == 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+16468) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+16515) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -133463,7 +134182,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+20312, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+20440, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -133546,7 +134265,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20330, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20458, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -133675,7 +134394,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+20353, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20481, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -133701,7 +134420,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+20373, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+20501, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -133717,7 +134436,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20416 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20544 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -133743,7 +134462,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+20439, + Xsqlite3ErrorMsg(tls, pParse, ts+20567, 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 @@ -133754,9 +134473,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 + 20477 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20605 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20511 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20639 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -133783,9 +134502,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -133803,7 +134522,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+20549, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+20677, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -133915,7 +134634,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+20553, + Xsqlite3ErrorMsg(tls, pParse, ts+20681, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -133934,7 +134653,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+20592, + Xsqlite3ErrorMsg(tls, pParse, ts+20720, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -133942,7 +134661,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+20623, + Xsqlite3ErrorMsg(tls, pParse, ts+16080, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -134043,7 +134762,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 7724 + zSchemaName = ts + 7738 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -134058,7 +134777,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20656, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20751, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -134123,7 +134842,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20661, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20756, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -134135,7 +134854,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+13337, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+13351, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -134154,9 +134873,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20670, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20765, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+20688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20783, 0) } } } @@ -134166,7 +134885,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+20708, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20803, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -134316,13 +135035,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+20739, 0) + ts+20834, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20790, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20885, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -134503,19 +135222,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+20823, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20918, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 20835 + return ts + 20930 } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1524 + return ts + 1544 }())) } } @@ -134528,7 +135247,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+9216) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+9230) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -134686,7 +135405,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -134785,7 +135503,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+20858, + ts+20953, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -134846,7 +135564,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+20912, + Xsqlite3ErrorMsg(tls, pParse, ts+21007, 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 __15: @@ -134950,7 +135668,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1524, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1544, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -134960,7 +135678,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -134992,7 +135710,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20952, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21047, 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), 5, 0x20) @@ -135050,8 +135768,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20967, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21062, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -135085,7 +135806,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -135178,16 +135899,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -135196,13 +135922,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -135214,52 +135940,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -135277,111 +136003,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -135400,33 +136126,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -135434,28 +136160,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -135466,7 +136192,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -135477,7 +136203,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -135503,7 +136229,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -135516,27 +136242,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 20983 + return ts + 21078 } - return ts + 20992 + return ts + 21087 }()) groupBySort = 1 @@ -135544,49 +136270,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -135600,45 +136326,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -135657,16 +136383,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -135697,16 +136423,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -135719,98 +136445,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -135819,79 +136545,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+20983) -__147: + explainTempTable(tls, pParse, ts+21078) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 21001 + return ts + 21096 } - return ts + 21024 + return ts + 21119 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -135966,7 +136692,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -135988,7 +136714,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+21033, 0) + ts+21128, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -136084,7 +136810,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+4479, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -136176,7 +136902,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -136221,7 +136947,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+21098, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21193, 0) goto trigger_cleanup __3: ; @@ -136265,7 +136991,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+21144, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+21239, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -136283,7 +137009,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+21152, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21247, 0) goto trigger_orphan_error __11: ; @@ -136295,7 +137021,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+21144, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+21239, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -136310,7 +137036,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+21193, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21288, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -136322,22 +137048,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+21219, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21314, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+21257, + Xsqlite3ErrorMsg(tls, pParse, ts+21352, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 21294 + return ts + 21389 } - return ts + 21301 + return ts + 21396 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -136346,7 +137072,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+21307, libc.VaList(bp+24, pTableName+8)) + ts+21402, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -136375,9 +137101,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -136495,7 +137221,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+21144, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+21239, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -136528,7 +137254,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+21353, + ts+21448, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -136553,13 +137279,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+21401, + ts+21496, libc.VaList(bp+16, (*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+21476, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+21571, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -136815,7 +137541,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+21505, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+21600, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -136854,9 +137580,9 @@ 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 + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -136868,7 +137594,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+21525, + ts+21620, 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) @@ -136982,12 +137708,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+21587, + ts+21682, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 21635 + return ts + 21730 } - return ts + 21642 + return ts + 21737 }())) __15: ; @@ -137101,7 +137827,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+21649, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21744, 0) return 1 } @@ -137152,7 +137878,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -137221,7 +137947,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+7418, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+7432, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -137284,8 +138010,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -137318,26 +138044,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+21691, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+21786, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -137354,7 +138080,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -137547,10 +138273,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -137559,7 +138287,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -137921,7 +138649,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+21705, + ts+21800, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -137953,7 +138681,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+21741, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21836, 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: @@ -137963,7 +138691,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 8991 + return ts + 9005 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -138833,7 +139561,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+21760) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+21855) __169: ; update_cleanup: @@ -139139,10 +139867,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+21773, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+21868, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+21777, libc.VaList(bp+8, bp+216)) + ts+21872, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -139233,7 +139961,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+13478, -1) + ts+13492, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -139265,7 +139993,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+21850, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21854, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+21945, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21949, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -139402,23 +140130,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21858) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21953) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21898) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21993) return SQLITE_ERROR __2: ; @@ -139429,7 +140159,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21941) + Xsqlite3SetString(tls, pzErrMsg, db, ts+22036) return SQLITE_ERROR __5: ; @@ -139438,7 +140168,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1524 + zOut = ts + 1544 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -139457,7 +140187,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21959, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+22054, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -139477,20 +140207,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21982) + Xsqlite3SetString(tls, pzErrMsg, db, ts+22077) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+15836) + rc = execSql(tls, db, pzErrMsg, ts+15850) if !(rc != SQLITE_OK) { goto __9 } @@ -139535,7 +140267,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+22009, + ts+22104, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -139544,7 +140276,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+22117, + ts+22212, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -139555,7 +140287,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+22171, + ts+22266, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -139566,7 +140298,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+22322, + ts+22417, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -139688,7 +140420,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -139730,7 +140462,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -139887,7 +140619,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -139911,7 +140643,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+13705, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13719, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -139995,11 +140727,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+22452, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+22547, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+22476, + ts+22571, 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, @@ -140009,7 +140741,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+22575, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+22670, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -140043,7 +140775,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -140070,7 +140802,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+22594, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+22689, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -140108,9 +140840,9 @@ 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+22636, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22731, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+4479, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+4493, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -140120,7 +140852,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 + 22666 + var zFormat uintptr = ts + 22761 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -140132,12 +140864,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1524) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1544) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+17453, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+17500, 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 @@ -140190,17 +140922,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+22712, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+22807, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+4479, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -140249,10 +140981,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+22712, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22807, 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) @@ -140272,8 +141004,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -140286,7 +141018,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -140328,7 +141060,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -140696,7 +141428,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -140739,7 +141471,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -140766,7 +141498,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -140994,31 +141726,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 22731 + return ts + 22826 } if i == -1 { - return ts + 17562 + return ts + 17609 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -141027,35 +141741,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+22738, 5) + Xsqlite3_str_append(tls, pStr, ts+22833, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+22744, 1) + Xsqlite3_str_append(tls, pStr, ts+22839, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+14095, 1) + Xsqlite3_str_append(tls, pStr, ts+14109, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+6295, 1) + Xsqlite3_str_append(tls, pStr, ts+6309, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+22744, 1) + Xsqlite3_str_append(tls, pStr, ts+22839, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+14095, 1) + Xsqlite3_str_append(tls, pStr, ts+14109, 1) } - Xsqlite3_str_append(tls, pStr, ts+6346, 1) + Xsqlite3_str_append(tls, pStr, ts+6360, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+6295, 1) + Xsqlite3_str_append(tls, pStr, ts+6309, 1) } } @@ -141072,29 +141786,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+22746, 2) + Xsqlite3_str_append(tls, pStr, ts+22841, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+22738, 5) + Xsqlite3_str_append(tls, pStr, ts+22833, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 22749 + return ts + 22844 } - return ts + 22754 + return ts + 22849 }(), 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))), j, i, ts+22762) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+22857) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+22764) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+22859) } - Xsqlite3_str_append(tls, pStr, ts+6295, 1) + Xsqlite3_str_append(tls, pStr, ts+6309, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -141135,11 +141849,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+22766, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+22861, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 22772 + return ts + 22867 } - return ts + 22779 + return ts + 22874 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -141149,43 +141863,43 @@ 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 + 12252 + zFmt = ts + 12266 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 22784 + zFmt = ts + 22879 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 22817 + zFmt = ts + 22912 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 22842 + zFmt = ts + 22937 } else { - zFmt = ts + 22860 + zFmt = ts + 22955 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+22869, 7) + Xsqlite3_str_append(tls, bp+64, ts+22964, 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 + 17562 - Xsqlite3_str_appendf(tls, bp+64, ts+22877, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 17609 + Xsqlite3_str_appendf(tls, bp+64, ts+22972, 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+22908, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+23003, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+22918, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+23013, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22923, + Xsqlite3_str_appendf(tls, bp+64, ts+23018, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+22950, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+23045, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -141217,25 +141931,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22961, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+23056, 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+22749, 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+22844, 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+22982, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+23077, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+22738, 5) + Xsqlite3_str_append(tls, bp+24, ts+22833, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+22749, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+22844, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+6295, 1) + Xsqlite3_str_append(tls, bp+24, ts+6309, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -141596,7 +142310,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -141649,104 +142363,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -141785,7 +142401,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -141805,6 +142421,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -141955,12 +142573,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -141979,13 +142597,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -141998,7 +142616,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -142060,7 +142678,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -142207,6 +142825,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -142549,13 +143169,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -142563,104 +143190,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -142669,92 +143305,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -142764,24 +143394,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -142801,152 +143431,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22990, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23085, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23005, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23100, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -142955,121 +143586,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -143078,36 +143709,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -143125,219 +143756,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -143347,24 +143978,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -143375,41 +144006,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -143443,7 +144074,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -143451,13 +144082,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23014, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23109, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -143736,7 +144367,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -143749,7 +144380,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -143773,11 +144404,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -143809,10 +144440,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 17411, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 16741, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 16267, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 23028, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 17458, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 16788, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 16314, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 23123, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -143954,7 +144585,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -143971,10 +144602,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -144031,7 +144662,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -144217,6 +144848,7 @@ __3: 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 @@ -144272,7 +144904,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -144309,12 +144941,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+23035, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23130, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23035, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23130, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -144393,7 +145025,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8047 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8061 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -144487,7 +145119,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 23076 + return ts + 23171 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -144681,7 +145313,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -144860,7 +145492,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+23083, + Xsqlite3ErrorMsg(tls, pParse, ts+23178, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -144930,6 +145562,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -144956,10 +145591,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -144979,14 +145614,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -145023,14 +145658,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -145473,6 +146108,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -145482,11 +146129,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -145581,7 +146226,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+23119, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+23214, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -145652,7 +146297,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 23145 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 23240 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -145886,7 +146531,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -145948,11 +146593,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -146020,7 +146663,7 @@ __3: 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+1460, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1480, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -146142,9 +146785,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+4479, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+4479, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -146212,7 +146855,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -146561,9 +147204,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -146587,7 +147233,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -146603,32 +147250,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -146774,7 +147411,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -147017,13 +147654,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -147034,7 +147668,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -147089,31 +147724,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -147316,6 +147953,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -147447,6 +148142,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -147461,6 +148159,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -147491,7 +148192,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -147647,7 +148348,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+23156, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23251, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -147705,7 +148406,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+23156, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23251, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -148063,7 +148764,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -148075,7 +148776,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -148090,7 +148791,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -148103,7 +148804,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+23182, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+23277, 0) rc = SQLITE_OK } else { goto __3 @@ -148204,7 +148905,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -148378,7 +149079,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -148430,7 +149131,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -148458,7 +149159,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -148479,7 +149179,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -148501,7 +149200,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -148563,9 +149262,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -148581,7 +149279,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -148601,6 +149301,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -148697,8 +149402,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23217, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+23312, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -148710,7 +149415,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -148725,7 +149430,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -148745,7 +149450,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -148753,7 +149458,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -148763,7 +149468,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -148771,7 +149476,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -148803,7 +149508,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -148860,10 +149565,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -148907,16 +149612,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -148949,7 +149654,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -148961,9 +149666,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -148981,6 +149686,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -149067,7 +149824,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -149124,7 +149881,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+23235, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+23330, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -149147,31 +149904,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -149189,13 +149945,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+23263, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+23358, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -149206,169 +149962,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -149377,26 +150138,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -149404,37 +150165,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -149442,92 +150203,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -149537,24 +150304,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -149564,96 +150331,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -149661,30 +150428,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -149704,7 +150469,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -149840,11 +150605,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -149883,6 +150645,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -150055,7 +150827,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+23281, -1) + pCtx, ts+23376, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -150188,7 +150960,7 @@ 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+23337, -1) + pCtx, ts+23432, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -150278,17 +151050,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 23382)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 23393)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 23404)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 23409)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 23422)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 23432)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 23438)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 23449)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 23459)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 23471)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23476)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 23477)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 23488)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 23499)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 23504)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 23517)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 23527)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 23533)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 23544)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 23554)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 23566)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23571)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -150334,7 +151106,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+23480, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23575, libc.VaList(bp, zName)) } return p } @@ -150378,12 +151150,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+23499, 0) + ts+23594, 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+23570, 0) + ts+23665, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -150406,7 +151178,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+9216) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+9230) } break } @@ -150576,7 +151348,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -150613,7 +151384,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+23633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+23728, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -150729,7 +151500,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+8808)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+8822)) } pSub = Xsqlite3SelectNew(tls, @@ -150843,7 +151614,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+23659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23754, 0) goto windowAllocErr __2: ; @@ -150908,15 +151679,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 23691 + zErr = ts + 23786 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 23708 + zErr = ts + 23803 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 23724 + zErr = ts + 23819 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+23744, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+23839, 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 { @@ -150937,7 +151708,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+23777, 0) + ts+23872, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -151075,7 +151846,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1524, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1544, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -151093,11 +151864,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 23824, - ts + 23877, - ts + 23281, - ts + 23928, - ts + 23980, + ts + 23919, + ts + 23972, + ts + 23376, + ts + 24023, + ts + 24075, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -151578,13 +152349,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1524, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1544, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -152492,19 +153267,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24030, + Xsqlite3ErrorMsg(tls, pParse, ts+24125, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 21024 + return ts + 21119 } - return ts + 24072 + return ts + 24167 }(), 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+24078, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24173, 0) } } @@ -152572,7 +153347,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+24112, + Xsqlite3ErrorMsg(tls, pParse, ts+24207, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -153669,7 +154444,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+24150, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24245, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -154644,21 +155419,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17562, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17609, 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+24172, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+24267, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17475, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17522, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+24172, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+24267, 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)) @@ -155401,7 +156176,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+24199) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+24294) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -155565,7 +156340,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24208, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+24303, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -155782,9 +156557,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 8042 + return ts + 8056 } - return ts + 8047 + return ts + 8061 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -156063,19 +156838,19 @@ 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+24232, 0) + ts+24327, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+24327, 0) + ts+24422, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+24411, 0) + ts+24506, 0) } break case uint32(273): @@ -156454,9 +157229,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24208, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+24303, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+24496, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24591, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -157224,7 +157999,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+24513, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+24608, libc.VaList(bp, bp+2464)) break } } @@ -157245,9 +158020,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+4479, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+4493, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+24538, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+24633, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -157260,7 +158035,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -157420,7 +158195,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+24549, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+24644, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -157433,11 +158208,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+21144, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+21239, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+24556, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+24651, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+24561, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+24656, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -157450,9 +158225,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+24571, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+24666, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+24575, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+24670, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -157562,36 +158337,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -157708,7 +158461,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -157979,16 +158732,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -158052,6 +158806,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -158102,6 +158857,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -158250,7 +159006,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -158280,7 +159036,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -158295,7 +159051,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24583, 0) + ts+24678, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -158391,7 +159147,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -158402,8 +159158,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -158413,13 +159169,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -158486,23 +159242,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 24651 + var zErr uintptr = ts + 24746 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 24665 + zErr = ts + 24760 break } case SQLITE_ROW: { - zErr = ts + 24687 + zErr = ts + 24782 break } case SQLITE_DONE: { - zErr = ts + 24709 + zErr = ts + 24804 break } @@ -158520,35 +159276,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 24732, - ts + 24745, + ts + 24827, + ts + 24840, uintptr(0), - ts + 24761, - ts + 24786, - ts + 24800, - ts + 24819, - ts + 1460, - ts + 24844, + ts + 24856, ts + 24881, - ts + 24893, - ts + 24908, - ts + 24941, - ts + 24959, - ts + 24984, - ts + 25013, + ts + 24895, + ts + 24914, + ts + 1480, + ts + 24939, + ts + 24976, + ts + 24988, + ts + 25003, + ts + 25036, + ts + 25054, + ts + 25079, + ts + 25108, uintptr(0), - ts + 7186, - ts + 6672, - ts + 25030, - ts + 25048, - ts + 25066, + ts + 7200, + ts + 6686, + ts + 25125, + ts + 25143, + ts + 25161, uintptr(0), - ts + 25100, + ts + 25195, uintptr(0), - ts + 25121, - ts + 25147, - ts + 25170, - ts + 25191, + ts + 25216, + ts + 25242, + ts + 25265, + ts + 25286, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -158663,7 +159419,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -158708,7 +159464,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+25207, 0) + ts+25302, 0) return SQLITE_BUSY } else { @@ -158825,7 +159581,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+25270, libc.VaList(bp, zName)) + ts+25365, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -158841,6 +159597,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -158850,7 +159609,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -159058,7 +159817,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+25321, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+25416, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -159151,7 +159910,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -159221,7 +159980,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -159231,7 +159990,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -159263,20 +160022,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+25342, 0) + ts+25437, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -159400,7 +160159,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+25410, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+25505, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -159445,10 +160204,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+25416, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+25511, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25426, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25521, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -159553,7 +160312,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+25454, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+25549, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -159564,17 +160323,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+25458, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+25553, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 25458 + zModeType = ts + 25553 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+25464, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+25559, zOpt, uint64(4)) == 0) { goto __32 } @@ -159582,7 +160341,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 25469 + zModeType = ts + 25564 __32: ; if !(aMode != 0) { @@ -159612,7 +160371,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25476, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25571, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -159620,7 +160379,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25496, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25591, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -159660,7 +160419,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25520, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25615, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -159684,15 +160443,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 25536, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 25543, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 25631, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 25638, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 25551, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 25554, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 25557, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 18668, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 25646, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 25649, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 25652, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 18715, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -159807,7 +160566,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -159826,8 +160585,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -159838,10 +160597,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+23076, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+23171, 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+25561, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+25656, 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) { @@ -159855,7 +160614,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -159872,7 +160631,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -159906,9 +160665,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 7719 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 7733 (*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 + 24556 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 24651 (*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) @@ -160013,7 +160772,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 25567 + zFilename = ts + 25662 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -160116,21 +160875,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+25570, + Xsqlite3_log(tls, iErr, ts+25665, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+25595) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+25690) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+25615) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+25710) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+25622) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+25717) } // This is a convenience routine that makes sure that all thread-specific @@ -160241,7 +161000,7 @@ __4: 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 + 1089 + zDataType = ts + 1109 primarykey = 1 __13: ; @@ -160288,14 +161047,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+25639, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+25734, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -160365,6 +161124,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -160941,7 +161703,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+25667, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+25762, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -160974,7 +161736,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -160985,7 +161747,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -161059,7 +161821,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 + 25675 + return ts + 25770 } return uintptr(0) }(), 0) @@ -161154,7 +161916,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -161237,7 +161999,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 7519, ts + 8042, ts + 8047, ts + 7529, ts + 7524, ts + 9283, ts + 25698, ts + 25704, + ts + 7533, ts + 8056, ts + 8061, ts + 7543, ts + 7538, ts + 9297, ts + 25793, ts + 25799, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -161390,7 +162152,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 + 25711 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 25806 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -161416,7 +162178,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+7519, uint32(4)) + jsonAppendRaw(tls, p, ts+7533, uint32(4)) break } @@ -161445,7 +162207,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+25728, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+25823, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -161503,19 +162265,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+7519, uint32(4)) + jsonAppendRaw(tls, pOut, ts+7533, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+8042, uint32(4)) + jsonAppendRaw(tls, pOut, ts+8056, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+8047, uint32(5)) + jsonAppendRaw(tls, pOut, ts+8061, uint32(5)) break } @@ -162060,17 +162822,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+7519, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+7533, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+8042, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+8056, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+8047, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+8061, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -162171,7 +162933,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+25757, -1) + Xsqlite3_result_error(tls, pCtx, ts+25852, -1) } } jsonParseReset(tls, pParse) @@ -162477,7 +163239,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+25772, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+25867, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -162492,7 +163254,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+25776, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+25871, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -162546,7 +163308,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+25802, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+25897, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -162651,11 +163413,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+25845, uint32(2)) + jsonAppendRaw(tls, bp, ts+25940, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+6336, uint32(2)) + jsonAppendRaw(tls, bp, ts+6350, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+25848, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+25943, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -162696,7 +163458,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+7519, uint32(4)) + jsonAppendRaw(tls, bp, ts+7533, uint32(4)) } } if i == argc { @@ -162812,14 +163574,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+25851, -1) + ts+25946, -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+25902, -1) + Xsqlite3_result_error(tls, ctx, ts+25997, -1) jsonReset(tls, bp) return } @@ -162914,7 +163676,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+16674) + jsonWrongNumArgs(tls, ctx, ts+16721) return __2: ; @@ -162989,9 +163751,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 25936 + return ts + 26031 } - return ts + 25940 + return ts + 26035 }()) return __2: @@ -163124,7 +163886,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25947, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+26042, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -163221,7 +163983,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25950, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+26045, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -163265,7 +164027,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25953) + ts+26048) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -163396,7 +164158,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+26036, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+26131, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -163415,7 +164177,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+26042, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+26137, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -163511,7 +164273,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+26042, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+26137, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -163535,7 +164297,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 + 26047 + zRoot = ts + 26142 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -163651,7 +164413,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+25757, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+25852, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -163746,25 +164508,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 26049}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26054}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26065}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26065}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 26096}, - {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 + 26099}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26103}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26115}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26138}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26144}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26149}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26161}, - {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 + 26174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26183}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26183}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26193}, - {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 + 26204}, - {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 + 26221}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26160}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26160}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26178}, + {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 + 26191}, + {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 + 26194}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26198}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26210}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26222}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26233}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26244}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26256}, + {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 + 26269}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26278}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26288}, + {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 + 26299}, + {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 + 26316}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -163783,8 +164545,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 26239, FpModule: 0}, - {FzName: ts + 26249, FpModule: 0}, + {FzName: ts + 26334, FpModule: 0}, + {FzName: ts + 26344, FpModule: 0}, } type Rtree1 = struct { @@ -164044,11 +164806,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+26259, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+26354, 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+26267, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+26362, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -164259,7 +165021,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+26272, + ts+26367, 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)) @@ -164957,7 +165719,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+26354) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+26449) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -165169,7 +165931,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+4479, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -166298,7 +167060,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+26368, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+26463, 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 { @@ -166310,12 +167072,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+26388, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+26483, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+26420, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+26515, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -166356,7 +167118,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -166541,7 +167303,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+26457, 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+26552, 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)) @@ -166564,14 +167326,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 26602 + var zFmt uintptr = ts + 26697 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+12624, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+12638, 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 { @@ -166612,7 +167374,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 26658, ts + 6398, ts + 17562, + ts + 26753, ts + 6412, ts + 17609, } var rtreeModule = Sqlite3_module{ @@ -166655,19 +167417,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+26663, + ts+26758, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+26725, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+26820, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+26730, + ts+26825, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+26794, + ts+26889, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+26864, + ts+26959, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -166696,7 +167458,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 26913 + zFormat = ts + 27008 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -166708,7 +167470,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+27021, + ts+27116, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -166716,18 +167478,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+27066, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+27161, 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+14095, 1) + Xsqlite3_str_append(tls, p, ts+14109, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+27093, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+27188, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+27115, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+27210, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+27123, 0) + Xsqlite3_str_appendf(tls, p, ts+27218, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -166742,14 +167504,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 27139, - ts + 27192, - ts + 27237, - ts + 27289, - ts + 27343, - ts + 27388, - ts + 27446, - ts + 27501, + ts + 27234, + ts + 27287, + ts + 27332, + ts + 27384, + ts + 27438, + ts + 27483, + ts + 27541, + ts + 27596, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -166778,7 +167540,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+27548, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+27643, 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 @@ -166786,19 +167548,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+27568, + ts+27663, 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+4479, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, 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+27625, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+27720, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -166840,16 +167602,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 27660, - ts + 27703, - ts + 27738, - ts + 27774, + ts + 27755, + ts + 27798, + ts + 27833, + ts + 27869, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -166874,7 +167636,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27811, + Xsqlite3_str_appendf(tls, pSql, ts+27906, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -166886,7 +167648,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27835, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+27930, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -166909,7 +167671,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+27841, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27936, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -166920,14 +167682,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, 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+4479, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -166970,7 +167732,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -166987,7 +167749,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -167005,7 +167767,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 27844, ts + 27855} +var azFormat = [2]uintptr{ts + 27939, ts + 27950} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -167043,13 +167805,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+12196, 1) + Xsqlite3_str_append(tls, pOut, ts+12210, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+27865, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+27960, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+27871, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+27966, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+27875, 1) + Xsqlite3_str_append(tls, pOut, ts+27970, 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}))) @@ -167060,7 +167822,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+27877, -1) + Xsqlite3_result_error(tls, ctx, ts+27972, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -167138,12 +167900,12 @@ 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+27910, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+28005, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 5400 + return ts + 5414 } - return ts + 1524 + return ts + 1544 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -167162,7 +167924,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+27917, + ts+28012, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -167181,7 +167943,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+27962, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+28057, libc.VaList(bp+16, iNode)) } } @@ -167195,8 +167957,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 27994, - ts + 28048, + ts + 28089, + ts + 28143, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -167211,23 +167973,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+28096, + rtreeCheckAppendMsg(tls, pCheck, ts+28191, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 28141 + return ts + 28236 } - return ts + 28149 + return ts + 28244 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+28158, + ts+28253, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 28141 + return ts + 28236 } - return ts + 28149 + return ts + 28244 }(), iKey, iVal)) } } @@ -167251,7 +168013,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+28216, libc.VaList(bp, i, iCell, iNode)) + ts+28311, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -167271,7 +168033,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+28264, libc.VaList(bp+24, i, iCell, iNode)) + ts+28359, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -167288,14 +168050,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+28331, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+28426, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+28365, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+28460, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -167303,7 +168065,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+28395, + ts+28490, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -167332,14 +168094,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+28450, + pCount = rtreeCheckPrepare(tls, pCheck, ts+28545, 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+28481, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+28576, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -167361,12 +168123,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+15836, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+15850, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+28548, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+28643, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -167375,12 +168137,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+26368, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+26463, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+28576, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+28671, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -167394,8 +168156,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+28607, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+28614, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+28702, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+28709, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -167403,7 +168165,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+28622, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+28717, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -167418,7 +168180,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+28626, -1) + ts+28721, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -167426,7 +168188,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 7719 + zDb = ts + 7733 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -167436,7 +168198,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 19210 + return ts + 19338 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -167805,11 +168567,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+28677, 1) + Xsqlite3_str_append(tls, x, ts+28772, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+28679, 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+28774, 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+28690, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+28785, 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) } @@ -167829,19 +168591,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+28701, 0) + Xsqlite3_str_appendf(tls, x, ts+28796, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+28719, 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+28814, 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+28727, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+28822, 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+28735, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+28830, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+28739, 0) + Xsqlite3_str_appendf(tls, x, ts+28834, 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) } @@ -168747,7 +169509,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+28752, 0) + Xsqlite3_str_appendf(tls, pSql, ts+28847, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -168756,7 +169518,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+28774, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+28869, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -168764,7 +169526,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+27841, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27936, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -168775,7 +169537,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -168800,7 +169562,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -168989,7 +169751,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 17562 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 17609 (*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 @@ -168999,7 +169761,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28778 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28873 (*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 @@ -169007,7 +169769,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28784 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28879 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -169119,7 +169881,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+28793, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+28888, 0) __4: ; goto geopoly_update_end @@ -169249,14 +170011,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+28833) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28928) == 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+28849) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28944) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -169321,7 +170083,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+28864, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28959, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -169333,25 +170095,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28872}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28885}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28898}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 28911}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28849}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 28923}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28833}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 28946}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28960}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28973}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28987}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 29003}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28967}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28980}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28993}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 29006}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28944}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 29018}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28928}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 29041}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 29055}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 29068}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 29082}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 29098}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 29015}, + {FxStep: 0, FxFinal: 0, FzName: ts + 29110}, } // Register the r-tree module with database handle db. This creates the @@ -169361,26 +170123,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+29034, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29129, 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+29044, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29139, 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+29055, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29150, -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+28778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28873, 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+29066, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+29161, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -169434,7 +170196,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+26354, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+26449, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -169501,6 +170263,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -169759,7 +170523,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+29076, -1) + Xsqlite3_result_error(tls, context, ts+29171, -1) return } @@ -169770,7 +170534,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+29076, -1) + Xsqlite3_result_error(tls, context, ts+29171, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -169783,7 +170547,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -169795,7 +170559,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -169871,7 +170635,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29097, uintptr(0), uintptr(0), p+64) + ts+29192, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -169935,7 +170699,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+26267, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+26362, 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++ { } @@ -169956,16 +170720,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+29268, libc.VaList(bp, func() uintptr { + ts+29363, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 29418 + return ts + 29513 } - return ts + 1524 + return ts + 1544 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+29459) + ts+29554) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -170063,7 +170827,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -170081,7 +170845,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+29584, libc.VaList(bp, zTab))) + ts+29679, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -170099,7 +170863,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+29703, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+29798, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -170117,7 +170881,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+29724, libc.VaList(bp+16, zIdx))) + ts+29819, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -170140,7 +170904,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+29775, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+29870, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -170186,7 +170950,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+29796, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -170201,7 +170965,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+29824, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+29919, 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)), 1) if iCid >= 0 { @@ -170241,7 +171005,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+20670, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+20765, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -170251,18 +171015,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29853, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+29948, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+29872, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+29967, 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+29877, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+29972, zName) { bRbuRowid = 1 } } @@ -170274,18 +171038,18 @@ 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+29887, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+29982, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 29916 + return ts + 30011 } - return ts + 29929 + return ts + 30024 }())) } 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+29938, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+30033, 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)), 1) @@ -170299,7 +171063,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+29960, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30055, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -170342,12 +171106,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+29987, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 15947 + zList = rbuMPrintf(tls, p, ts+30082, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 15961 } return zList } @@ -170358,13 +171122,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+29996, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+30091, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -170386,25 +171150,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+30009, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+30104, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+30041, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+30136, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15947, ts+30064) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+30070, ts+30077, ts+6295) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15947, ts+1524) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1544, ts+15961, ts+30159) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+30165, ts+30172, ts+6309) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1544, ts+15961, ts+1544) 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+30085, + ts+30180, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+30127, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+30222, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -170441,12 +171205,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1524 + zSep = ts + 1544 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+29919, 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 @@ -170481,7 +171245,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 30147 + zCol = ts + 30242 __7: ; goto __5 @@ -170489,13 +171253,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+30155, + zLhs = rbuMPrintf(tls, p, ts+30250, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+30176, + zOrder = rbuMPrintf(tls, p, ts+30271, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+30212, + zSelect = rbuMPrintf(tls, p, ts+30307, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 15947 + zSep = ts + 15961 iCol++ goto __1 __2: @@ -170513,12 +171277,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+30239, + Xsqlite3_mprintf(tls, ts+30334, 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 + 1524 + zSep = ts + 1544 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -170540,8 +171304,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+30287, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 15947 + zVector = rbuMPrintf(tls, p, ts+30382, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 15961 goto __15 __15: iCol++ @@ -170552,7 +171316,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+30294, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+30389, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -170579,13 +171343,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1524 - var zAnd uintptr = ts + 1524 + var zCom uintptr = ts + 1544 + var zAnd uintptr = ts + 1544 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+29919, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -170597,9 +171361,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+30306, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+30401, 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 + zType = ts + 1544 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -170609,37 +171373,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 + 30147 + zCol = ts + 30242 } else { - zCol = ts + 29877 + zCol = ts + 29972 } - zType = ts + 1089 + zType = ts + 1109 } 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+30328, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+30423, 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 + 30064 + return ts + 30159 } - return ts + 1524 + return ts + 1544 }() - zImpPK = Xsqlite3_mprintf(tls, ts+30348, + zImpPK = Xsqlite3_mprintf(tls, ts+30443, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+30369, + zImpCols = Xsqlite3_mprintf(tls, ts+30464, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+30402, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+30497, 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 + 15947 - zAnd = ts + 22738 + zCom = ts + 15961 + zAnd = ts + 22833 nBind++ } @@ -170673,16 +171437,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1524 + var zS uintptr = ts + 1544 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+30426, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+30521, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+30438, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+30533, libc.VaList(bp+32, zList, zS)) } - zS = ts + 15947 + zS = ts + 15961 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -170690,7 +171454,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+30447, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+30542, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -170702,27 +171466,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+30462, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+30557, 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 zSep uintptr = ts + 1544 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+30476, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 22738 + zList = rbuMPrintf(tls, p, ts+30571, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 22833 } } zList = rbuMPrintf(tls, p, - ts+30488, libc.VaList(bp+40, zList)) + ts+30583, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+30538, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 22738 + zList = rbuMPrintf(tls, p, ts+30633, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 22833 } } } @@ -170731,7 +171495,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30551, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30646, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -170745,21 +171509,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+30538, + zList = rbuMPrintf(tls, p, ts+30633, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 15947 + zSep = ts + 15961 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+30577, + zList = rbuMPrintf(tls, p, ts+30672, 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 + 15947 + zSep = ts + 15961 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+30607, + zList = rbuMPrintf(tls, p, ts+30702, 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 + 15947 + zSep = ts + 15961 } } } @@ -170794,19 +171558,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 30644 + var zSep uintptr = ts + 30739 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+29796, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29891, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+17450) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+17497) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+29919, libc.VaList(bp+8, zIdx))) } break } @@ -170818,15 +171582,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 30064 + zDesc = ts + 30159 } else { - zDesc = ts + 1524 + zDesc = ts + 1544 } - z = rbuMPrintf(tls, p, ts+30657, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 15947 + z = rbuMPrintf(tls, p, ts+30752, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 15961 } } - z = rbuMPrintf(tls, p, ts+30668, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+30763, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -170841,12 +171605,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1524 + var zComma uintptr = ts + 1544 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+30672) + ts+30767) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -170855,7 +171619,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+29919, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -170865,25 +171629,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+30722, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+30817, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+30744, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+30839, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 30064 + return ts + 30159 } - return ts + 1524 + return ts + 1544 }())) - zComma = ts + 15947 + zComma = ts + 15961 } } - zCols = rbuMPrintf(tls, p, ts+30754, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30769, + ts+30864, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 0)) } } @@ -170893,50 +171657,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1524 + var zComma uintptr = ts + 1544 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1524 + var zPk uintptr = ts + 1544 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, (*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 { - zPk = ts + 30831 + zPk = ts + 30926 } - zSql = rbuMPrintf(tls, p, ts+30844, + zSql = rbuMPrintf(tls, p, ts+30939, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 30871 + return ts + 30966 } - return ts + 1524 + return ts + 1544 }())) - zComma = ts + 15947 + zComma = ts + 15961 } 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+30881, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+30976, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30888, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30983, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 30920 + return ts + 31015 } - return ts + 1524 + return ts + 1544 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 0)) } } @@ -170949,7 +171713,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+30935, + ts+31030, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -170986,7 +171750,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30992) + ts+31087) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -171091,7 +171855,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+31058, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+31153, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -171111,24 +171875,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31078, + ts+31173, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+31143, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+31238, libc.VaList(bp+128, zTbl, zBind))) } 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+31179, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+31274, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -171144,7 +171908,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+31213, + ts+31308, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -171152,31 +171916,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 31274 + return ts + 31369 } - return ts + 31278 + return ts + 31373 }() } - return ts + 1524 + return ts + 1544 }(), 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+31284, + ts+31379, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+31345, + ts+31440, 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 + 31274 + return ts + 31369 } - return ts + 31278 + return ts + 31373 }(), zCollist, zLimit)) } @@ -171201,8 +171965,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+7730) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+7726) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+7744) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+7740) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -171211,52 +171975,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1524 + return ts + 1544 } - return ts + 31504 + return ts + 31599 }() 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+31513, + ts+31608, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 31549 + return ts + 31644 } - return ts + 1524 + return ts + 1544 }(), zBindings))) } 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+31559, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+31654, 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 + var zRbuRowid uintptr = ts + 1544 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 31587 + zRbuRowid = ts + 31682 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31599, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+31694, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 31675 + return ts + 31770 } - return ts + 1524 + return ts + 1544 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31692, + ts+31787, 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+31991, + ts+32086, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -171264,14 +172028,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1524 + var zRbuRowid uintptr = ts + 1544 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 32090 + zRbuRowid = ts + 32185 } else { - zRbuRowid = ts + 32100 + zRbuRowid = ts + 32195 } } @@ -171284,35 +172048,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+30147, 0) + zOrder = rbuMPrintf(tls, p, ts+30242, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15947, ts+1524) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1544, ts+15961, ts+1544) } } 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+32111, + ts+32206, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32159 + return ts + 32254 } - return ts + 1524 + return ts + 1544 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if zOrder != 0 { - return ts + 21024 + return ts + 21119 } - return ts + 1524 + return ts + 1544 }(), zOrder, zLimit))) } @@ -171375,12 +172139,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1524 + var zPrefix uintptr = ts + 1544 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 31504 + zPrefix = ts + 31599 } - zUpdate = Xsqlite3_mprintf(tls, ts+32165, + zUpdate = Xsqlite3_mprintf(tls, ts+32260, 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) @@ -171407,7 +172171,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -171439,7 +172203,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+32195, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+32290, 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)), 0) { case RBU_STATE_STAGE: @@ -171509,28 +172273,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+7719, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733, 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+7719) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+32225, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+32320, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32252, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+14805, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32348, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+14819, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+7719, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+7733, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32270, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32366, 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+7719, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -171563,11 +172327,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+32336, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32432, 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+25410, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+25505, (*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)))) == '?' { @@ -171579,16 +172343,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+32368, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7719), + zTarget = Xsqlite3_mprintf(tls, ts+32464, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733), func() uintptr { if zExtra == uintptr(0) { - return ts + 1524 + return ts + 1544 } - return ts + 32400 + return ts + 32496 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1524 + return ts + 1544 } return zExtra }())) @@ -171604,37 +172368,37 @@ 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+32402, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32498, -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+32417, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+32513, 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+32434, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32530, -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+7719, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32450, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32546, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 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+32478, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32574, 0) } } @@ -171663,14 +172427,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+32450, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32546, uintptr(0), uintptr(0), uintptr(0)) } } 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+32496, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32592, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -171779,7 +172543,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+7719, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+7733, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -171796,23 +172560,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+32531, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+32627, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7719) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733) } - zOal = Xsqlite3_mprintf(tls, ts+32556, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+32563, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+32652, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+32659, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -171833,12 +172597,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -171932,7 +172693,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+25048, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+25143, 0) return } @@ -172025,7 +172786,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+32570) + ts+32666) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -172033,7 +172794,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32592, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32688, libc.VaList(bp, iCookie+1)) } } } @@ -172054,7 +172815,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+32619, + ts+32715, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -172084,9 +172845,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+32777, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+32873, 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+32792, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32888, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -172100,10 +172861,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32812, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32908, 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+32837) + ts+32933) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -172117,12 +172878,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32945) + ts+33041) } 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+33010) + ts+33106) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -172134,7 +172895,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33054, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33150, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -172154,15 +172915,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+18556) - rbuCopyPragma(tls, p, ts+17646) + rbuCopyPragma(tls, p, ts+18603) + rbuCopyPragma(tls, p, ts+17693) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+33079, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+33175, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -172186,10 +172947,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15865, 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15865, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -172284,7 +173045,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33107, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33203, 0) } if rc == SQLITE_OK { @@ -172300,7 +173061,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+32556, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+32652, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -172316,7 +173077,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+33132, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+33228, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -172350,7 +173111,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+33143, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+33239, 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)), -1) } else { @@ -172380,13 +173141,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+33215, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+33311, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+33229) + ts+33325) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -172397,7 +173158,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+33286) + ts+33382) 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)), 0) @@ -172427,10 +173188,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -172441,7 +173203,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+4479, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+4493, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -172470,7 +173232,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+33360, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33456, 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 @@ -172488,12 +173250,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33392, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33488, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 33424 + return ts + 33520 } - return ts + 33431 + return ts + 33527 }())) } } @@ -172501,7 +173263,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+15836, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15850, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -172512,19 +173274,19 @@ 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+18270) - rbuCopyPragma(tls, p, ts+17661) + rbuCopyPragma(tls, p, ts+18317) + rbuCopyPragma(tls, p, ts+17708) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+7719, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+7733, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+33454, uintptr(0), uintptr(0), p+64) + db, ts+33550, uintptr(0), uintptr(0), p+64) } } @@ -172578,7 +173340,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+33478, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+33574, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -172605,7 +173367,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+31504, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+31599, 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++ @@ -172622,7 +173384,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15865, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -172635,13 +173397,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15865, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+33486, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+33582, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -172736,7 +173498,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15851, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15865, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172753,19 +173515,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15851, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15865, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 15836 + zBegin = ts + 15850 } else { - zBegin = ts + 33438 + zBegin = ts + 33534 } 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+33438, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33534, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172773,6 +173535,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -172791,7 +173575,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -173086,7 +173870,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33513, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33609, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -173111,7 +173895,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+33536, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+33632, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -173156,7 +173940,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -175967,7 +176751,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -176009,7 +176793,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -176070,7 +176854,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -176144,13 +176928,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -176212,7 +176996,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -176224,6 +177008,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -176576,7 +177369,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -176744,45 +177537,45 @@ 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+12624) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+12638) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+34123, bp+16) + sessionAppendStr(tls, bp, ts+34219, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+34136, bp+16) + sessionAppendStr(tls, bp, ts+34232, bp+16) 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+34142, bp+16) + sessionAppendStr(tls, bp, ts+34238, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 15947 + zSep = ts + 15961 } } - zSep = ts + 1524 - sessionAppendStr(tls, bp, ts+34071, bp+16) + zSep = ts + 1544 + sessionAppendStr(tls, bp, ts+34167, 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+34147, bp+16) + ts+34243, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+34079, bp+16) + sessionAppendStr(tls, bp, ts+34175, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 22738 + zSep = ts + 22833 } } @@ -176829,42 +177622,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+34222, bp+16) + sessionAppendStr(tls, bp, ts+34318, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+34071, bp+16) + sessionAppendStr(tls, bp, ts+34167, 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+34142, bp+16) + sessionAppendStr(tls, bp, ts+34238, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 22738 + zSep = ts + 22833 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+34240, bp+16) + sessionAppendStr(tls, bp, ts+34336, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+33783, bp+16) + sessionAppendStr(tls, bp, ts+33879, bp+16) - zSep = ts + 1524 + zSep = ts + 1544 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+34079, bp+16) + sessionAppendStr(tls, bp, ts+34175, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 34248 + zSep = ts + 34344 } } - sessionAppendStr(tls, bp, ts+6295, bp+16) + sessionAppendStr(tls, bp, ts+6309, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -176877,7 +177670,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+7719, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+7733, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -176888,21 +177681,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+34253, bp+16) + sessionAppendStr(tls, bp, ts+34349, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+22744, bp+16) + sessionAppendStr(tls, bp, ts+22839, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+15947, bp+16) + sessionAppendStr(tls, bp, ts+15961, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+34271, bp+16) + sessionAppendStr(tls, bp, ts+34367, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+34282, bp+16) + sessionAppendStr(tls, bp, ts+34378, bp+16) } - sessionAppendStr(tls, bp, ts+6295, bp+16) + sessionAppendStr(tls, bp, ts+6309, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -176916,14 +177709,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+12624, p) + var rc int32 = sessionSelectRow(tls, db, ts+12638, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+34286) + ts+34382) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+34399) + ts+34495) } return rc } @@ -176951,7 +177744,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -177204,7 +177997,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+34543, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34639, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -177220,7 +178013,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+34564, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34660, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -177293,10 +178086,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+34583, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34679, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34609, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34705, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -177329,7 +178122,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -177342,7 +178135,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+7719, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+7733, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -177355,19 +178148,19 @@ 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+34639, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+34735, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+34683, + ts+34779, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+34754, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+34850, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+12624) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+12638) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -177418,14 +178211,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+34814, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34910, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34844, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34940, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+34868, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+34844, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34964, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34940, uintptr(0), uintptr(0), uintptr(0)) } } @@ -177939,7 +178732,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -178673,7 +179466,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+34896, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34992, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -178961,7 +179754,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+34924, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+35020, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -179148,7 +179941,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+34955, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+35051, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -179216,7 +180009,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34962 + var zErr uintptr = ts + 35058 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -179375,7 +180168,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1524 + return ts + 1544 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -179398,7 +180191,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 35012 + var zErr uintptr = ts + 35108 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -179722,13 +180515,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 35060, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35156, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 35068, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35164, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 35078, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35174, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -180139,7 +180932,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+7519, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+7533, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -180279,7 +181072,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+35083, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35179, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -180306,14 +181099,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+35090, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35186, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+35121, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+35217, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -180324,7 +181117,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35154, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35250, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -180337,7 +181130,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35191, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35287, 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))) @@ -180346,7 +181139,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+35200, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35296, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -180365,7 +181158,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35233, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35329, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -180380,14 +181173,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35267, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35363, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35275, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35371, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+35307, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+35403, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -180395,9 +181188,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35313, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35409, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35327, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35423, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -180405,9 +181198,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35365, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35461, 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+35376, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35472, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -180415,21 +181208,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+6413, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+6427, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 9296, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 18651}, - {FzName: ts + 35411, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 9310, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 18698}, + {FzName: ts + 35507, 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+35419, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35515, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35450, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35546, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -180476,15 +181269,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+23404) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+17562) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35478, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+23499) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+17609) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35574, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+35508) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+35604) { *(*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+35518, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -180501,13 +181294,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35549, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35645, 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+35554, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35650, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35561, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35657, libc.VaList(bp+16, i)) } } } @@ -180545,8 +181338,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+23404) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35569, 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+23499) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35665, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -180578,7 +181371,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+35598, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35694, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -180587,13 +181380,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1524 + return ts + 1544 }(), pzErr) } else { @@ -180615,19 +181408,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 + 35267 + zTail = ts + 35363 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 35618 + zTail = ts + 35714 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+35626, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+35722, 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+17562, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+17609, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -180671,18 +181464,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35637, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35733, 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 + 1544 } - return ts + 15947 + return ts + 15961 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35653, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35749, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35660, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+23404)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35756, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+23499)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -180792,7 +181585,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+35686) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+35782) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -180802,7 +181595,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+35691) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35787) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -180812,7 +181605,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+35700) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35796) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -180825,7 +181618,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+35710) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35806) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -180835,7 +181628,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+35720) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35816) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -180851,7 +181644,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+23404) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+23499) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -180874,7 +181667,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 35732 + var zSelect uintptr = ts + 35828 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -180896,7 +181689,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+35764) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+35860) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -180910,7 +181703,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35772, + ts+35868, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -181008,7 +181801,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+35837, 0) + sqlite3Fts5ParseError(tls, pParse, ts+35933, 0) return FTS5_EOF } } @@ -181021,20 +181814,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+35857, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+35953, 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+35888, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35984, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35891, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35987, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31274, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31369, uint64(3)) == 0 { tok = FTS5_AND } break @@ -182801,9 +183594,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35895, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35991, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+34924, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+35020, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -182819,7 +183612,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+35900, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+35996, 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') @@ -182906,7 +183699,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+21741, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+21836, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -182987,7 +183780,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+35929, 0) + ts+36025, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -183157,12 +183950,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+35982, + ts+36078, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 36032 + return ts + 36128 } - return ts + 35895 + return ts + 35991 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -184105,7 +184898,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+36039, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+36135, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -184184,7 +184977,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+36045, + ts+36141, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -184209,7 +185002,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+36096, + ts+36192, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -184232,7 +185025,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+36145, + ts+36241, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -184471,7 +185264,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+36185, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+36281, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -184544,13 +185337,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -185670,7 +186463,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+36208, + ts+36304, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -186863,7 +187656,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1524 + return ts + 1544 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -187029,10 +187822,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -187060,7 +187853,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -187136,7 +187929,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+36292, + ts+36388, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -187179,7 +187972,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -187191,7 +187984,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -187311,7 +188104,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -187710,12 +188503,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -187726,7 +188519,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -187907,7 +188700,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -188031,7 +188824,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -188040,7 +188833,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -188072,8 +188865,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -188126,8 +188919,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -188197,7 +188990,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1524, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1544, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -188213,13 +189006,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+36349, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+36445, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+26267, ts+36357, 0, pzErr) + pConfig, ts+26362, ts+36453, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+12764, - ts+36392, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+12778, + ts+36488, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -188472,7 +189265,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+36039, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+36135, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -188586,7 +189379,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+36436, + ts+36532, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -188745,6 +189538,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -188752,7 +189549,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+36522) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+36618) 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)) @@ -189023,7 +189820,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+36527, 0) + ts+36623, 0) return SQLITE_ERROR } @@ -189054,7 +189851,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6313, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6327, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -189069,7 +189866,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6313, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6327, 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) @@ -189383,7 +190180,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -189415,7 +190212,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -189447,25 +190244,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+36566, + ts+36662, 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 + 15947 + return ts + 15961 } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if bDesc != 0 { - return ts + 36621 + return ts + 36717 } - return ts + 36626 + return ts + 36722 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -189511,12 +190308,12 @@ 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+36630, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+36726, 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+6395, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+6409, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36636, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -189547,7 +190344,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+36664, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+36760, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -189578,7 +190375,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+36674, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36770, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -189610,14 +190407,14 @@ 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+36695, libc.VaList(bp, z)) + ts+36791, 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 + 35078 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 35174 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -189673,7 +190470,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+36527, 0) + ts+36623, 0) return SQLITE_ERROR __1: ; @@ -189716,7 +190513,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1524 + zText = ts + 1544 __14: ; iCol = 0 @@ -189890,7 +190687,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+36728, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+36824, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -190011,7 +190808,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -190035,28 +190832,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+36764, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+36860, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+36775, 0) + ts+36871, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+36855, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36951, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+36863, 0) + ts+36959, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+18250, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+18297, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+36919, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+37015, 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+36925, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+37021, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -190114,7 +190911,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+18785, z) { + 0 == Xsqlite3_stricmp(tls, ts+18832, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -190127,12 +190924,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36941, + ts+37037, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 21642 + return ts + 21737 } - return ts + 36978 + return ts + 37074 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -190762,7 +191559,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+36990, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+37086, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -191006,7 +191803,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+37011, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37107, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -191025,7 +191822,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+37033, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37129, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -191072,7 +191869,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+37064) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+37160) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -191081,7 +191878,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+37077, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+37173, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -191095,7 +191892,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 37168, ts + 35267, ts + 26267, ts + 35618, ts + 12764, + ts + 37264, ts + 35363, ts + 26362, ts + 35714, ts + 12778, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -191119,7 +191916,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+37175, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+37271, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -191137,13 +191934,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+37175, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+37271, 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+37180, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+37276, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -191198,17 +191995,17 @@ 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)) = [11]uintptr{ - ts + 37195, - ts + 37263, - ts + 37332, - ts + 37365, - ts + 37404, - ts + 37444, - ts + 37483, - ts + 37524, - ts + 37563, - ts + 37605, - ts + 37645, + ts + 37291, + ts + 37359, + ts + 37428, + ts + 37461, + ts + 37500, + ts + 37540, + ts + 37579, + ts + 37620, + ts + 37659, + ts + 37701, + ts + 37741, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -191275,7 +192072,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+4479, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -191310,18 +192107,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37668, + ts+37764, 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+37772, + ts+37868, 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+37810, + ts+37906, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -191333,7 +192130,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37848, + ts+37944, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -191345,14 +192142,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+26267, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+12764, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+37168, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+26362, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+12778, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+37264, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+35618, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35714, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+35267, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35363, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -191364,17 +192161,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37890, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37986, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 30920 + return ts + 31015 } - return ts + 1524 + return ts + 1544 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+37920, + ts+38016, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -191411,27 +192208,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37964, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+38060, 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+37987, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+38083, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+35267, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+35363, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35618, ts+37993, 0, pzErr) + pConfig, ts+35714, ts+38089, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+37168, ts+38025, 1, pzErr) + pConfig, ts+37264, ts+38121, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35764, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35860, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -191637,12 +192434,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+38042, + ts+38138, 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+38092, + ts+38188, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191650,7 +192447,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35764, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35860, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -191826,7 +192623,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+38121, + zSql = Xsqlite3_mprintf(tls, ts+38217, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -192008,14 +192805,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+35267, bp+48) + rc = fts5StorageCount(tls, p, ts+35363, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+35618, bp+56) + rc = fts5StorageCount(tls, p, ts+35714, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -192210,9 +193007,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+38153) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38249) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38164) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38260) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -192427,7 +193224,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 + 38175 + var zCat uintptr = ts + 38271 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -192439,7 +193236,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38184) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38280) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -192450,18 +193247,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+38195) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38291) { 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+38153) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38249) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38164) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38260) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38184) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38280) { } else { rc = SQLITE_ERROR } @@ -192737,7 +193534,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)) = uintptr(0) - var zBase uintptr = ts + 38213 + var zBase uintptr = ts + 38309 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192879,7 +193676,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38223, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38319, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192887,11 +193684,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38226, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38322, 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+38231, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38327, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192899,7 +193696,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38236, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38332, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192907,7 +193704,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38239, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38335, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192915,11 +193712,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38242, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38338, 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+38247, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38343, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192927,19 +193724,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38252, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38348, 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+38256, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38352, 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+38262, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38358, 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+38267, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38363, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192947,11 +193744,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38271, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38367, 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+38275, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38371, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192959,7 +193756,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38278, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38374, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192967,11 +193764,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38282, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38378, 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+38286, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38382, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192979,7 +193776,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38290, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38386, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192987,7 +193784,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38294, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38390, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192995,7 +193792,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38298, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38394, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193011,24 +193808,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38302, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38282, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38398, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38305, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38308, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38401, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38404, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38312, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38298, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38408, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38394, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -193043,137 +193840,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38315, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38411, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38282, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38323, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38419, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38330, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38426, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38335, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38431, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38231, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38327, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38340, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38436, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38226, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38322, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38345, 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+38298, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38394, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38350, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+16774, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+16821, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38355, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38451, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38308, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38404, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38359, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38455, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38364, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38460, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38267, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38363, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38370, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38466, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38374, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38470, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38376, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38472, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38290, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38386, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38382, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38478, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38298, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38394, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38390, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38486, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38282, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38396, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38492, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38282, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38401, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38497, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38407, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38503, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38294, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38390, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38415, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38511, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38423, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38519, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38427, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38523, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38290, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38386, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38435, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38531, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38441, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38537, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38294, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38390, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38447, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38543, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38308, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38404, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -193188,16 +193985,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38454, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38550, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38239, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38335, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38459, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38555, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -193205,21 +194002,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38464, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38560, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38239, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38335, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38470, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38566, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38239, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38335, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38423, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38519, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193227,7 +194024,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38476, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38572, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -193235,9 +194032,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38482, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38578, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -193252,12 +194049,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38488, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38584, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38492, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38588, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38495, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38591, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -193266,7 +194063,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38498, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38594, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -193422,7 +194219,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+38502) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38598) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193602,22 +194399,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 38213, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38309, 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 + 38517, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38613, 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 + 38523, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38619, 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 + 38530, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38626, 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 @@ -194760,14 +195557,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+38538) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+38634) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+38542) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+38638) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+38546) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+38642) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38555, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38651, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -194793,19 +195590,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 38589, - ts + 38629, - ts + 38664, + ts + 38685, + ts + 38725, + ts + 38760, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+24556, *(*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+24651, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38707, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38803, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -194938,11 +195735,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+38740, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+38836, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+38771, + ts+38867, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -194966,7 +195763,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+38822, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+38918, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -195250,7 +196047,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1524 + zCopy = ts + 1544 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -195361,7 +196158,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+38848, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+38944, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195383,7 +196180,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 38858 + return ts + 38954 } func init() { @@ -195948,7 +196745,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -196221,16 +197018,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -196287,12 +197084,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -196307,6 +197104,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -196434,5 +197232,5 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 160)) = winNextSystemCall } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=msvc-1900\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_windows_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_windows_arm64.go index f251811317..740fae3aae 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_windows_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_windows_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_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3390400/sqlite3.c -full-path-comments -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 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400100/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -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 @@ -4194,7 +4194,6 @@ const ( EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 - EP_MemToken = 0x020000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 @@ -10935,7 +10934,7 @@ const ( OP_CursorHint = 182 OP_CursorLock = 167 OP_CursorUnlock = 168 - OP_DecrJumpZero = 60 + OP_DecrJumpZero = 61 OP_DeferredSeek = 141 OP_Delete = 130 OP_Destroy = 144 @@ -10948,49 +10947,49 @@ const ( OP_Eq = 53 OP_Expire = 166 OP_Explain = 185 - OP_Filter = 63 + OP_Filter = 64 OP_FilterAdd = 180 OP_FinishSeek = 143 OP_FkCheck = 83 OP_FkCounter = 158 - OP_FkIfZero = 48 - OP_Found = 28 + OP_FkIfZero = 49 + OP_Found = 29 OP_Function = 66 OP_Ge = 57 - OP_Gosub = 9 - OP_Goto = 8 + OP_Gosub = 10 + OP_Goto = 9 OP_Gt = 54 OP_Halt = 70 OP_HaltIfNull = 69 OP_IdxDelete = 140 - OP_IdxGE = 42 - OP_IdxGT = 40 + OP_IdxGE = 45 + OP_IdxGT = 41 OP_IdxInsert = 138 - OP_IdxLE = 39 - OP_IdxLT = 41 + OP_IdxLE = 40 + OP_IdxLT = 42 OP_IdxRowid = 142 - OP_If = 15 - OP_IfNoHope = 25 - OP_IfNot = 16 - OP_IfNotOpen = 24 - OP_IfNotZero = 59 - OP_IfNullRow = 18 - OP_IfPos = 49 - OP_IfSmaller = 32 - OP_IncrVacuum = 61 - OP_Init = 64 - OP_InitCoroutine = 10 + OP_If = 16 + OP_IfNoHope = 26 + OP_IfNot = 17 + OP_IfNotOpen = 25 + OP_IfNotZero = 60 + OP_IfNullRow = 20 + OP_IfPos = 59 + OP_IfSmaller = 33 + OP_IncrVacuum = 62 + OP_Init = 8 + OP_InitCoroutine = 11 OP_Insert = 128 OP_Int64 = 72 OP_IntCopy = 82 OP_Integer = 71 OP_IntegrityCk = 155 OP_IsNull = 50 - OP_IsNullOrType = 17 OP_IsTrue = 91 + OP_IsType = 18 OP_JournalMode = 4 - OP_Jump = 13 - OP_Last = 31 + OP_Jump = 14 + OP_Last = 32 OP_Le = 55 OP_LoadAnalysis = 150 OP_Lt = 56 @@ -10999,21 +10998,21 @@ const ( OP_MemMax = 159 OP_Move = 79 OP_Multiply = 108 - OP_MustBeInt = 12 + OP_MustBeInt = 13 OP_Ne = 52 OP_NewRowid = 127 - OP_Next = 38 - OP_NoConflict = 26 + OP_Next = 39 + OP_NoConflict = 27 OP_Noop = 184 OP_Not = 19 - OP_NotExists = 30 - OP_NotFound = 27 + OP_NotExists = 31 + OP_NotFound = 28 OP_NotNull = 51 OP_Null = 75 OP_NullRow = 136 OP_Offset = 93 OP_OffsetLimit = 160 - OP_Once = 14 + OP_Once = 15 OP_OpenAutoindex = 116 OP_OpenDup = 115 OP_OpenEphemeral = 118 @@ -11025,8 +11024,8 @@ const ( OP_Param = 157 OP_ParseSchema = 149 OP_Permutation = 89 - OP_Prev = 37 - OP_Program = 47 + OP_Prev = 38 + OP_Program = 48 OP_PureFunc = 65 OP_ReadCookie = 99 OP_Real = 153 @@ -11038,22 +11037,22 @@ const ( OP_ResetSorter = 146 OP_ResultRow = 84 OP_Return = 67 - OP_Rewind = 35 + OP_Rewind = 36 OP_RowCell = 129 OP_RowData = 134 OP_RowSetAdd = 156 - OP_RowSetRead = 45 - OP_RowSetTest = 46 + OP_RowSetRead = 46 + OP_RowSetTest = 47 OP_Rowid = 135 OP_SCopy = 81 OP_Savepoint = 0 OP_SeekEnd = 137 - OP_SeekGE = 22 - OP_SeekGT = 23 + OP_SeekGE = 23 + OP_SeekGT = 24 OP_SeekHit = 125 - OP_SeekLE = 21 - OP_SeekLT = 20 - OP_SeekRowid = 29 + OP_SeekLE = 22 + OP_SeekLT = 21 + OP_SeekRowid = 30 OP_SeekScan = 124 OP_Sequence = 126 OP_SequenceTest = 120 @@ -11061,13 +11060,13 @@ const ( OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 76 - OP_Sort = 34 + OP_Sort = 35 OP_SorterCompare = 132 OP_SorterData = 133 OP_SorterInsert = 139 - OP_SorterNext = 36 + OP_SorterNext = 37 OP_SorterOpen = 119 - OP_SorterSort = 33 + OP_SorterSort = 34 OP_SqlExec = 148 OP_String = 73 OP_String8 = 117 @@ -11082,13 +11081,13 @@ const ( OP_VDestroy = 172 OP_VFilter = 6 OP_VInitIn = 174 - OP_VNext = 62 + OP_VNext = 63 OP_VOpen = 173 OP_VRename = 176 OP_VUpdate = 7 OP_Vacuum = 5 OP_Variable = 78 - OP_Yield = 11 + OP_Yield = 12 OP_ZeroOrNull = 92 ORD_LANGDRIVER = 1 OR_INVALID_OID = 1911 @@ -14638,7 +14637,7 @@ const ( SQLITE_DEFAULT_FILE_FORMAT = 4 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_LOOKASIDE = 40 - SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PAGE_SIZE = 4096 SQLITE_DEFAULT_PCACHE_INITSZ = 20 @@ -14733,6 +14732,7 @@ const ( SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RBUCNT = 5149216 SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_RESET_CACHE = 42 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 @@ -14867,6 +14867,7 @@ const ( SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_IgnoreChecks = 0x00000200 + SQLITE_IndexedExpr = 0x01000000 SQLITE_JUMPIFNULL = 0x10 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 @@ -14899,6 +14900,7 @@ const ( SQLITE_LoadExtension = 0x00010000 SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MATCH = 0 + SQLITE_MAX_ALLOCATION_SIZE = 2147483391 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 @@ -14998,6 +15000,7 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_KV = 0 SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 0 @@ -15077,7 +15080,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309" + SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -15188,8 +15191,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.39.4" - SQLITE_VERSION_NUMBER = 3039004 + SQLITE_VERSION = "3.40.1" + SQLITE_VERSION_NUMBER = 3040001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -17105,6 +17108,7 @@ const ( WHERE_TRANSCONS = 0x00200000 WHERE_UNQ_WANTED = 0x00010000 WHERE_USE_LIMIT = 0x4000 + WHERE_VIEWSCAN = 0x02000000 WHERE_VIRTUALTABLE = 0x00000400 WHERE_WANT_DISTINCT = 0x0100 WHITEONBLACK = 2 @@ -22198,7 +22202,16 @@ type sqlite3_io_methods = struct { //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. // -// xLock() increases the lock. xUnlock() decreases the lock. +// xLock() upgrades the database file lock. In other words, xLock() moves the +// database file lock in the direction NONE toward EXCLUSIVE. The argument to +// xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never +// SQLITE_LOCK_NONE. If the database file lock is already at or above the +// requested lock, then the call to xLock() is a no-op. +// xUnlock() downgrades the database file lock to either SHARED or NONE. +// +// If the lock is already at or below the requested lock state, then the call +// +// to xUnlock() is a no-op. // 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 @@ -22529,6 +22542,7 @@ type sqlite3_api_routines = struct { Fdeserialize uintptr Fserialize uintptr Fdb_name uintptr + Fvalue_encoding uintptr } // CAPI3REF: Loadable Extension Thunk @@ -22539,6 +22553,24 @@ type sqlite3_api_routines = struct { // on some platforms. type Sqlite3_api_routines = sqlite3_api_routines +// CAPI3REF: File Name +// +// Type [sqlite3_filename] is used by SQLite to pass filenames to the +// xOpen method of a [VFS]. It may be cast to (const char*) and treated +// as a normal, nul-terminated, UTF-8 buffer containing the filename, but +// may also be passed to special APIs such as: +// +//
      +//
    • sqlite3_filename_database() +//
    • sqlite3_filename_journal() +//
    • sqlite3_filename_wal() +//
    • sqlite3_uri_parameter() +//
    • sqlite3_uri_boolean() +//
    • sqlite3_uri_int64() +//
    • sqlite3_uri_key() +//
    +type Sqlite3_filename = uintptr + type sqlite3_vfs = struct { FiVersion int32 FszOsFile int32 @@ -24293,6 +24325,17 @@ type Index1 = struct { } type Index = Index1 +type IndexedExpr1 = struct { + FpExpr uintptr + FiDataCur int32 + FiIdxCur int32 + FiIdxCol int32 + FbMaybeNullRow U8 + F__ccgo_pad1 [3]byte + FpIENext uintptr +} + +type IndexedExpr = IndexedExpr1 type IndexSample1 = struct { Fp uintptr Fn int32 @@ -24332,6 +24375,7 @@ type Lookaside1 = struct { FpMiddle uintptr FpStart uintptr FpEnd uintptr + FpTrueEnd uintptr } type Lookaside = Lookaside1 @@ -24382,7 +24426,7 @@ type Parse1 = struct { FhasCompound U8 FokConstFactor U8 FdisableLookaside U8 - FdisableVtab U8 + FprepFlags U8 FwithinRJSubrtn U8 F__ccgo_pad1 [1]byte FnRangeReg int32 @@ -24397,6 +24441,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr + FpIdxExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -24768,8 +24813,7 @@ type WhereInfo1 = struct { FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr - FpWhere uintptr - FpLimit uintptr + FpSelect uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 @@ -24786,7 +24830,6 @@ type WhereInfo1 = struct { FiTop int32 FiEndWhere int32 FpLoops uintptr - FpExprMods uintptr FpMemToFree uintptr FrevMask Bitmask FsWC WhereClause @@ -25048,8 +25091,8 @@ type BtreePayload = BtreePayload1 // of this structure. type Vdbe1 = struct { Fdb uintptr - FpPrev uintptr - FpNext uintptr + FppVPrev uintptr + FpVNext uintptr FpParse uintptr FnVar YnVar F__ccgo_pad1 [2]byte @@ -25394,17 +25437,6 @@ type IdxCover = struct { F__ccgo_pad1 [4]byte } -// 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 -} - // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr @@ -25434,7 +25466,14 @@ type RenameCtx1 = struct { FzOld uintptr } -var sqlite3azCompileOpt = [51]uintptr{ +// Context pointer passed down through the tree-walk. +type CoveringIndexCheck = struct { + FpIdx uintptr + FiTabCur int32 + F__ccgo_pad1 [4]byte +} + +var sqlite3azCompileOpt = [52]uintptr{ ts + 7, ts + 27, ts + 46, @@ -25443,49 +25482,50 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 112, ts + 142, ts + 162, - ts + 185, - ts + 210, - ts + 237, - ts + 262, - ts + 284, - ts + 316, - ts + 342, - ts + 367, - ts + 390, - ts + 402, - ts + 417, - ts + 439, - ts + 464, - ts + 487, - ts + 509, - ts + 520, - ts + 533, - ts + 548, - ts + 564, - ts + 577, - ts + 598, - ts + 622, - ts + 645, - ts + 661, - ts + 677, - ts + 701, - ts + 728, + ts + 182, + ts + 205, + ts + 230, + ts + 257, + ts + 282, + ts + 304, + ts + 336, + ts + 362, + ts + 387, + ts + 410, + ts + 422, + ts + 437, + ts + 459, + ts + 484, + ts + 507, + ts + 529, + ts + 540, + ts + 553, + ts + 568, + ts + 584, + ts + 597, + ts + 618, + ts + 642, + ts + 665, + ts + 681, + ts + 697, + ts + 721, ts + 748, - ts + 769, - ts + 791, - ts + 821, - ts + 846, - ts + 872, + ts + 768, + ts + 789, + ts + 811, + ts + 841, + ts + 866, ts + 892, - ts + 918, - ts + 941, - ts + 967, - ts + 989, - ts + 1010, - ts + 1021, - ts + 1029, - ts + 1043, - ts + 1056, + ts + 912, + ts + 938, + ts + 961, + ts + 987, + ts + 1009, + ts + 1030, + ts + 1041, + ts + 1049, + ts + 1063, + ts + 1076, } func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { @@ -25587,7 +25627,6 @@ var Xsqlite3CtypeMap = [256]uint8{ // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ - FbMemstat: SQLITE_DEFAULT_MEMSTATUS, FbCoreMutex: U8(1), FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -25635,10 +25674,10 @@ var Xsqlite3WhereTrace U32 = U32(0) // 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 = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x12), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x01), uint8(0x23), uint8(0x0b), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1089)) // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -25650,10 +25689,6 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) // // 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)} var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), @@ -25663,21 +25698,13 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } -var Xsqlite3StdTypeMap = [6]int8{ - int8(0), - int8(SQLITE_BLOB), - int8(SQLITE_INTEGER), - int8(SQLITE_INTEGER), - int8(SQLITE_FLOAT), - int8(SQLITE_TEXT), -} var Xsqlite3StdType = [6]uintptr{ - ts + 1076, - ts + 1080, - ts + 1085, - ts + 1089, - ts + 1097, - ts + 1102, + ts + 1096, + ts + 1100, + ts + 1105, + ts + 1109, + ts + 1117, + ts + 1122, } // SQL is translated into a sequence of instructions to be @@ -25976,7 +26003,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23009) + return Xsqlite3MisuseError(tls, 23140) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -26113,6 +26140,8 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart 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) { @@ -26136,6 +26165,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -26150,9 +26180,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p *(*int32)(unsafe.Pointer(bp + 4)) = 0 (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 - for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpVNext { Xsqlite3VdbeDelete(tls, pVdbe) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 @@ -26410,7 +26443,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1107, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1127, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -26436,13 +26469,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { defer tls.Free(36) var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1115, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1135, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1123, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1143, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -26518,7 +26551,7 @@ func computeJD(tls *libc.TLS, p uintptr) { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(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)) + *(*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)+0.5) 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 = int8(0) @@ -26540,7 +26573,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { } else { neg = 0 } - if getDigits(tls, zDate, ts+1127, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1147, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -26597,7 +26630,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1139) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1159) == 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))) @@ -26730,7 +26763,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { *(*Time_t)(unsafe.Pointer(bp + 88)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+88, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1143, -1) + Xsqlite3_result_error(tls, pCtx, ts+1163, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff @@ -26754,12 +26787,12 @@ var aXformType = [6]struct { FrLimit float32 FrXform float32 }{ - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1166)), FrLimit: 4.6427e+14, FrXform: 1.0}, - {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1173)), FrLimit: 7.7379e+12, FrXform: 60.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1180)), FrLimit: 1.2897e+11, FrXform: 3600.0}, - {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1187)), FrLimit: 5373485.0, FrXform: 86400.0}, - {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1194)), FrLimit: 176546.0, FrXform: 2592000.0}, - {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1201)), FrLimit: 14713.0, FrXform: 31536000.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1186)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1193)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1200)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1207)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1214)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1221)), FrLimit: 14713.0, FrXform: 31536000.0}, } func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { @@ -26771,7 +26804,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { - if Xsqlite3_stricmp(tls, z, ts+1208) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1228) == 0 { if idx > 1 { return 1 } @@ -26793,7 +26826,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'j': { - if Xsqlite3_stricmp(tls, z, ts+1213) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1233) == 0 { if idx > 1 { return 1 } @@ -26807,7 +26840,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'l': { - if Xsqlite3_stricmp(tls, z, ts+1223) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break @@ -26815,7 +26848,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'u': { - if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1253) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } @@ -26827,7 +26860,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1263) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 var iGuess I64 @@ -26861,9 +26894,9 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 'w': { - if Xsqlite3_strnicmp(tls, z, ts+1247, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1267, 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) { + *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 7.0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -26882,7 +26915,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i } case 's': { - if Xsqlite3_strnicmp(tls, z, ts+1256, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1276, 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) { @@ -26896,14 +26929,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1266) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1286) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1272) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1292) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1277) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1297) == 0 { rc = 0 } break @@ -27229,7 +27262,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88)).FD)) break } @@ -27239,13 +27272,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136, ts+1286, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1306, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88)).Fh)) break } @@ -27263,41 +27296,41 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136, ts+1293, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1313, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136, ts+1298, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1318, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88)).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+1304, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1324, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1301, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88)).Fs))) break } @@ -27310,7 +27343,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1329, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88)).FY)) break } @@ -27360,15 +27393,15 @@ func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { } 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 + 1213}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1233}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1314}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1319}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, - {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}} + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1253}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1339}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1344}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1353}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1362}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1375}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1393}} // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All @@ -27519,7 +27552,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f var rc int32 rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc @@ -27780,7 +27813,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { p = libc.Xmalloc(tls, uint64(nByte)) if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1386, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1406, libc.VaList(bp, nByte)) } return p } @@ -27800,7 +27833,7 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { var p uintptr = libc.Xrealloc(tls, pPrior, uint64(nByte)) if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1424, + ts+1444, libc.VaList(bp, libc.X_msize(tls, pPrior), nByte)) } return p @@ -54824,7 +54857,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - if n == uint64(0) || n >= uint64(0x7fffff00) { + if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) @@ -54860,7 +54893,7 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { } func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { - return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd)) } // Return the size of a memory allocation previously obtained from @@ -54880,7 +54913,7 @@ func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { if db != 0 { - if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } @@ -54929,24 +54962,51 @@ func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { 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 } } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbNNFreeNN(tls *libc.TLS, db uintptr, p uintptr) { + 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 + } + } + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return } Xsqlite3_free(tls, p) @@ -55262,7 +55322,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { var pParse uintptr - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1460, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1480, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM for pParse = (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).FpOuterParse; pParse != 0; pParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse { (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -55335,8 +55395,8 @@ type et_info = struct { // by an instance of the following structure type Et_info = et_info -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1474)) -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1507)) +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1494)) +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1527)) 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)}, @@ -55548,7 +55608,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1514, 1) + Xsqlite3_str_append(tls, pAccum, ts+1534, 1) goto __5 __11: ; @@ -56105,7 +56165,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104))) != 0) { goto __127 } - bufpt = ts + 1516 + bufpt = ts + 1536 length = 3 goto __58 __127: @@ -56165,7 +56225,7 @@ __138: } bufpt = bp + 16 *(*int8)(unsafe.Pointer(bp + 16)) = prefix - libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1520, uint64(4)) + libc.Xmemcpy(tls, bp+16+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1540, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -56506,7 +56566,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1524 + bufpt = ts + 1544 goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -56630,9 +56690,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1525 + return ts + 1545 } - return ts + 1530 + return ts + 1550 }() __220: ; @@ -56780,7 +56840,7 @@ __243: goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1537, 1) + Xsqlite3_str_append(tls, pAccum, ts+1557, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -56797,10 +56857,10 @@ __248: if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { goto __250 } - Xsqlite3_str_appendf(tls, pAccum, ts+1539, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1559, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) goto __251 __250: - Xsqlite3_str_appendf(tls, pAccum, ts+1549, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1569, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) __251: ; __249: @@ -56855,7 +56915,7 @@ __4: __5: } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1563)) +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1583)) // 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 @@ -57020,7 +57080,7 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { } 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) }{Xsqlite3OomClear}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1524, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1544, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -57252,20 +57312,126 @@ func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) } type sqlite3PrngType = struct { - FisInit uint8 - Fi uint8 - Fj uint8 - Fs [256]uint8 + Fs [16]U32 + Fout [64]U8 + Fn U8 + F__ccgo_pad1 [3]byte } var sqlite3Prng sqlite3PrngType +func chacha_block(tls *libc.TLS, out uintptr, in uintptr) { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + libc.Xmemcpy(tls, bp, in, uint64(64)) + for i = 0; i < 10; i++ { + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<16 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<12 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp)) += *(*U32)(unsafe.Pointer(bp + 5*4)) + *(*U32)(unsafe.Pointer(bp + 15*4)) ^= *(*U32)(unsafe.Pointer(bp)) + *(*U32)(unsafe.Pointer(bp + 15*4)) = *(*U32)(unsafe.Pointer(bp + 15*4))<<8 | *(*U32)(unsafe.Pointer(bp + 15*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 10*4)) += *(*U32)(unsafe.Pointer(bp + 15*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) ^= *(*U32)(unsafe.Pointer(bp + 10*4)) + *(*U32)(unsafe.Pointer(bp + 5*4)) = *(*U32)(unsafe.Pointer(bp + 5*4))<<7 | *(*U32)(unsafe.Pointer(bp + 5*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<16 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<12 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 1*4)) += *(*U32)(unsafe.Pointer(bp + 6*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) ^= *(*U32)(unsafe.Pointer(bp + 1*4)) + *(*U32)(unsafe.Pointer(bp + 12*4)) = *(*U32)(unsafe.Pointer(bp + 12*4))<<8 | *(*U32)(unsafe.Pointer(bp + 12*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 11*4)) += *(*U32)(unsafe.Pointer(bp + 12*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) ^= *(*U32)(unsafe.Pointer(bp + 11*4)) + *(*U32)(unsafe.Pointer(bp + 6*4)) = *(*U32)(unsafe.Pointer(bp + 6*4))<<7 | *(*U32)(unsafe.Pointer(bp + 6*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<16 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<12 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 2*4)) += *(*U32)(unsafe.Pointer(bp + 7*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) ^= *(*U32)(unsafe.Pointer(bp + 2*4)) + *(*U32)(unsafe.Pointer(bp + 13*4)) = *(*U32)(unsafe.Pointer(bp + 13*4))<<8 | *(*U32)(unsafe.Pointer(bp + 13*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 8*4)) += *(*U32)(unsafe.Pointer(bp + 13*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) ^= *(*U32)(unsafe.Pointer(bp + 8*4)) + *(*U32)(unsafe.Pointer(bp + 7*4)) = *(*U32)(unsafe.Pointer(bp + 7*4))<<7 | *(*U32)(unsafe.Pointer(bp + 7*4))>>(32-7) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<16 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-16) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<12 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-12) + *(*U32)(unsafe.Pointer(bp + 3*4)) += *(*U32)(unsafe.Pointer(bp + 4*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) ^= *(*U32)(unsafe.Pointer(bp + 3*4)) + *(*U32)(unsafe.Pointer(bp + 14*4)) = *(*U32)(unsafe.Pointer(bp + 14*4))<<8 | *(*U32)(unsafe.Pointer(bp + 14*4))>>(32-8) + *(*U32)(unsafe.Pointer(bp + 9*4)) += *(*U32)(unsafe.Pointer(bp + 14*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) ^= *(*U32)(unsafe.Pointer(bp + 9*4)) + *(*U32)(unsafe.Pointer(bp + 4*4)) = *(*U32)(unsafe.Pointer(bp + 4*4))<<7 | *(*U32)(unsafe.Pointer(bp + 4*4))>>(32-7) + } + for i = 0; i < 16; i++ { + *(*U32)(unsafe.Pointer(out + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(in + uintptr(i)*4)) + } +} + // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { - bp := tls.Alloc(256) - defer tls.Free(256) - - var t uint8 var zBuf uintptr = pBuf var mutex uintptr @@ -57278,46 +57444,46 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { - sqlite3Prng.FisInit = uint8(0) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) = U32(0) Xsqlite3_mutex_leave(tls, mutex) return } - if !(int32(sqlite3Prng.FisInit) != 0) { + if *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)))) == U32(0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) - var i int32 - - sqlite3Prng.Fj = uint8(0) - sqlite3Prng.Fi = uint8(0) + libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&chacha20_init)), uint64(16)) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4, 0, uint64(44)) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp) + Xsqlite3OsRandomness(tls, pVfs, 44, uintptr(unsafe.Pointer(&sqlite3Prng))+4*4) } - 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(*(*int8)(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) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 15*4)) = *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4)) = U32(0) + sqlite3Prng.Fn = U8(0) } - 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))) + for 1 != 0 { + if N <= int32(sqlite3Prng.Fn) { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64+uintptr(int32(sqlite3Prng.Fn)-N), uint64(N)) + *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 128)) -= U8(N) + break + } + if int32(sqlite3Prng.Fn) > 0 { + libc.Xmemcpy(tls, zBuf, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uint64(sqlite3Prng.Fn)) + N = N - int32(sqlite3Prng.Fn) + zBuf += uintptr(sqlite3Prng.Fn) + } + *(*U32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 12*4))++ + chacha_block(tls, uintptr(unsafe.Pointer(&sqlite3Prng))+64, uintptr(unsafe.Pointer(&sqlite3Prng))) + sqlite3Prng.Fn = U8(64) } Xsqlite3_mutex_leave(tls, mutex) } +var chacha20_init = [4]U32{ + U32(0x61707865), U32(0x3320646e), U32(0x79622d32), U32(0x6b206574), +} + var sqlite3SavedPrng sqlite3PrngType func Xsqlite3PrngSaveState(tls *libc.TLS) { @@ -58733,7 +58899,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { var c int32 = 0 var i int32 - var pow63 uintptr = ts + 1572 + var pow63 uintptr = ts + 1592 for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -59284,7 +59450,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1591, + ts+1611, libc.VaList(bp, zType)) } @@ -59303,13 +59469,13 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1525) + logBadConnection(tls, ts+1545) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1636) + logBadConnection(tls, ts+1656) } return 0 } else { @@ -59322,7 +59488,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { 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+1645) + logBadConnection(tls, ts+1665) return 0 } else { return 1 @@ -59795,193 +59961,193 @@ func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { } var azName = [187]uintptr{ - ts + 1653, - ts + 1663, - ts + 1674, - ts + 1686, - ts + 1697, - ts + 1709, - ts + 1716, - ts + 1724, - ts + 1732, - ts + 1737, - ts + 1743, + ts + 1673, + ts + 1683, + ts + 1694, + ts + 1706, + ts + 1717, + ts + 1729, + ts + 1736, + ts + 1744, + ts + 1752, ts + 1757, - ts + 1763, - ts + 1773, - ts + 1778, - ts + 1783, - ts + 1786, - ts + 1792, - ts + 1805, - ts + 1815, - ts + 1819, - ts + 1826, - ts + 1833, - ts + 1840, - ts + 1847, - ts + 1857, + ts + 1762, + ts + 1768, + ts + 1782, + ts + 1788, + ts + 1798, + ts + 1803, + ts + 1808, + ts + 1811, + ts + 1817, + ts + 1824, + ts + 1828, + ts + 1838, + ts + 1845, + ts + 1852, + ts + 1859, ts + 1866, - ts + 1877, - ts + 1886, - ts + 1892, - ts + 1902, - ts + 1912, - ts + 1917, - ts + 1927, - ts + 1938, - ts + 1943, - ts + 1950, - ts + 1961, - ts + 1966, - ts + 1971, - ts + 1977, - ts + 1983, - ts + 1989, - ts + 1995, - ts + 1998, + ts + 1876, + ts + 1885, + ts + 1896, + ts + 1905, + ts + 1911, + ts + 1921, + ts + 1931, + ts + 1936, + ts + 1946, + ts + 1957, + ts + 1962, + ts + 1969, + ts + 1980, + ts + 1985, + ts + 1990, + ts + 1996, ts + 2002, - ts + 2013, - ts + 2024, + ts + 2008, + ts + 2011, + ts + 2015, + ts + 2021, ts + 2032, - ts + 2041, - ts + 2047, - ts + 2054, - ts + 2062, - ts + 2065, - ts + 2068, - ts + 2071, - ts + 2074, - ts + 2077, - ts + 2080, + ts + 2043, + ts + 2051, + ts + 2060, + ts + 2067, + ts + 2075, + ts + 2078, + ts + 2081, + ts + 2084, ts + 2087, - ts + 2097, - ts + 2110, - ts + 2121, - ts + 2127, - ts + 2134, - ts + 2139, - ts + 2148, - ts + 2157, - ts + 2164, - ts + 2177, - ts + 2188, - ts + 2193, - ts + 2201, + ts + 2090, + ts + 2093, + ts + 2100, + ts + 2106, + ts + 2116, + ts + 2129, + ts + 2140, + ts + 2146, + ts + 2153, + ts + 2162, + ts + 2171, + ts + 2178, + ts + 2191, + ts + 2202, ts + 2207, - ts + 2214, - ts + 2226, - ts + 2231, + ts + 2215, + ts + 2221, + ts + 2228, ts + 2240, ts + 2245, ts + 2254, ts + 2259, - ts + 2264, - ts + 2270, + ts + 2268, + ts + 2273, ts + 2278, - ts + 2286, - ts + 2296, - ts + 2304, - ts + 2311, - ts + 2324, - ts + 2329, - ts + 2341, - ts + 2349, - ts + 2356, - ts + 2367, - ts + 2374, + ts + 2284, + ts + 2292, + ts + 2300, + ts + 2310, + ts + 2318, + ts + 2325, + ts + 2338, + ts + 2343, + ts + 2355, + ts + 2363, + ts + 2370, ts + 2381, - ts + 2391, - ts + 2400, - ts + 2411, - ts + 2417, - ts + 2428, - ts + 2438, - ts + 2448, - ts + 2455, - ts + 2461, - ts + 2471, - ts + 2482, - ts + 2486, - ts + 2495, - ts + 2504, - ts + 2511, - ts + 2521, - ts + 2528, - ts + 2537, - ts + 2547, - ts + 2554, - ts + 2562, + ts + 2388, + ts + 2395, + ts + 2405, + ts + 2414, + ts + 2425, + ts + 2431, + ts + 2442, + ts + 2452, + ts + 2462, + ts + 2469, + ts + 2475, + ts + 2485, + ts + 2496, + ts + 2500, + ts + 2509, + ts + 2518, + ts + 2525, + ts + 2535, + ts + 2542, + ts + 2551, + ts + 2561, + ts + 2568, ts + 2576, - ts + 2584, + ts + 2590, ts + 2598, - ts + 2609, - ts + 2622, - ts + 2633, - ts + 2639, - ts + 2651, - ts + 2660, - ts + 2668, - ts + 2677, - ts + 2686, - ts + 2693, - ts + 2701, - ts + 2708, - ts + 2719, + ts + 2612, + ts + 2623, + ts + 2636, + ts + 2647, + ts + 2653, + ts + 2665, + ts + 2674, + ts + 2682, + ts + 2691, + ts + 2700, + ts + 2707, + ts + 2715, + ts + 2722, ts + 2733, - ts + 2744, - ts + 2752, + ts + 2747, ts + 2758, ts + 2766, - ts + 2774, - ts + 2784, - ts + 2797, - ts + 2807, - ts + 2820, - ts + 2829, - ts + 2840, - ts + 2848, + ts + 2772, + ts + 2780, + ts + 2788, + ts + 2798, + ts + 2811, + ts + 2821, + ts + 2834, + ts + 2843, ts + 2854, - ts + 2866, - ts + 2878, - ts + 2886, - ts + 2898, - ts + 2911, - ts + 2921, - ts + 2931, - ts + 2936, - ts + 2948, - ts + 2960, - ts + 2970, - ts + 2976, - ts + 2986, - ts + 2993, - ts + 3005, - ts + 3016, - ts + 3024, - ts + 3033, - ts + 3042, - ts + 3051, - ts + 3058, - ts + 3069, - ts + 3082, - ts + 3092, - ts + 3099, - ts + 3107, - ts + 3116, - ts + 3122, + ts + 2862, + ts + 2868, + ts + 2880, + ts + 2892, + ts + 2900, + ts + 2912, + ts + 2925, + ts + 2935, + ts + 2945, + ts + 2950, + ts + 2962, + ts + 2974, + ts + 2984, + ts + 2990, + ts + 3000, + ts + 3007, + ts + 3019, + ts + 3030, + ts + 3038, + ts + 3047, + ts + 3056, + ts + 3065, + ts + 3072, + ts + 3083, + ts + 3096, + ts + 3106, + ts + 3113, + ts + 3121, ts + 3130, - ts + 3138, - ts + 3146, - ts + 3156, - ts + 3165, - ts + 3176, - ts + 3186, - ts + 3192, - ts + 3203, - ts + 3214, - ts + 3219, - ts + 3227, + ts + 3136, + ts + 3144, + ts + 3152, + ts + 3160, + ts + 3170, + ts + 3179, + ts + 3190, + ts + 3200, + ts + 3206, + ts + 3217, + ts + 3228, + ts + 3233, + ts + 3241, } type winShm = struct { @@ -60060,86 +60226,86 @@ type win_syscall = struct { } var aSyscall = [80]win_syscall{ - {FzName: ts + 3237, FpCurrent: 0}, - {FzName: ts + 3253}, - {FzName: ts + 3264}, - {FzName: ts + 3275, FpCurrent: 0}, - {FzName: ts + 3287, FpCurrent: 0}, - {FzName: ts + 3299, FpCurrent: 0}, - {FzName: ts + 3311, FpCurrent: 0}, - {FzName: ts + 3330, FpCurrent: 0}, - {FzName: ts + 3349, FpCurrent: 0}, - {FzName: ts + 3362, FpCurrent: 0}, - {FzName: ts + 3374, FpCurrent: 0}, - {FzName: ts + 3386}, - {FzName: ts + 3410}, - {FzName: ts + 3431, FpCurrent: 0}, - {FzName: ts + 3448, FpCurrent: 0}, - {FzName: ts + 3463, FpCurrent: 0}, - {FzName: ts + 3478, FpCurrent: 0}, - {FzName: ts + 3490, FpCurrent: 0}, - {FzName: ts + 3510, FpCurrent: 0}, - {FzName: ts + 3528, FpCurrent: 0}, - {FzName: ts + 3546, FpCurrent: 0}, - {FzName: ts + 3565, FpCurrent: 0}, - {FzName: ts + 3584, FpCurrent: 0}, - {FzName: ts + 3605, FpCurrent: 0}, - {FzName: ts + 3617, FpCurrent: 0}, - {FzName: ts + 3634, FpCurrent: 0}, - {FzName: ts + 3651, FpCurrent: 0}, - {FzName: ts + 3664, FpCurrent: 0}, - {FzName: ts + 3680, FpCurrent: 0}, + {FzName: ts + 3251, FpCurrent: 0}, + {FzName: ts + 3267}, + {FzName: ts + 3278}, + {FzName: ts + 3289, FpCurrent: 0}, + {FzName: ts + 3301, FpCurrent: 0}, + {FzName: ts + 3313, FpCurrent: 0}, + {FzName: ts + 3325, FpCurrent: 0}, + {FzName: ts + 3344, FpCurrent: 0}, + {FzName: ts + 3363, FpCurrent: 0}, + {FzName: ts + 3376, FpCurrent: 0}, + {FzName: ts + 3388, FpCurrent: 0}, + {FzName: ts + 3400}, + {FzName: ts + 3424}, + {FzName: ts + 3445, FpCurrent: 0}, + {FzName: ts + 3462, FpCurrent: 0}, + {FzName: ts + 3477, FpCurrent: 0}, + {FzName: ts + 3492, FpCurrent: 0}, + {FzName: ts + 3504, FpCurrent: 0}, + {FzName: ts + 3524, FpCurrent: 0}, + {FzName: ts + 3542, FpCurrent: 0}, + {FzName: ts + 3560, FpCurrent: 0}, + {FzName: ts + 3579, FpCurrent: 0}, + {FzName: ts + 3598, FpCurrent: 0}, + {FzName: ts + 3619, FpCurrent: 0}, + {FzName: ts + 3631, FpCurrent: 0}, + {FzName: ts + 3648, FpCurrent: 0}, + {FzName: ts + 3665, FpCurrent: 0}, + {FzName: ts + 3678, FpCurrent: 0}, {FzName: ts + 3694, FpCurrent: 0}, {FzName: ts + 3708, FpCurrent: 0}, - {FzName: ts + 3732, FpCurrent: 0}, - {FzName: ts + 3745, FpCurrent: 0}, - {FzName: ts + 3758, FpCurrent: 0}, - {FzName: ts + 3771, FpCurrent: 0}, + {FzName: ts + 3722, FpCurrent: 0}, + {FzName: ts + 3746, FpCurrent: 0}, + {FzName: ts + 3759, FpCurrent: 0}, + {FzName: ts + 3772, FpCurrent: 0}, {FzName: ts + 3785, FpCurrent: 0}, {FzName: ts + 3799, FpCurrent: 0}, - {FzName: ts + 3809, FpCurrent: 0}, - {FzName: ts + 3820, FpCurrent: 0}, - {FzName: ts + 3832, FpCurrent: 0}, - {FzName: ts + 3841, FpCurrent: 0}, - {FzName: ts + 3853, FpCurrent: 0}, - {FzName: ts + 3862, FpCurrent: 0}, - {FzName: ts + 3875, FpCurrent: 0}, - {FzName: ts + 3887, FpCurrent: 0}, - {FzName: ts + 3900, FpCurrent: 0}, - {FzName: ts + 3913, FpCurrent: 0}, - {FzName: ts + 3923, FpCurrent: 0}, - {FzName: ts + 3932, FpCurrent: 0}, - {FzName: ts + 3943, FpCurrent: 0}, + {FzName: ts + 3813, FpCurrent: 0}, + {FzName: ts + 3823, FpCurrent: 0}, + {FzName: ts + 3834, FpCurrent: 0}, + {FzName: ts + 3846, FpCurrent: 0}, + {FzName: ts + 3855, FpCurrent: 0}, + {FzName: ts + 3867, FpCurrent: 0}, + {FzName: ts + 3876, FpCurrent: 0}, + {FzName: ts + 3889, FpCurrent: 0}, + {FzName: ts + 3901, FpCurrent: 0}, + {FzName: ts + 3914, FpCurrent: 0}, + {FzName: ts + 3927, FpCurrent: 0}, + {FzName: ts + 3937, FpCurrent: 0}, + {FzName: ts + 3946, FpCurrent: 0}, {FzName: ts + 3957, FpCurrent: 0}, - {FzName: ts + 3977, FpCurrent: 0}, - {FzName: ts + 4001, FpCurrent: 0}, - {FzName: ts + 4010, FpCurrent: 0}, - {FzName: ts + 4023, FpCurrent: 0}, - {FzName: ts + 4038, FpCurrent: 0}, - {FzName: ts + 4044, FpCurrent: 0}, - {FzName: ts + 4065, FpCurrent: 0}, - {FzName: ts + 4076, FpCurrent: 0}, - {FzName: ts + 4089, FpCurrent: 0}, - {FzName: ts + 4105, FpCurrent: 0}, - {FzName: ts + 4125, FpCurrent: 0}, - {FzName: ts + 4135}, - {FzName: ts + 4150, FpCurrent: 0}, - {FzName: ts + 4170, FpCurrent: 0}, - {FzName: ts + 4192}, - {FzName: ts + 4209}, - {FzName: ts + 4238}, - {FzName: ts + 4259}, - {FzName: ts + 4271}, - {FzName: ts + 4291}, - {FzName: ts + 4306}, - {FzName: ts + 4326, FpCurrent: 0}, - {FzName: ts + 4345, FpCurrent: 0}, - {FzName: ts + 4364, FpCurrent: 0}, - {FzName: ts + 4379}, - {FzName: ts + 4404}, - {FzName: ts + 4431}, - {FzName: ts + 4442}, - {FzName: ts + 4463, FpCurrent: 0}, + {FzName: ts + 3971, FpCurrent: 0}, + {FzName: ts + 3991, FpCurrent: 0}, + {FzName: ts + 4015, FpCurrent: 0}, + {FzName: ts + 4024, FpCurrent: 0}, + {FzName: ts + 4037, FpCurrent: 0}, + {FzName: ts + 4052, FpCurrent: 0}, + {FzName: ts + 4058, FpCurrent: 0}, + {FzName: ts + 4079, FpCurrent: 0}, + {FzName: ts + 4090, FpCurrent: 0}, + {FzName: ts + 4103, FpCurrent: 0}, + {FzName: ts + 4119, FpCurrent: 0}, + {FzName: ts + 4139, FpCurrent: 0}, + {FzName: ts + 4149}, + {FzName: ts + 4164, FpCurrent: 0}, + {FzName: ts + 4184, FpCurrent: 0}, + {FzName: ts + 4206}, + {FzName: ts + 4223}, + {FzName: ts + 4252}, + {FzName: ts + 4273}, + {FzName: ts + 4285}, + {FzName: ts + 4305}, + {FzName: ts + 4320}, + {FzName: ts + 4340, FpCurrent: 0}, + {FzName: ts + 4359, FpCurrent: 0}, + {FzName: ts + 4378, FpCurrent: 0}, + {FzName: ts + 4393}, + {FzName: ts + 4418}, + {FzName: ts + 4445}, + {FzName: ts + 4456}, + {FzName: ts + 4477, FpCurrent: 0}, } func winSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { @@ -60468,7 +60634,7 @@ __3: if !(zValue != 0 && *(*int8)(unsafe.Pointer(zValue)) != 0) { goto __7 } - zCopy = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, zValue)) + zCopy = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, zValue)) if !(zCopy == uintptr(0)) { goto __8 } @@ -60559,9 +60725,9 @@ func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr } } if DWORD(0) == dwLen { - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4482, libc.VaList(bp, lastErrno, lastErrno)) + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4496, libc.VaList(bp, lastErrno, lastErrno)) } else { - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4479, libc.VaList(bp+16, zOut)) + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4493, libc.VaList(bp+16, zOut)) Xsqlite3_free(tls, zOut) } @@ -60578,13 +60744,13 @@ func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uint winGetLastErrorMsg(tls, lastErrno, int32(unsafe.Sizeof([500]int8{})), bp+40) if zPath == uintptr(0) { - zPath = ts + 1524 + zPath = ts + 1544 } for i = 0; *(*int8)(unsafe.Pointer(bp + 40 + uintptr(i))) != 0 && int32(*(*int8)(unsafe.Pointer(bp + 40 + uintptr(i)))) != '\r' && int32(*(*int8)(unsafe.Pointer(bp + 40 + uintptr(i)))) != '\n'; i++ { } *(*int8)(unsafe.Pointer(bp + 40 + uintptr(i))) = int8(0) Xsqlite3_log(tls, errcode, - ts+4502, + ts+4516, libc.VaList(bp, iLine, lastErrno, zFunc, zPath, bp+40)) return errcode @@ -60618,7 +60784,7 @@ func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { if nRetry != 0 { Xsqlite3_log(tls, SQLITE_NOTICE, - ts+4533, + ts+4547, libc.VaList(bp, winIoerrRetryDelay*nRetry*(nRetry+1)/2, lineno)) } } @@ -60671,7 +60837,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+4583, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46194) + winLogErrorAtLine(tls, SQLITE_IOERR|int32(22)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4597, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47395) return 1 } @@ -60697,7 +60863,7 @@ func winClose(tls *libc.TLS, id uintptr) int32 { 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+4595, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46290) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4609, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47491) } func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { @@ -60731,9 +60897,9 @@ func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_ } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 40)) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4604, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46358) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4618, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47559) } - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 46361) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 47562) if *(*DWORD)(unsafe.Pointer(bp + 32)) < DWORD(amt) { libc.Xmemset(tls, pBuf+uintptr(*(*DWORD)(unsafe.Pointer(bp + 32))), 0, uint64(DWORD(amt)-*(*DWORD)(unsafe.Pointer(bp + 32)))) @@ -60789,12 +60955,12 @@ func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 if rc != 0 { 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+4612, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46470) + return winLogErrorAtLine(tls, SQLITE_FULL, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4626, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47671) } - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4622, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46475) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4636, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47676) } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 46478) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 47679) } return SQLITE_OK @@ -60821,10 +60987,10 @@ func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { winUnmapfile(tls, pFile) if winSeekFile(tls, pFile, nByte) != 0 { - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4632, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46541) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4646, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47742) } 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+4645, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46546) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4659, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47747) } if rc == SQLITE_OK && oldMmapSize > int64(0) { @@ -60850,7 +61016,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { } 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+4658, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46638) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4672, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47839) } } rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 13*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) @@ -60860,7 +61026,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { } 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+4667, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46653) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4681, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47854) } return int32(0) } @@ -60881,7 +61047,7 @@ func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { 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+4676, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46694) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(7)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4690, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47895) } } @@ -60923,7 +61089,7 @@ func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { } 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+4688, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46789) + winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4702, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47990) } return res @@ -61049,7 +61215,7 @@ func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { if type1 >= EXCLUSIVE_LOCK { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+2), uint32(0), uint32(SHARED_SIZE), uint32(0)) if locktype == SHARED_LOCK && !(winGetReadLock(tls, pFile) != 0) { - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4706, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47015) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4720, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 48216) } } if type1 >= RESERVED_LOCK { @@ -61156,7 +61322,7 @@ func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*WinFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*WinFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK @@ -61352,7 +61518,7 @@ func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { 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+4716, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 47481) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4730, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 48682) } } @@ -61394,7 +61560,7 @@ __1: __2: ; (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename = pNew + 1*160 - Xsqlite3_snprintf(tls, nName+15, (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename, ts+4736, libc.VaList(bp, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath)) + Xsqlite3_snprintf(tls, nName+15, (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename, ts+4750, libc.VaList(bp, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath)) winShmEnterMutex(tls) pShmNode = winShmNodeList @@ -61444,7 +61610,7 @@ __10: ; __9: ; - if !(0 == Xsqlite3_uri_boolean(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, ts+4743, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, ts+4757, 0)) { goto __11 } inFlags = inFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) @@ -61459,7 +61625,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+4756, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 47563) + rc = winLogErrorAtLine(tls, rc, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4770, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 48764) goto shm_open_err __13: ; @@ -61687,7 +61853,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+4767, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47834) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4781, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 49035) goto shmpage_out __6: ; @@ -61705,7 +61871,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+4778, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47849) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4792, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 49050) goto shmpage_out __9: ; @@ -61753,7 +61919,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+4789, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47908) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno, ts+4803, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 49109) if !(hMap != 0) { goto __16 } @@ -61799,7 +61965,7 @@ func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { 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+4800, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47957) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4814, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 49158) } (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion = uintptr(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) @@ -61808,7 +61974,7 @@ func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { 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+4814, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47968) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4828, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 49169) } (*WinFile)(unsafe.Pointer(pFile)).FhMap = uintptr(0) } @@ -61852,7 +62018,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { 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+4828, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 48045) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4842, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 49246) return SQLITE_OK } @@ -61862,7 +62028,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { (*(*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+4840, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 48063) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4854, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 49264) return SQLITE_OK } @@ -62000,7 +62166,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { var i Size_t var j Size_t - var nPre int32 = Xsqlite3Strlen30(tls, ts+4852) + var nPre int32 = Xsqlite3Strlen30(tls, ts+4866) var nMax int32 var nBuf int32 var nDir int32 @@ -62026,9 +62192,9 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4860, uintptr(0), 48364) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4874, uintptr(0), 49566) } - Xsqlite3_snprintf(tls, nMax, zBuf, ts+4479, libc.VaList(bp, Xsqlite3_temp_directory)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+4493, libc.VaList(bp, Xsqlite3_temp_directory)) } Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) } else if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { @@ -62043,11 +62209,11 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { 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+4876, uintptr(0), 48464) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4890, uintptr(0), 49666) } zMulti = winUnicodeToUtf8(tls, zWidePath) if zMulti != 0 { - Xsqlite3_snprintf(tls, nMax, zBuf, ts+4479, libc.VaList(bp+8, zMulti)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+4493, libc.VaList(bp+8, zMulti)) Xsqlite3_free(tls, zMulti) Xsqlite3_free(tls, zWidePath) } else { @@ -62067,11 +62233,11 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { 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+4892, uintptr(0), 48491) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4906, uintptr(0), 49693) } zUtf8 = winMbcsToUtf8(tls, zMbcsPath, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) if zUtf8 != 0 { - Xsqlite3_snprintf(tls, nMax, zBuf, ts+4479, libc.VaList(bp+16, zUtf8)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+4493, libc.VaList(bp+16, zUtf8)) Xsqlite3_free(tls, zUtf8) } else { Xsqlite3_free(tls, zBuf) @@ -62083,17 +62249,17 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { if !(winMakeEndInDirSep(tls, nDir+1, zBuf) != 0) { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4908, uintptr(0), 48515) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4922, uintptr(0), 49717) } nLen = Xsqlite3Strlen30(tls, zBuf) if nLen+nPre+17 > nBuf { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4924, uintptr(0), 48533) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4938, uintptr(0), 49735) } - Xsqlite3_snprintf(tls, nBuf-16-nLen, zBuf+uintptr(nLen), ts+4852, 0) + Xsqlite3_snprintf(tls, nBuf-16-nLen, zBuf+uintptr(nLen), ts+4866, 0) j = Size_t(Xsqlite3Strlen30(tls, zBuf)) Xsqlite3_randomness(tls, 15, zBuf+uintptr(j)) @@ -62121,7 +62287,7 @@ __3: return SQLITE_OK } -var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4940)) +var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4954)) func winIsDir(tls *libc.TLS, zConverted uintptr) int32 { bp := tls.Alloc(44) @@ -62213,7 +62379,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 dwCreationDisposition = DWORD(OPEN_EXISTING) } - if 0 == Xsqlite3_uri_boolean(tls, zName, ts+5003, 0) { + if 0 == Xsqlite3_uri_boolean(tls, zName, ts+5017, 0) { dwShareMode = DWORD(FILE_SHARE_READ | FILE_SHARE_WRITE) } else { dwShareMode = DWORD(0) @@ -62272,7 +62438,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 } } } - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8)), 48822) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8)), 50024) if h == libc.UintptrFromInt64(int64(-1)) { Xsqlite3_free(tls, zConverted) @@ -62283,8 +62449,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)) - winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+5013, zUtf8Name, 48837) - return Xsqlite3CantopenError(tls, 48838) + winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+5027, zUtf8Name, 50039) + return Xsqlite3CantopenError(tls, 50040) } } @@ -62316,7 +62482,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(WINFILE_RDONLY) } if flags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+5021, SQLITE_POWERSAFE_OVERWRITE) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+5035, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(WINFILE_PSOW) } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = DWORD(0) @@ -62399,9 +62565,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)), ts+5026, zFilename, 49010) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, *(*DWORD)(unsafe.Pointer(bp + 4)), ts+5040, zFilename, 50212) } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp)), 49012) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp)), 50214) } Xsqlite3_free(tls, zConverted) @@ -62439,10 +62605,10 @@ func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pRes attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp)).FdwFileAttributes } } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 49062) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36)), 50264) 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)), ts+5036, zFilename, 49065) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(13)<<8, *(*DWORD)(unsafe.Pointer(bp + 40)), ts+5050, zFilename, 50267) } else { attr = libc.Uint32(libc.Uint32FromInt32(-1)) } @@ -62507,7 +62673,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname - }(), zFull, ts+5046, + }(), zFull, ts+5060, libc.VaList(bp, Xsqlite3_data_directory, '\\', zRelative)) return SQLITE_OK } @@ -62520,7 +62686,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5053, zRelative, 49282) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5067, zRelative, 50484) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(WCHAR(0)))) @@ -62532,7 +62698,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5070, zRelative, 49295) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5084, zRelative, 50497) } Xsqlite3_free(tls, zConverted) zOut = winUnicodeToUtf8(tls, zTemp) @@ -62542,7 +62708,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5087, zRelative, 49308) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5101, zRelative, 50510) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(int8(0)))) @@ -62554,7 +62720,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul 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+5104, zRelative, 49321) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5118, zRelative, 50523) } Xsqlite3_free(tls, zConverted) zOut = winMbcsToUtf8(tls, zTemp, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) @@ -62566,7 +62732,7 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname - }(), zFull, ts+4479, libc.VaList(bp+24, zOut)) + }(), zFull, ts+4493, libc.VaList(bp+24, zOut)) Xsqlite3_free(tls, zOut) return SQLITE_OK } else { @@ -62577,7 +62743,8 @@ func winFullPathnameNoMutex(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFul func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32, zFull uintptr) int32 { var rc int32 - var pMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) + var pMutex uintptr + pMutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pMutex) rc = winFullPathnameNoMutex(tls, pVfs, zRelative, nFull, zFull) Xsqlite3_mutex_leave(tls, pMutex) @@ -62748,7 +62915,7 @@ var winVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: MAX_PATH * 4, - FzName: ts + 5121, + FzName: ts + 5135, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62771,7 +62938,7 @@ var winLongPathVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: int32(uint64(unsafe.Sizeof(WCHAR(0))) * uint64(32767)), - FzName: ts + 5127, + FzName: ts + 5141, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62794,7 +62961,7 @@ var winNolockVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: MAX_PATH * 4, - FzName: ts + 5142, + FzName: ts + 5156, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62817,7 +62984,7 @@ var winLongPathNolockVfs = Sqlite3_vfs{ FiVersion: 3, FszOsFile: int32(unsafe.Sizeof(WinFile{})), FmxPathname: int32(uint64(unsafe.Sizeof(WCHAR(0))) * uint64(32767)), - FzName: ts + 5153, + FzName: ts + 5167, FpAppData: 0, FxOpen: 0, FxDelete: 0, @@ -62885,7 +63052,7 @@ var memdb_g MemFS var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, FmxPathname: 1024, - FzName: ts + 5173, + FzName: ts + 5187, FxOpen: 0, FxAccess: 0, FxFullPathname: 0, @@ -63052,40 +63219,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + 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 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + 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 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + 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++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -63096,7 +63308,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+5179, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+5193, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -63152,7 +63364,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*int8)(unsafe.Pointer(zName))) == '/' || int32(*(*int8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -63228,7 +63440,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+4479, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+4493, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -63349,7 +63561,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+5194, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+5208, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -63422,7 +63634,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+5217, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+5231, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -63485,6 +63697,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -64168,6 +64385,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -64200,6 +64418,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -66630,7 +66849,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+5232, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+5246, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -67767,7 +67986,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -67828,7 +68047,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+5259, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+5273, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -67841,7 +68060,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+5268, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+5282, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -67893,9 +68112,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5273, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5287, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5280, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5294, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -68159,7 +68378,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -68283,7 +68502,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -68322,7 +68541,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -68399,7 +68618,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -68526,6 +68745,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -69399,7 +69619,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, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -69584,7 +69804,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+5290, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+5304, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -70156,7 +70376,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)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -70255,7 +70475,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -70423,7 +70643,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+5308, + ts+5322, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -70841,7 +71061,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -70986,7 +71206,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+5345, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+5359, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -71116,7 +71336,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -71589,7 +71809,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -72094,7 +72314,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, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -72485,7 +72705,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5371)) +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5385)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -72750,7 +72970,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, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -72887,7 +73107,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -72904,7 +73124,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -72912,7 +73132,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -72955,7 +73175,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))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -72965,7 +73185,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -73215,7 +73435,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, 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, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -73247,8 +73467,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + 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) @@ -73263,7 +73482,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -73273,7 +73492,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -73286,7 +73505,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -73295,14 +73514,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __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, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -73312,7 +73531,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -73359,63 +73578,57 @@ __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))) + if !(nCell > 0) { + goto __18 + } + 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 i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; 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, 68453) -__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 + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*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 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -73447,10 +73660,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -73461,15 +73673,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -73494,7 +73706,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, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -73505,7 +73717,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, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -73553,26 +73765,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } 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) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } 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, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -73582,7 +73794,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { 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, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -73590,7 +73802,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -73598,10 +73810,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -73670,7 +73882,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -73700,11 +73912,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } 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)))) @@ -73715,15 +73927,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -73751,14 +73963,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } 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, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -73772,7 +73984,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -73784,7 +73996,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*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) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -73887,7 +74099,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -73915,7 +74127,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, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -73954,7 +74166,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f 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, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -73978,7 +74190,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -74027,7 +74239,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+5387) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+5401) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -74799,7 +75011,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+5396, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+5410, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -74837,7 +75049,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -75252,7 +75464,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -75278,7 +75490,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) 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, 70608) + return Xsqlite3CorruptError(tls, 71878) } 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) @@ -75286,6 +75498,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -75295,7 +75510,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, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -75311,7 +75526,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -75372,7 +75587,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, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -75407,7 +75622,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -75467,7 +75682,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -75506,7 +75721,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -75537,7 +75752,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -75878,7 +76093,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, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -76122,14 +76337,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } 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)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -76174,7 +76389,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -76223,7 +76438,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -76302,10 +76517,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -76313,7 +76526,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*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)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -76375,7 +76589,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -76395,7 +76609,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, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -76415,7 +76629,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -76627,7 +76841,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -76831,7 +77045,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -76896,7 +77110,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -76944,7 +77158,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -77063,7 +77277,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { 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 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -77223,7 +77437,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -77288,7 +77502,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -77324,7 +77538,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -77368,7 +77582,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -77480,7 +77694,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -77638,7 +77852,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, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -77695,7 +77909,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -77711,7 +77925,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -77785,7 +77999,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -77797,7 +78011,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -77808,7 +78022,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt 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 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -77973,7 +78187,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, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -78245,12 +78459,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, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -78258,7 +78472,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, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -78318,7 +78532,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, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -78407,7 +78621,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -78523,7 +78737,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -78841,7 +79055,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)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -78852,7 +79066,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -79010,7 +79224,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -79084,7 +79298,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -79146,7 +79360,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -79174,7 +79388,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -79435,7 +79649,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -79627,7 +79841,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -79664,6 +79878,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } 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))) @@ -79754,7 +79970,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -79777,7 +79993,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { 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, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -79857,7 +80073,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -79970,7 +80186,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -80031,7 +80247,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -80069,13 +80285,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -80182,7 +80398,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, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -80205,7 +80421,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, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -80306,7 +80522,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -80314,11 +80530,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } 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, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -80393,7 +80609,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } 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, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -80462,7 +80678,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -80491,7 +80707,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), 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)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -80567,7 +80783,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -80581,7 +80797,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)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -80715,7 +80931,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, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -80903,7 +81119,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+5400, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+5414, 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)) @@ -80928,11 +81144,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+5402, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+5416, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+5425, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+5439, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -80953,13 +81169,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+5450, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+5464, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+5479, + ts+5493, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -80978,7 +81194,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+5533, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+5547, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -80989,7 +81205,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+5555, libc.VaList(bp+8, iPage)) + ts+5569, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -81012,12 +81228,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+5594, + ts+5608, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 5620 + return ts + 5634 } - return ts + 5625 + return ts + 5639 }(), expected-N, expected)) } @@ -81124,13 +81340,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5646 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5660 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+5656, libc.VaList(bp, rc)) + ts+5670, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -81141,7 +81357,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+5694, libc.VaList(bp+8, rc)) + ts+5708, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -81149,14 +81365,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+5732, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+5746, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5754 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5768 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -81173,7 +81389,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5780 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5794 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -81198,7 +81414,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+5808, + checkAppendMsg(tls, pCheck, ts+5822, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -81211,7 +81427,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+5838, 0) + checkAppendMsg(tls, pCheck, ts+5852, 0) doCoverageCheck = 0 goto __10 __13: @@ -81227,7 +81443,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+5862, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+5876, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -81265,7 +81481,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+5886, 0) + checkAppendMsg(tls, pCheck, ts+5900, 0) depth = d2 __21: ; @@ -81338,7 +81554,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+5911, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+5925, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -81355,7 +81571,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+5948, + ts+5962, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -81475,7 +81691,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 6000 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 6014 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)).FzPfx = uintptr(0) @@ -81511,7 +81727,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+6016, + ts+6030, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -81521,7 +81737,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+6061, 0) + ts+6075, 0) __16: ; __10: @@ -81568,13 +81784,13 @@ __23: 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+6116, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+6130, 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+6138, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+6152, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -81809,6 +82025,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -81822,8 +82047,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -81831,7 +82056,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+4479, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+4493, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -81842,7 +82067,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+6172, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+6186, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -81857,7 +82082,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+6192, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+6206, 0) return SQLITE_ERROR } return SQLITE_OK @@ -81877,7 +82102,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+6223, 0) + pDestDb, SQLITE_ERROR, ts+6237, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -82326,7 +82551,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+6263, + Xsqlite3_str_appendf(tls, bp+16, ts+6277, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -82743,6 +82968,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -82758,7 +82996,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { 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 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -82818,6 +83056,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -82900,7 +83141,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1524 + return ts + 1544 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -83132,7 +83373,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -83364,7 +83605,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+4479, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+4493, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -83426,7 +83667,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1524 + zNeg = ts + 1544 rc = SQLITE_OK __1: @@ -83467,7 +83708,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 6270 + zNeg = ts + 6284 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -83486,7 +83727,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+6272, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+6286, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -83790,7 +84031,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, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -83805,14 +84046,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -83871,6 +84112,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { 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_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + 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)) @@ -83895,10 +84139,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -83936,21 +84180,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp 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 + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -84299,85 +84551,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0x40) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 7, 0x80) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -84477,6 +84761,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // 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) { @@ -84504,7 +84798,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -84512,12 +84806,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -84536,7 +84830,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -84587,7 +84883,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -84716,8 +85012,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added 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 @@ -84728,10 +85024,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // 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 { - 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 { @@ -84742,6 +85034,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // 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 { @@ -84757,34 +85054,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+6277, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+6291, 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 + 1524 + zColl = ts + 1544 } - if libc.Xstrcmp(tls, zColl, ts+1069) == 0 { - zColl = ts + 6282 + if libc.Xstrcmp(tls, zColl, ts+1089) == 0 { + zColl = ts + 6296 } - Xsqlite3_str_appendf(tls, bp+144, ts+6284, + Xsqlite3_str_appendf(tls, bp+144, ts+6298, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 6270 + return ts + 6284 } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 6292 + return ts + 6306 } - return ts + 1524 + return ts + 1544 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+6295, 1) + Xsqlite3_str_append(tls, bp+144, ts+6309, 1) break } @@ -84792,7 +85089,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+6297, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+6311, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -84800,32 +85097,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+6306, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+6320, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+6306, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+6320, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1304, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1324, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+6313, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+6327, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1298, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -84835,13 +85132,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { 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+1304, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1324, 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+1298, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1318, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1525 + zP4 = ts + 1545 } else { - zP4 = ts + 6316 + zP4 = ts + 6330 } break @@ -84849,7 +85146,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+6323, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+6337, libc.VaList(bp+120, pVtab)) break } @@ -84860,20 +85157,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+6331, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+6345, 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+6336, 1) + Xsqlite3_str_append(tls, bp+144, ts+6350, 1) break } case -4: { - zP4 = ts + 6338 + zP4 = ts + 6352 break } @@ -84898,7 +85195,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 6346, ts + 6348, ts + 6350, ts + 6355} +var encnames = [4]uintptr{ts + 6360, ts + 6362, ts + 6364, ts + 6369} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -85000,7 +85297,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -85349,8 +85646,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 6360, ts + 6365, ts + 6372, ts + 6375, ts + 6378, ts + 6381, ts + 6384, ts + 6387, - ts + 6395, ts + 6398, ts + 6405, ts + 6413, + ts + 6374, ts + 6379, ts + 6386, ts + 6389, ts + 6392, ts + 6395, ts + 6398, ts + 6401, + ts + 6409, ts + 6412, ts + 6419, ts + 6427, } // Close a VDBE cursor and release all the resources that cursor @@ -85559,7 +85856,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+6420, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+6434, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -85567,16 +85864,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+6432, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+6446, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+6446, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+6460, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+6461, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+6475, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -85722,7 +86019,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(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+6474, 0) + Xsqlite3VdbeError(tls, p, ts+6488, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -86002,7 +86299,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -86012,14 +86309,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(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)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -86030,16 +86329,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - 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 + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -86056,7 +86351,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -86607,16 +86902,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -86634,7 +86933,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -86664,7 +86967,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, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -86698,7 +87001,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, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -86721,7 +87024,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -86743,7 +87046,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -86887,7 +87197,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -87058,7 +87368,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -87084,7 +87394,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -87127,7 +87437,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 0, 0x3) } } @@ -87195,13 +87505,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 6504 + zContext = ts + 6518 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 6523 + zContext = ts + 6537 } else { - zContext = ts + 6542 + zContext = ts + 6556 } - zMsg = Xsqlite3_mprintf(tls, ts+6551, + zMsg = Xsqlite3_mprintf(tls, ts+6565, 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) @@ -87232,7 +87542,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -87287,7 +87597,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op 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)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -87306,7 +87616,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+6587, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+6601, 0) return 1 } else { return 0 @@ -87316,7 +87626,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+6632, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+6646, 0) return 1 } else { return vdbeSafety(tls, p) @@ -87358,14 +87668,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } 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 = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -87577,6 +87888,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -87773,7 +88088,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_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+6672, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+6686, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -87964,7 +88279,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -88039,7 +88354,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+6695) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+6709) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -88468,35 +88783,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { 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+6705, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+6719, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*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 (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -88511,7 +88825,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -88543,7 +88857,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88558,7 +88872,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88569,7 +88883,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -88579,7 +88893,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88655,7 +88969,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) 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) @@ -88799,7 +89113,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -88817,8 +89131,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -88882,7 +89199,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, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -89026,7 +89343,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, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -89198,7 +89515,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+6745, 3) + Xsqlite3_str_append(tls, bp+48, ts+6759, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -89234,11 +89551,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { 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+1525, 4) + Xsqlite3_str_append(tls, bp+48, ts+1545, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1304, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1324, 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+6263, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+6277, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -89253,21 +89570,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+6749, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+6763, 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+6756, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+6770, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+6769, 2) + Xsqlite3_str_append(tls, bp+48, ts+6783, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+6772, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+6786, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+6777, 1) + Xsqlite3_str_append(tls, bp+48, ts+6791, 1) } } } @@ -89323,7 +89640,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -89427,12 +89745,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - 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) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -89484,11 +89801,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1085, - ts + 1097, - ts + 1102, - ts + 1080, - ts + 1525, + ts + 1105, + ts + 1117, + ts + 1122, + ts + 1100, + ts + 1545, } // Execute as much of a VDBE program as we can. @@ -89526,7 +89843,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -89555,11 +89871,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -89629,42 +89948,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -89672,52 +89992,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -89759,19 +90079,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -89780,7 +90100,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -89788,11 +90108,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -90028,7 +90348,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -90523,20 +90843,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+6779, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+6793, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+6800, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+6814, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+6807, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+6821, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -90926,14 +91246,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags 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 __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -91011,72 +91331,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*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) @@ -91093,10 +91421,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -91108,33 +91436,33 @@ __43: 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 __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -91143,43 +91471,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -91195,26 +91523,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -91222,12 +91550,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -91242,17 +91570,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -91267,163 +91595,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } 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 __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -91432,20 +91760,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -91455,15 +91783,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -91471,9 +91799,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -91485,52 +91813,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&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 __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -91539,24 +91867,24 @@ __59: 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 __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*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) -__340: +__341: ; goto __8 @@ -91570,13 +91898,13 @@ __61: 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 __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -91585,38 +91913,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } 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 __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -91625,10 +91953,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -91636,10 +91964,10 @@ __65: 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 __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -91647,35 +91975,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - 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 !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: 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 __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -91683,372 +92049,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*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 __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; 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 + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -92056,15 +92423,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -92073,124 +92440,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+6831, + Xsqlite3VdbeError(tls, p, ts+6845, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -92200,40 +92567,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } 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 __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -92251,339 +92618,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: 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 __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; 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 __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -92592,20 +92959,20 @@ __76: 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 __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -92616,244 +92983,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+6872, 0) + Xsqlite3VdbeError(tls, p, ts+6886, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*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 -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+6923, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+6937, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+6945, 0) + ts+6959, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*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 -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } 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 __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } 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 __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -92862,172 +93229,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+6999, 0) + ts+7013, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*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 -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 7054 + return ts + 7068 } return func() uintptr { if iRollback != 0 { - return ts + 7102 + return ts + 7116 } - return ts + 7145 + return ts + 7159 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+7186) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+7200) 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 + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -93047,36 +93414,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -93084,22 +93451,22 @@ __82: ; 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 __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -93110,24 +93477,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -93135,30 +93502,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -93174,10 +93541,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 __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -93186,10 +93553,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -93209,83 +93576,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*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 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1544 +__601: ; 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 __593 + goto __602 } (*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 __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; 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 __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*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) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -93294,31 +93661,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*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 __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -93326,10 +93693,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -93350,105 +93717,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*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(pC5)).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 __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } 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 __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -93460,231 +93827,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*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 __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*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 __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*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 __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -93694,85 +94063,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -93780,59 +94149,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: 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)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*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(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -93847,121 +94216,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -93969,93 +94338,93 @@ __689: __107: 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)) + pC12 = *(*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 + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).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 (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, 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) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -94068,7 +94437,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -94083,81 +94452,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).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 __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - 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 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*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 __715 + goto __724 } (*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) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -94167,38 +94536,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*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 + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: 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)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -94206,205 +94575,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 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)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 3, 0x8) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*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 __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -94414,90 +94783,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*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 __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -94506,36 +94875,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, 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 (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -94546,88 +94915,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+7214) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+7228) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -94639,35 +95008,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -94676,63 +95045,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -94741,13 +95110,13 @@ __135: 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 __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -94755,20 +95124,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -94778,45 +95147,45 @@ __136: 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+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*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 __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -94829,10 +95198,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -94843,10 +95212,10 @@ __139: 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 __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -94854,30 +95223,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } 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+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __788 -__787: - zSchema = ts + 7231 + goto __797 +__796: + zSchema = ts + 7245 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+7245, + ts+7259, 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 __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -94887,36 +95256,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -94924,10 +95293,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -94959,22 +95328,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -94984,15 +95353,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -95002,17 +95371,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -95022,34 +95391,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -95058,48 +95427,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+7288, 0) + Xsqlite3VdbeError(tls, p, ts+7302, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -95107,10 +95476,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -95132,24 +95501,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -95181,78 +95550,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; 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 __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -95260,11 +95629,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -95280,14 +95649,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -95295,16 +95664,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -95312,16 +95681,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -95332,10 +95701,10 @@ __159: 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 __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -95358,73 +95727,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*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) - goto __849 -__848: + goto __858 +__857: (*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) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; 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 __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -95434,22 +95803,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -95462,32 +95831,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -95499,70 +95868,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+7325, + ts+7339, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 7377 + return ts + 7391 } - return ts + 7382 + return ts + 7396 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -95570,17 +95939,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -95590,10 +95959,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -95607,10 +95976,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -95620,69 +95989,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } 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 __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+7389, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+7403, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -95690,16 +96059,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -95712,17 +96081,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -95732,24 +96101,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = 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 __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -95757,52 +96126,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*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 __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 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+6695, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+6709, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: 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)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -95811,54 +96180,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; 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)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*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) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*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 __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -95866,69 +96235,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; 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)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule 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))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -95940,27 +96309,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; 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 __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -95968,42 +96337,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -96012,41 +96381,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*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) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -96060,16 +96429,16 @@ __182: 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 __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -96081,25 +96450,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -96108,24 +96477,24 @@ __924: })(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) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -96150,16 +96519,16 @@ __187: 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 __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -96174,66 +96543,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+7418, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+7432, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -96254,73 +96623,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+4479, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+4493, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+7424, + Xsqlite3_log(tls, rc, ts+7438, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } 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 __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -96328,13 +96697,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+6672, 0) + Xsqlite3VdbeError(tls, p, ts+6686, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1460, 0) + Xsqlite3VdbeError(tls, p, ts+1480, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -96345,10 +96714,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 7456, ts + 7465, ts + 7472, - ts + 7478} +var azType = [4]uintptr{ts + 7470, ts + 7479, ts + 7486, + ts + 7492} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -96397,16 +96770,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7490, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7504, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 7519 + return ts + 7533 } return func() uintptr { if type1 == U32(7) { - return ts + 7524 + return ts + 7538 } - return ts + 7529 + return ts + 7543 }() }())) rc = SQLITE_ERROR @@ -96426,10 +96799,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) 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+7537, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7551, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+4479, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+4493, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -96439,8 +96812,8 @@ 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 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -96460,7 +96833,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -96480,8 +96853,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -96489,21 +96862,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+7557, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+7571, 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+7587, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+7601, 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+7623, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+7637, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -96512,8 +96885,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -96546,8 +96919,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+7644, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+7658, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -96574,7 +96947,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 7665 + zFault = ts + 7679 __22: ; goto __20 @@ -96607,7 +96980,7 @@ __26: 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 + 7677 + zFault = ts + 7691 __29: ; goto __27 @@ -96627,8 +97000,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+7685, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+7699, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -96697,7 +97070,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -96725,12 +97098,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 4479 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 4493 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -96774,7 +97147,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -96857,7 +97230,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -96870,7 +97243,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -99310,11 +99683,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -99474,7 +99843,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+7719, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+7733, zDb) == 0) { goto __8 } @@ -99595,7 +99964,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+7724) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+7738) != 0) { goto __33 } goto __14 @@ -99751,14 +100120,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+7726, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+7740, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+7730, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+7744, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -99775,7 +100144,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+7734, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+7748, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -99869,7 +100238,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -99878,7 +100247,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -99933,7 +100302,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+7743, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+7757, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -99941,14 +100310,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+7774, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+7788, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) return WRC_Abort __87: ; @@ -100000,7 +100369,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+7829, libc.VaList(bp+16, zCol)) + ts+7843, 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 @@ -100037,7 +100406,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7864 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7878 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -100050,23 +100419,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 7873 + zErr = ts + 7887 } else { - zErr = ts + 7888 + zErr = ts + 7902 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7924, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+7923, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7937, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+7933, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7947, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -100169,15 +100538,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 7940 + var zIn uintptr = ts + 7954 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 7968 + zIn = ts + 7982 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 7986 + zIn = ts + 8000 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 8004 + zIn = ts + 8018 } - Xsqlite3ErrorMsg(tls, pParse, ts+8022, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+8036, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -100256,10 +100625,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 + 8042 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8056 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8047 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8061 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -100306,7 +100675,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+8053, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+8067, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -100370,7 +100739,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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+8070, libc.VaList(bp, pExpr)) + ts+8084, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -100386,7 +100755,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+8134, + Xsqlite3ErrorMsg(tls, pParse, ts+8148, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -100400,7 +100769,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+8170, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+8184, uintptr(0), pExpr) } } else { @@ -100423,30 +100792,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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+8198, libc.VaList(bp+16, pExpr)) + ts+8212, 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 + 8241 + zType = ts + 8255 } else { - zType = ts + 8248 + zType = ts + 8262 } - Xsqlite3ErrorMsg(tls, pParse, ts+8258, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8272, 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+8286, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8300, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+8308, + Xsqlite3ErrorMsg(tls, pParse, ts+8322, 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+8352, + ts+8366, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -100518,7 +100887,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+8400, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+8414, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -100534,7 +100903,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+8411, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+8425, pExpr, pExpr) } break @@ -100590,7 +100959,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -100665,7 +101034,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+8422, libc.VaList(bp, i, zType, mx)) + ts+8436, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -100685,7 +101054,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+8478, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+8492, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -100720,7 +101089,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } 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+8512, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+8526, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -100777,7 +101146,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+8518, libc.VaList(bp, i+1)) + ts+8532, libc.VaList(bp, i+1)) return 1 } } @@ -100805,7 +101174,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+8579, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+8593, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -101019,7 +101388,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+8610, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+8624, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -101059,7 +101428,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8512) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8526) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -101070,7 +101439,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+8649) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+8663) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -101082,7 +101451,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+8655, 0) + ts+8669, 0) return WRC_Abort } @@ -101182,12 +101551,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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 @@ -101223,12 +101592,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*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 + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*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)) @@ -101347,9 +101716,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { 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)) - } + 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) @@ -101437,14 +101804,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { 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) { - 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 + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 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 @@ -101772,7 +102138,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) return } @@ -101847,7 +102213,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+8714, libc.VaList(bp, mxHeight)) + ts+8728, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -102015,12 +102381,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft 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 + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } 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 + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -102091,12 +102462,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+8762, + Xsqlite3ErrorMsg(tls, pParse, ts+8776, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 8806 + return ts + 8820 } - return ts + 1524 + return ts + 1544 }(), nElem)) break } @@ -102135,7 +102506,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+8808) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+8822) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -102161,7 +102532,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u 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+8810, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+8824, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -102189,7 +102560,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD 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) { - Xsqlite3ErrorMsg(tls, pParse, ts+8844, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8858, libc.VaList(bp, pExpr)) } } } @@ -102236,7 +102607,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } 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+8864, + Xsqlite3ErrorMsg(tls, pParse, ts+8878, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -102261,7 +102632,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+8907, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+8921, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -102282,11 +102653,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - 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) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -102315,7 +102683,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // 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) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -102411,7 +102783,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -102835,7 +103207,7 @@ __2: 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+8930, + Xsqlite3ErrorMsg(tls, pParse, ts+8944, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -102958,7 +103330,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, 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+8960, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+8974, libc.VaList(bp, zObject)) } } @@ -102968,10 +103340,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { 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) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -103012,10 +103386,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+8042) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+8056) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+8047) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+8061) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -103445,13 +103819,13 @@ 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 { - if Xsqlite3StrICmp(tls, z, ts+8983) == 0 { + if Xsqlite3StrICmp(tls, z, ts+8997) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8991) == 0 { + if Xsqlite3StrICmp(tls, z, ts+9005) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+8997) == 0 { + if Xsqlite3StrICmp(tls, z, ts+9011) == 0 { return 1 } return 0 @@ -103655,7 +104029,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9001, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9015, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -103733,7 +104107,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: 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 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } 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 __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - 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 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } 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 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; 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 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+9248, + Xsqlite3ErrorMsg(tls, pParse, ts+9262, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; 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: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -105127,7 +105540,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -105141,10 +105554,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -105157,8 +105570,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -105166,12 +105579,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -105197,10 +105610,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -105211,14 +105622,16 @@ __31: __32: __33: __34: +__35: +__36: ; 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 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -105248,27 +105661,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: 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 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -105277,9 +105690,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -105287,15 +105700,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+9301, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+9315, 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 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -105326,8 +105739,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+9328, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+9342, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -105449,8 +105862,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -105471,9 +105884,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -105486,13 +105899,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+8930, + Xsqlite3ErrorMsg(tls, pParse, ts+8944, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -105503,11 +105916,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -105529,12 +105942,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -105549,14 +105962,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+7811, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+7825, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -105564,9 +106001,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -105576,15 +106013,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -105594,22 +106031,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -105618,51 +106055,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+9352, 0) + ts+9366, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -105671,18 +106108,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9402)) +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9416)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -105894,7 +106331,7 @@ __1: 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 && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).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 { @@ -106131,6 +106568,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -106355,6 +106793,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -106500,7 +106939,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, 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 int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -107027,7 +107470,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr 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)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -107045,8 +107490,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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 int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -107114,6 +107558,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -107137,7 +107583,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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) { + 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) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -107160,7 +107608,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*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 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -107173,7 +107621,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { 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) { + 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 } @@ -107193,7 +107643,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -107333,7 +107785,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { 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)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -107341,7 +107793,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { 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 + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -107392,11 +107844,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 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+9418, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9432, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -107408,13 +107860,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+9446, + ts+9460, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+9621, + ts+9635, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -107424,10 +107876,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+9795, libc.VaList(bp, zDb, zDb)) + ts+9809, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+9942, 0) + ts+9956, 0) } } @@ -107491,7 +107943,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+10093, libc.VaList(bp, zName)) + ts+10107, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -107501,7 +107953,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+10152, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+10166, zName)) { goto __6 } goto exit_rename_table @@ -107510,7 +107962,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10158, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10172, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -107551,19 +108003,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+10185, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+10199, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+10369, + ts+10383, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+10674, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+10688, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+10690, + ts+10704, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -107571,7 +108023,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+10748, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+10762, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -107583,7 +108035,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11013, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11027, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -107595,7 +108047,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+11026, + ts+11040, libc.VaList(bp, zErr, zDb, zTab)) } @@ -107641,12 +108093,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+11064, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11078, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+11096, 0) + ts+11110, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -107656,11 +108108,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+11123) + ts+11137) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+11182) + ts+11196) } if pDflt != 0 { @@ -107673,12 +108125,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+11235) + ts+11249) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11281) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11295) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -107689,7 +108141,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+11308, + ts+11322, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -107711,7 +108163,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr 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+11454, + ts+11468, libc.VaList(bp+40, zTab, zDb)) } } @@ -107759,14 +108211,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+11684, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11698, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+11718, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11732, 0) goto exit_begin_add_column __4: ; @@ -107794,7 +108246,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+11748, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+11762, 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 } @@ -107834,18 +108286,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 11767 + zType = ts + 11781 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 11772 + zType = ts + 11786 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+11786, + Xsqlite3ErrorMsg(tls, pParse, ts+11800, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 11804 + return ts + 11818 } - return ts + 11821 + return ts + 11835 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -107929,11 +108381,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+11839, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+11853, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1524, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1544, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -107946,17 +108398,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+11860, + ts+11874, 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+12042, + ts+12056, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+11013, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+11027, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -108151,7 +108603,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*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 { @@ -108214,12 +108666,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12173, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12187, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 12196 + return ts + 12210 } - return ts + 1524 + return ts + 1544 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -108259,8 +108711,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+12198, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+12212, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -108277,7 +108729,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } 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, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -108299,7 +108751,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+12206, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+12220, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -108339,12 +108791,12 @@ 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+12212, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+12226, 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 + 12196 + return ts + 12210 } - return ts + 1524 + return ts + 1544 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -108518,8 +108970,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -108602,15 +109054,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -108638,7 +109090,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -108671,13 +109123,13 @@ __15: 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)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -108690,7 +109142,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -108705,7 +109157,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -108761,8 +109213,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -108810,7 +109262,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -108830,7 +109282,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1524, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1544, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -108878,8 +109330,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -108921,11 +109373,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -108995,7 +109447,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr 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+1524, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1544, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -109018,8 +109470,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -109037,16 +109489,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - 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)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -109061,31 +109513,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).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)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -109103,8 +109555,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -109130,9 +109582,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*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 { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -109160,8 +109612,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -109198,7 +109650,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -109222,7 +109674,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+12217, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+12231, 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) @@ -109303,19 +109755,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+11839, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+11853, libc.VaList(bp, pName)) goto exit_drop_column __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+12224, + Xsqlite3ErrorMsg(tls, pParse, ts+12238, 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 + 12252 + return ts + 12266 } - return ts + 7465 + return ts + 7479 }(), zCol)) goto exit_drop_column @@ -109324,7 +109776,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+12264, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+12278, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -109338,13 +109790,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1524, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1544, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+12312, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12326, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12433, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12447, 1) 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 @@ -109462,11 +109914,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12451}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12472}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12492}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12511}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12530}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12465}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12486}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12506}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12525}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12544}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -109500,7 +109952,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+12553, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+12567, 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) } @@ -109509,10 +109961,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+12576, + ts+12590, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+12606, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+12620, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -109530,9 +109982,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 12624, FzCols: ts + 12637}, - {FzName: ts + 12650, FzCols: ts + 12663}, - {FzName: ts + 12691}, + {FzName: ts + 12638, FzCols: ts + 12651}, + {FzName: ts + 12664, FzCols: ts + 12677}, + {FzName: ts + 12705}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -109723,7 +110175,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12704} + FzName: ts + 12718} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -109974,7 +110426,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12714} + FzName: ts + 12728} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -109988,7 +110440,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+12724, + Xsqlite3_str_appendf(tls, bp+24, ts+12738, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -110001,7 +110453,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+12729, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+12743, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -110043,7 +110495,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } 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+12735, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+12749, 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)).FnChar-- @@ -110057,7 +110509,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 12741} + FzName: ts + 12755} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -110101,7 +110553,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+12750, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+12764, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -110118,7 +110570,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+12624, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+12638, 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, -6) @@ -110274,7 +110726,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12760, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12774, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -110331,7 +110783,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+12760, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12774, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -110378,9 +110830,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+12764) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+12778) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12768) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12782) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -110463,7 +110915,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1524 + z = ts + 1544 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -110485,15 +110937,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+12772, z) == 0 { + if Xsqlite3_strglob(tls, ts+12786, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+12783, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+12797, 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+12793, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+12807, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -110769,11 +111221,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12650, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12664, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+12805, - ts+12859, + ts+12819, + ts+12873, zDb) } return rc @@ -110820,10 +111272,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12624, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12638, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+12911, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+12925, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -110881,7 +111333,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+7719, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+7733, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -110911,20 +111363,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1524 + zFile = ts + 1544 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1524 + zName = ts + 1544 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+5173) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+5187) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -110940,13 +111392,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12952, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+12966, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12955, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12969, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -110960,7 +111412,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+12992, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13006, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -110971,7 +111423,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -111024,7 +111476,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13022, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13036, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -111041,7 +111493,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+13051, 0) + ts+13065, 0) rc = SQLITE_ERROR __23: ; @@ -111107,13 +111559,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1460, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1480, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13119, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+13133, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -111160,7 +111612,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1524 + zName = ts + 1544 __1: ; i = 0 @@ -111191,14 +111643,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13147, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13161, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13168, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13182, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -111206,7 +111658,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13194, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13208, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -111317,7 +111769,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 13216} + FzName: ts + 13230} // Called by the parser to compile an ATTACH statement. // @@ -111330,7 +111782,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 13230} + FzName: ts + 13244} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -111344,7 +111796,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { 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+13244, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+13258, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -111376,7 +111828,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+13268, + ts+13282, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -111551,7 +112003,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+13314, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13328, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -111577,11 +112029,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+13337, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+13351, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+13343, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+13357, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+13349, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+13363, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -111628,7 +112080,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } 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 + 8991 + zCol = ts + 9005 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -111652,7 +112104,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+13376, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13390, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -111746,6 +112198,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -111773,9 +112227,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -111794,62 +112247,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - 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) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)< 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -111896,13 +112341,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint 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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*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)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -111927,25 +112372,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+7719) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+7733) == 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+9410, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9424, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13391+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13410+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7231+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13405+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7245+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+13424) + ts+13438) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13410+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+7231) + ts+7245) } } } @@ -111966,12 +112411,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9410, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13410+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+7231) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13391+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9424, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+7245) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13405+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+13424) + ts+13438) } } } @@ -112000,9 +112445,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - 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+13443, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+13457, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -112013,21 +112458,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr 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 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 13451 + zMsg = ts + 13465 } else { - zMsg = ts + 13464 + zMsg = ts + 13478 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7923, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7937, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+7933, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7947, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -112057,12 +112502,12 @@ 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 { - if Xsqlite3_strnicmp(tls, zName, ts+9410, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7231+7) == 0 { - return ts + 13410 + if Xsqlite3_strnicmp(tls, zName, ts+9424, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7245+7) == 0 { + return ts + 13424 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13424+7) == 0 { - return ts + 13391 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13438+7) == 0 { + return ts + 13405 } } return zName @@ -112167,10 +112612,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { 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{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*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 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -112326,11 +112771,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(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))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -112347,7 +112792,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { 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) { + if (*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)) @@ -112376,7 +112821,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -112420,7 +112865,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+7231) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+7245) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -112446,7 +112891,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+7719, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+7733, zName) { goto __3 } @@ -112499,13 +112944,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+13478, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13492, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13495, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+13509, libc.VaList(bp, pName1)) return -1 } } else { @@ -112543,13 +112988,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType 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+1524, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1544, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+9410, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+9424, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13515, + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -112709,9 +113154,9 @@ 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 + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -112727,7 +113172,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+13557, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13571, 0) return __4: ; @@ -112755,9 +113200,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 11767 + return ts + 11781 } - return ts + 10152 + return ts + 10166 }(), zName) != 0) { goto __8 } @@ -112773,9 +113218,9 @@ __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 + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -112806,12 +113251,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13598, + Xsqlite3ErrorMsg(tls, pParse, ts+13612, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 11767 + return ts + 11781 } - return ts + 10152 + return ts + 10166 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -112826,7 +113271,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13619, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13633, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -112861,8 +113306,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - 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)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, 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) @@ -112883,7 +113328,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -112913,7 +113358,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+13654, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+13668, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -112937,7 +113382,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13671, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13685, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -112946,7 +113391,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -112957,7 +113402,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13654 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13668 (*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) @@ -112969,7 +113414,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*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+13654, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+13668, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -113003,7 +113448,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+13705, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13719, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -113011,13 +113456,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } 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+13728, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+13742, 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)).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+13735, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+13749, 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)).Fn-- @@ -113054,7 +113499,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+13745, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+13759, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -113218,10 +113663,10 @@ 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+13771, + Xsqlite3ErrorMsg(tls, pParse, ts+13785, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13816, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13830, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -113252,7 +113697,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13857, 0) + ts+13871, 0) } } @@ -113297,7 +113742,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+13909, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+13923, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -113386,7 +113831,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+13950, 0) + ts+13964, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -113412,7 +113857,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(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) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } @@ -113481,7 +113926,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+14006, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14020, 0) goto generated_done __2: ; @@ -113494,13 +113939,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14049, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14063, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14057, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14071, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -113533,7 +113978,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+14064, + Xsqlite3ErrorMsg(tls, pParse, ts+14078, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -113654,13 +114099,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1524 - zSep2 = ts + 14095 - zEnd = ts + 6295 + zSep = ts + 1544 + zSep2 = ts + 14109 + zEnd = ts + 6309 } else { - zSep = ts + 14097 - zSep2 = ts + 14101 - zEnd = ts + 14106 + zSep = ts + 14111 + zSep2 = ts + 14115 + zEnd = ts + 14120 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -113668,7 +114113,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+14109, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+14123, 0) *(*int32)(unsafe.Pointer(bp + 8)) = 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)), 1)))) = int8('(') @@ -113702,16 +114147,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+4479, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+4493, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1524, - ts + 14123, - ts + 14129, - ts + 14134, - ts + 14139, + ts + 1544, + ts + 14137, + ts + 14143, + ts + 14148, + ts + 14153, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -113850,8 +114295,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -113978,7 +114423,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -114002,7 +114447,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -114101,7 +114546,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr 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+1524, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1544, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -114118,10 +114563,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+14145, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1524))) + ts+14159, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1544))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+14178, + Xsqlite3ErrorMsg(tls, pParse, ts+14192, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -114140,11 +114585,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+14205, 0) + ts+14219, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14255, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14269, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -114178,7 +114623,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14287, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14301, 0) return } } @@ -114203,11 +114648,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 10152 - zType2 = ts + 14331 + zType = ts + 10166 + zType2 = ts + 14345 } else { - zType = ts + 11767 - zType2 = ts + 14337 + zType = ts + 11781 + zType2 = ts + 14351 } if pSelect != 0 { @@ -114269,7 +114714,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -114278,11 +114723,11 @@ 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+14342, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+14356, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+14357, + ts+14371, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -114298,13 +114743,13 @@ 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+14455, + ts+14469, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14497, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14511, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -114319,7 +114764,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+10674) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+10688) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -114349,7 +114794,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+14531, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14545, 0) goto create_view_fail __1: ; @@ -114365,7 +114810,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+11767, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+11781, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -114428,10 +114873,7 @@ __10: 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 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -114449,12 +114891,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14567, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14581, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -114514,6 +114952,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -114573,13 +115018,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+14597, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14611, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+14612, + ts+14626, 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) } @@ -114620,10 +115065,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint 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++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14679, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14693, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+12576, + ts+12590, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -114655,12 +115100,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+14693, + ts+14707, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+14738, + ts+14752, 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) @@ -114688,11 +115133,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14805, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14819, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+8411, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+8425, 10) == 0 { return 0 } return 1 @@ -114770,9 +115215,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -114831,21 +115276,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+14810, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14824, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+14838, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14852, 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+14872, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14886, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -114857,7 +115302,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+12768, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+12782, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -114921,7 +115366,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+14904, + ts+14918, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -114933,7 +115378,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14967, 0) + ts+14981, 0) goto fk_end goto __7 __6: @@ -115018,7 +115463,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+15061, + ts+15075, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -115245,12 +115690,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+15107, + Xsqlite3ErrorMsg(tls, pParse, ts+15121, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 15135 + return ts + 15149 } - return ts + 15141 + return ts + 15155 }())) return 1 } @@ -115371,7 +115816,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15146, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15160, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -115390,7 +115835,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+15152, + ts+15166, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -115416,26 +115861,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+15202, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15216, 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+15230, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15244, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+15255, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15269, 0) goto exit_create_index __17: ; @@ -115449,7 +115894,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15146, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15160, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -115461,10 +115906,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+15289, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15303, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -115476,7 +115921,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+15323, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15337, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -115505,7 +115950,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+15347, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+15361, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -115526,9 +115971,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -115567,7 +116012,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15146) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15160) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -115668,7 +116113,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+15370, 0) + ts+15384, 0) goto exit_create_index __56: ; @@ -115682,6 +116127,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -115702,6 +116148,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 11, 0x800) __61: ; __59: @@ -115883,7 +116330,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+15431, libc.VaList(bp+48, 0)) + ts+15445, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -115935,8 +116382,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+15473, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+15487, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -115982,12 +116429,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+15490, + zStmt = Xsqlite3MPrintf(tls, db, ts+15504, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1524 + return ts + 1544 } - return ts + 15510 + return ts + 15524 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -115995,7 +116442,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+15518, + ts+15532, 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, @@ -116009,7 +116456,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+15577, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+15591, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -116170,7 +116617,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+15604, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+15618, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -116185,7 +116632,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+15622, libc.VaList(bp+8, 0)) + ts+15636, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -116196,9 +116643,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -116224,9 +116671,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+15695, + ts+15709, 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+12764, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+12778, (*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) @@ -116307,6 +116754,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -116314,7 +116762,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -116360,7 +116808,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+15755, + Xsqlite3ErrorMsg(tls, pParse, ts+15769, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -116495,6 +116943,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -116506,11 +116955,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(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 + 88))) @@ -116537,7 +116988,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -116565,12 +117016,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+15791, + Xsqlite3ErrorMsg(tls, pParse, ts+15805, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 15827 + return ts + 15841 } - return ts + 15830 + return ts + 15844 }())) goto append_from_error __1: @@ -116739,7 +117190,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15836, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15850, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -116775,9 +117226,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 15842 + return ts + 15856 } - return ts + 15851 + return ts + 15865 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -116802,7 +117253,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 15836, ts + 15858, ts + 15842} +var az = [3]uintptr{ts + 15850, ts + 15872, ts + 15856} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -116817,7 +117268,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+15866, 0) + ts+15880, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -116835,7 +117286,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13351, 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+15950, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15964, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -117121,7 +117572,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+15959, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15973, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -117217,7 +117668,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+16005, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16019, libc.VaList(bp, zName)) } } } @@ -117317,7 +117768,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -117331,7 +117782,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*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) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -117410,7 +117861,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+16035, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16049, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -117537,7 +117988,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -117571,7 +118022,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, 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) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -117594,26 +118045,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*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) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -117679,10 +118131,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+16080, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -117695,19 +118163,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { 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; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+16066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16113, 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+16095, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16142, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -117934,17 +118404,19 @@ __18: 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 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -117957,10 +118429,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -117969,15 +118441,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } 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: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -117986,98 +118458,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } 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: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; 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 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -118085,138 +118557,143 @@ __34: 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: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16133) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16180) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -118319,7 +118796,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+12624) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12638) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -118549,7 +119026,7 @@ 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 + 7529, ts + 7524, ts + 9283, ts + 9278, ts + 7519} +var azType2 = [5]uintptr{ts + 7543, ts + 7538, ts + 9297, ts + 9292, ts + 7533} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -118608,7 +119085,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+16146, -1) + Xsqlite3_result_error(tls, context, ts+16193, -1) return } iVal = -iVal @@ -118912,7 +119389,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+16163, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+16210, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -119102,7 +119579,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -119215,13 +119692,27 @@ 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 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // 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 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -119244,7 +119735,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+16168, -1) + Xsqlite3_result_error(tls, context, ts+16215, -1) return } if argc == 3 { @@ -119254,7 +119745,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+16201, -1) + ts+16248, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -119307,7 +119798,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+4479, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+4493, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -119347,13 +119838,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+6263, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+6277, 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+16246, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+16293, libc.VaList(bp+8, r1)) } } break @@ -119361,7 +119852,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1304, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1324, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -119390,13 +119881,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+16253, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+16300, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1525, 4) + Xsqlite3_str_append(tls, pStr, ts+1545, 4) break } @@ -119706,7 +120197,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 12196} +var azOne = [1]uintptr{ts + 12210} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -119718,7 +120209,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1524 + zIn = ts + 1544 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -119742,7 +120233,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+16256, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+16303, 4, uintptr(0)) } } @@ -119767,7 +120258,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+13376, -1) + Xsqlite3_result_error(tls, context, ts+13390, -1) return } @@ -119845,7 +120336,7 @@ func sumFinalize(tls *libc.TLS, context 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+16146, -1) + Xsqlite3_result_error(tls, context, ts+16193, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -120107,7 +120598,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // 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) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+16261, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+16308, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -120127,14 +120618,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+16267, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+16314, 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+16267, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+16314, 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+16267, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16267, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16314, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16314, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -120374,107 +120865,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {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 + 16272}, - {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 + 16292}, - {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 + 16305}, - {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 + 16323}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16332}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16340}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16340}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16355}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16381}, - {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 + 16406}, - {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 + 16415}, - {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 + 16426}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 16433}, - {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 + 16447}, - {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 + 16447}, - {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 + 16453}, - {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 + 16453}, - {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 + 16459}, - {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 + 16459}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16464}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16464}, - {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 + 16464}, - {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 + 16468}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16468}, - {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 + 16468}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16479}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16487}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16494}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16500}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16507}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16514}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16522}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16527}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16531}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16531}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16543}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16549}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16553}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16560}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16567}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16578}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16585}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16600}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16617}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16628}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16634}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16652}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16660}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16674}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16682}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16691}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16691}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16698}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16698}, - {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 + 16708}, - {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 + 16712}, - {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 + 16718}, - {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 + 16722}, - {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 + 16722}, - {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 + 16728}, - {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 + 16728}, - {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 + 16741}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16267}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16267}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7864}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7864}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16746}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16751}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16759}, - {FnArg: int8(1), 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 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16771}, - {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 + 16774}, - {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 + 16778}, - {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 + 16784}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16774}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16789}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16793}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16797}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16803}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16807}, + {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 + 16319}, + {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 + 16339}, + {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 + 16352}, + {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 + 16370}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16379}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16387}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16402}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16428}, + {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 + 16453}, + {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 + 16462}, + {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 + 16473}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 16480}, + {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 + 16494}, + {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 + 16494}, + {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 + 16500}, + {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 + 16500}, + {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 + 16506}, + {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 + 16506}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16511}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16511}, + {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 + 16511}, + {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 + 16515}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16515}, + {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 + 16515}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16519}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16534}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16541}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16547}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16554}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16561}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16569}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16574}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16578}, + {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 + 16584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16590}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16596}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16600}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16607}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16614}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16625}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16632}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16647}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16664}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16675}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16681}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16699}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16707}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16721}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16729}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16738}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16738}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16745}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16745}, + {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 + 16755}, + {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 + 16759}, + {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 + 16765}, + {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 + 16769}, + {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 + 16769}, + {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 + 16775}, + {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 + 16775}, + {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 + 16788}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16314}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16314}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7878}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 7878}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16793}, + {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 + 16806}, {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(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16822}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16828}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16832}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16818}, + {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 + 16821}, + {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 + 16825}, + {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 + 16831}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16821}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16836}, - {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 + 16845}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16850}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16855}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16861}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16867}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16873}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16878}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16886}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16894}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16897}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 7864}, - {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 + 16902}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16840}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16844}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16850}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16854}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16859}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16864}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16869}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16875}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16879}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16883}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16887}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16892}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16897}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16908}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16914}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16920}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16925}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16933}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16941}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16944}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 7878}, + {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 + 16949}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -120595,7 +121086,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+16906, + ts+16953, 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) @@ -121255,8 +121746,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 7730, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 7726, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 7744, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 7740, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -121335,7 +121826,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+6474) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+6488) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } @@ -121438,7 +121929,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*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 { @@ -121546,6 +122037,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + 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 { + *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -121586,13 +122098,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*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) @@ -121604,21 +122115,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } 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)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) 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 { - *(*int8)(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(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -121689,7 +122190,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in 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) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -121747,7 +122248,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9248, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9262, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -122050,6 +122551,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -122213,7 +122716,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+16951, + ts+16998, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -122238,7 +122741,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16992, + Xsqlite3ErrorMsg(tls, pParse, ts+17039, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -122387,7 +122890,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+17024, + ts+17071, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -122397,7 +122900,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+17076, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+17123, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -122449,7 +122952,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+17101, + Xsqlite3ErrorMsg(tls, pParse, ts+17148, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -122457,7 +122960,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+17147, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17194, 0) goto insert_cleanup __57: ; @@ -122639,7 +123142,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -122654,137 +123170,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; 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: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; 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: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: 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 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -122796,64 +123312,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17168) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17215) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -122861,7 +123381,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -123164,7 +123688,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13351, 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) @@ -124255,13 +124779,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1524 + zSql = ts + 1544 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -124700,6 +125224,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -124738,7 +125263,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13376, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13390, 0) __3: ; return SQLITE_ERROR @@ -124747,7 +125272,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 17182 + zEntry = ts + 17229 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -124762,7 +125287,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+13337, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+13351, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -124798,7 +125323,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+17205, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+17252, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/' || int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '\\')) { @@ -124812,7 +125337,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17214, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17261, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -124836,7 +125361,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17218, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17265, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -124854,7 +125379,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+17224, libc.VaList(bp+16, zEntry, zFile)) + ts+17271, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -124881,7 +125406,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17267, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17314, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -124919,7 +125444,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+17299, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+17346, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -124929,7 +125454,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 17336, + ts + 17383, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -125085,7 +125610,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { 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+17340, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+17387, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -125093,63 +125618,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 6395, - ts + 17379, - ts + 10152, - ts + 17383, - ts + 17388, - ts + 17391, - ts + 17401, - ts + 17411, - ts + 17417, - ts + 17421, + ts + 6409, ts + 17426, - ts + 17431, - ts + 17439, - ts + 17450, - ts + 17453, - ts + 17460, - ts + 17421, - ts + 17426, - ts + 17467, - ts + 17472, - ts + 17475, - ts + 17482, - ts + 17417, - ts + 17421, - ts + 17488, - ts + 17493, - ts + 17498, - ts + 17421, - ts + 17502, - ts + 17426, - ts + 17510, + ts + 10166, + ts + 17430, + ts + 17435, + ts + 17438, + ts + 17448, + ts + 17458, + ts + 17464, + ts + 17468, + ts + 17473, + ts + 17478, + ts + 17486, + ts + 17497, + ts + 17500, + ts + 17507, + ts + 17468, + ts + 17473, ts + 17514, ts + 17519, - ts + 12768, - ts + 12764, - ts + 17525, - ts + 17530, + ts + 17522, + ts + 17529, + ts + 17464, + ts + 17468, ts + 17535, - ts + 17379, - ts + 17421, ts + 17540, - ts + 17547, - ts + 17554, - ts + 10152, - ts + 17562, - ts + 6398, - ts + 17568, - ts + 17379, - ts + 17421, - ts + 17573, - ts + 17578, - ts + 16774, - ts + 17583, - ts + 17596, - ts + 17605, - ts + 17612, - ts + 17623, + ts + 17545, + ts + 17468, + ts + 17549, + ts + 17473, + ts + 17557, + ts + 17561, + ts + 17566, + ts + 12782, + ts + 12778, + ts + 17572, + ts + 17577, + ts + 17582, + ts + 17426, + ts + 17468, + ts + 17587, + ts + 17594, + ts + 17601, + ts + 10166, + ts + 17609, + ts + 6412, + ts + 17615, + ts + 17426, + ts + 17468, + ts + 17620, + ts + 17625, + ts + 16821, + ts + 17630, + ts + 17643, + ts + 17652, + ts + 17659, + ts + 17670, } // Definitions of all built-in pragmas @@ -125167,241 +125692,241 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [67]PragmaName{ - {FzName: ts + 17631, + {FzName: ts + 17678, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17646, + {FzName: ts + 17693, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 17661, + {FzName: ts + 17708, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17673, + {FzName: ts + 17720, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 17689, + {FzName: ts + 17736, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 17612, + {FzName: ts + 17659, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17702, + {FzName: ts + 17749, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17714, + {FzName: ts + 17761, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17734, + {FzName: ts + 17781, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 17750, + {FzName: ts + 17797, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 17771, + {FzName: ts + 17818, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 17786, + {FzName: ts + 17833, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17802, + {FzName: ts + 17849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 17816, + {FzName: ts + 17863, FePragTyp: U8(PragTyp_DATA_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17837, + {FzName: ts + 17884, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 17850, + {FzName: ts + 17897, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 17864, + {FzName: ts + 17911, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 17883, + {FzName: ts + 17930, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 17902, + {FzName: ts + 17949, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 17925, + {FzName: ts + 17972, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17934, + {FzName: ts + 17981, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 17952, + {FzName: ts + 17999, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 17969, + {FzName: ts + 18016, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 17982, + {FzName: ts + 18029, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 17997, + {FzName: ts + 18044, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 18015, + {FzName: ts + 18062, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 18025, + {FzName: ts + 18072, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 18039, + {FzName: ts + 18086, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18055, + {FzName: ts + 18102, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 18080, + {FzName: ts + 18127, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 18099, + {FzName: ts + 18146, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 18110, + {FzName: ts + 18157, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 18121, + {FzName: ts + 18168, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 18133, + {FzName: ts + 18180, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 18149, + {FzName: ts + 18196, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18162, + {FzName: ts + 18209, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18181, + {FzName: ts + 18228, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 18200, + {FzName: ts + 18247, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18213, + {FzName: ts + 18260, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18228, + {FzName: ts + 18275, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 18238, + {FzName: ts + 18285, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 18250, + {FzName: ts + 18297, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 18259, + {FzName: ts + 18306, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 18270, + {FzName: ts + 18317, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 18280, + {FzName: ts + 18327, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 18292, + {FzName: ts + 18339, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 18303, + {FzName: ts + 18350, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 18315, + {FzName: ts + 18362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 18332, + {FzName: ts + 18379, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 18351, + {FzName: ts + 18398, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 18377, + {FzName: ts + 18424, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 18392, + {FzName: ts + 18439, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18406, + {FzName: ts + 18453, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 18425, + {FzName: ts + 18472, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 18439, + {FzName: ts + 18486, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18455, + {FzName: ts + 18502, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 18467, + {FzName: ts + 18514, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 18478, + {FzName: ts + 18525, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 18489, + {FzName: ts + 18536, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 18501, + {FzName: ts + 18548, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 18512, + {FzName: ts + 18559, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 18533, + {FzName: ts + 18580, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 18541, + {FzName: ts + 18588, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 18556, + {FzName: ts + 18603, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 18569, + {FzName: ts + 18616, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 18588, + {FzName: ts + 18635, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 18603, + {FzName: ts + 18650, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -125423,7 +125948,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 18619)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 18666)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -125435,10 +125960,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+5003) { + if 0 == Xsqlite3StrICmp(tls, z, ts+5017) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+18644) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18691) { return PAGER_LOCKINGMODE_NORMAL } } @@ -125447,13 +125972,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+9296) { + if 0 == Xsqlite3StrICmp(tls, z, ts+9310) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+18651) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18698) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+18656) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18703) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -125468,9 +125993,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { 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+17573) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17620) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+18668) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+18715) == 0 { return 2 } else { return 0 @@ -125484,7 +126009,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { 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+18675, 0) + ts+18722, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -125575,19 +126100,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 18737 + zName = ts + 18784 break case OE_SetDflt: - zName = ts + 18746 + zName = ts + 18793 break case OE_Cascade: - zName = ts + 18758 + zName = ts + 18805 break case OE_Restrict: - zName = ts + 18766 + zName = ts + 18813 break default: - zName = ts + 18775 + zName = ts + 18822 break } return zName @@ -125604,7 +126129,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 18785, ts + 18792, ts + 18800, ts + 18804, ts + 18668, ts + 18813, + ts + 18832, ts + 18839, ts + 18847, ts + 18851, ts + 18715, ts + 18860, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -125651,13 +126176,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 18817 + zType = ts + 18864 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 18819 + zType = ts + 18866 } else { - zType = ts + 8806 + zType = ts + 8820 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18821, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18868, 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), @@ -125665,7 +126190,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 18828, ts + 18833, ts + 18841} +var azEnc = [4]uintptr{uintptr(0), ts + 18875, ts + 18880, ts + 18888} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -125690,8 +126215,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // 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) { - bp := tls.Alloc(624) - defer tls.Free(624) + bp := tls.Alloc(680) + defer tls.Free(680) var zLeft uintptr var zRight uintptr @@ -125798,13 +126323,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -125824,6 +126358,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -125874,7 +126410,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+448) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+488) if !(iDb < 0) { goto __2 } @@ -125889,7 +126425,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 448))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 488))) if !!(zLeft != 0) { goto __4 } @@ -125899,7 +126435,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+18849, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+18896, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -125916,30 +126452,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 456 + 1*8)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 456 + 2*8)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 456 + 3*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 496)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 496 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 496 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 496 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+456) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+496) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 456)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 456))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 456))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 496)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 496))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 496))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 456)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 496)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+4479, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 456))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 496)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 496))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -126163,7 +126699,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+18853) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+18900) == 0) { goto __65 } b = 2 @@ -126197,7 +126733,7 @@ __67: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { @@ -126206,36 +126742,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __72 __71: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+488) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+528) == 0) { goto __73 } - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(0)) { goto __75 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0) goto __76 __75: - if !(*(*I64)(unsafe.Pointer(bp + 488)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 528)) > int64(0xfffffffe)) { goto __77 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0xfffffffe) __77: ; __76: ; goto __74 __73: - *(*I64)(unsafe.Pointer(bp + 488)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(0) __74: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 488)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 528)))) __72: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 18644 + zRet = ts + 18691 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -126273,7 +126809,7 @@ __79: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } - zRet = ts + 5003 + zRet = ts + 5017 __84: ; returnSingleText(tls, v, zRet) @@ -126354,21 +126890,21 @@ __96: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 496)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 536)) = int64(-2) if !(zRight != 0) { goto __98 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+496) - if !(*(*I64)(unsafe.Pointer(bp + 496)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+536) + if !(*(*I64)(unsafe.Pointer(bp + 536)) < int64(-1)) { goto __99 } - *(*I64)(unsafe.Pointer(bp + 496)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 536)) = int64(-1) __99: ; __98: ; - *(*I64)(unsafe.Pointer(bp + 496)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 496))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 496))) + *(*I64)(unsafe.Pointer(bp + 536)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 536))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 536))) goto __15 __23: @@ -126410,15 +126946,15 @@ __101: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 504)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+504) != 0) || *(*int32)(unsafe.Pointer(bp + 504)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 544)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+544) != 0) || *(*int32)(unsafe.Pointer(bp + 544)) <= 0) { goto __104 } - *(*int32)(unsafe.Pointer(bp + 504)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 544)) = 0x7fffffff __104: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 504)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 544)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -126455,14 +126991,14 @@ __26: }()) goto __108 __107: - *(*int32)(unsafe.Pointer(bp + 508)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+508) != 0) { + *(*int32)(unsafe.Pointer(bp + 548)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+548) != 0) { goto __109 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 508))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 548))) __109: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 508)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 548)) != 0))) != 0) { goto __110 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -126481,17 +127017,17 @@ __27: if !(zRight != 0) { goto __112 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+512) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+552) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) < int64(0)) { goto __113 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) = Xsqlite3Config.FszMmap __113: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __114 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) __114: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -126502,7 +127038,7 @@ __115: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __118 } - Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 552))) __118: ; goto __116 @@ -126514,12 +127050,12 @@ __117: ; __112: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+512) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 552)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+552) if !(rc == SQLITE_OK) { goto __119 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 552))) goto __120 __119: if !(rc != SQLITE_NOTFOUND) { @@ -126556,11 +127092,11 @@ __124: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __126 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+520) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 520)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+560) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 560)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+18858, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18905, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __127: @@ -126579,7 +127115,7 @@ __128: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __129 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+16, zRight)) goto __130 __129: Xsqlite3_temp_directory = uintptr(0) @@ -126601,11 +127137,11 @@ __131: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __133 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+524) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 524)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+564) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 564)) == 0) { goto __134 } - Xsqlite3ErrorMsg(tls, pParse, ts+18858, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18905, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __134: @@ -126616,7 +127152,7 @@ __133: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __135 } - Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+24, zRight)) + Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, zRight)) goto __136 __135: Xsqlite3_data_directory = uintptr(0) @@ -126638,7 +127174,7 @@ __137: goto __139 } Xsqlite3ErrorMsg(tls, pParse, - ts+18883, 0) + ts+18930, 0) goto __140 __139: if !(iDb != 1) { @@ -126692,7 +127228,7 @@ __146: __148: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+18936) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+18983) == 0) { goto __149 } @@ -126789,13 +127325,13 @@ __162: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 18942 + return ts + 18989 } - return ts + 18950 + return ts + 18997 }(), libc.VaList(bp+32, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1524), + Xsqlite3ColumnType(tls, pCol, ts+1544), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 @@ -126860,20 +127396,20 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __178 } - zSql = Xsqlite3MPrintf(tls, db, ts+18957, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+19004, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __179 } - *(*uintptr)(unsafe.Pointer(bp + 528)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+528, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 528))) + *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+568, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 568))) Xsqlite3DbFree(tls, db, zSql) __179: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __180 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1460, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1480, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __180: ; @@ -126906,29 +127442,29 @@ __184: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __185 } - zType = ts + 11767 + zType = ts + 11781 goto __186 __185: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __187 } - zType = ts + 14049 + zType = ts + 14063 goto __188 __187: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __189 } - zType = ts + 18973 + zType = ts + 19020 goto __190 __189: - zType = ts + 10152 + zType = ts + 10166 __190: ; __188: ; __186: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18980, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19027, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -126994,7 +127530,7 @@ __197: goto __199 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18987, libc.VaList(bp+144, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19034, libc.VaList(bp+144, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -127004,7 +127540,7 @@ __197: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __200 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18992, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+19039, 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)))) @@ -127041,12 +127577,12 @@ __203: if !(pIdx1 != 0) { goto __205 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536)) = [3]uintptr{ts + 18997, ts + 18999, ts + 17450} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19001, + *(*[3]uintptr)(unsafe.Pointer(bp + 576)) = [3]uintptr{ts + 19044, ts + 19046, ts + 17497} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19048, libc.VaList(bp+192, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 536 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 576 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __204 __204: @@ -127075,7 +127611,7 @@ __206: goto __207 __209: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19007, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19054, 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))) @@ -127091,13 +127627,13 @@ __208: __38: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __210: if !(p != 0) { goto __212 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19011, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19058, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __211 __211: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -127136,7 +127672,7 @@ __214: goto __215 __215: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __219: if !(j != 0) { goto __221 @@ -127155,13 +127691,13 @@ __221: __40: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __222: if !(j1 != 0) { goto __224 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8806, libc.VaList(bp+272, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8820, libc.VaList(bp+272, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __223 __223: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -127177,7 +127713,7 @@ __225: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __227 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8806, libc.VaList(bp+280, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8820, libc.VaList(bp+280, aPragmaName[i6].FzName)) goto __226 __226: i6++ @@ -127212,7 +127748,7 @@ __233: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __235 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19014, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+19061, libc.VaList(bp+288, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -127220,7 +127756,7 @@ __233: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+19023)) + ts+19070)) goto __234 __234: j2++ @@ -127293,20 +127829,20 @@ __242: goto __243 __245: ; - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = 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+560, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, uintptr(0)) if !(x1 == 0) { goto __246 } - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) == uintptr(0)) { goto __248 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __249 __248: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 560))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 600))) __249: ; goto __247 @@ -127344,12 +127880,12 @@ __252: goto __254 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 568)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 608)) = uintptr(0) if !(pParent != 0) { goto __255 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+560, bp+568) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+600, bp+608) __255: ; @@ -127366,8 +127902,8 @@ __257: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __259 } - if *(*uintptr)(unsafe.Pointer(bp + 568)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 568)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 608)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 608)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -127380,11 +127916,11 @@ __258: goto __259 __259: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 560)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 600)) != 0) { goto __260 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __261 @@ -127409,10 +127945,10 @@ __263: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __264: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+19028, libc.VaList(bp+352, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+19075, 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))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 608))) goto __253 __253: i8++ @@ -127450,17 +127986,17 @@ __266: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __267 } - if !(Xsqlite3GetInt32(tls, zRight, bp+576) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+616) != 0) { goto __268 } - if !(*(*int32)(unsafe.Pointer(bp + 576)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 616)) <= 0) { goto __270 } - *(*int32)(unsafe.Pointer(bp + 576)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 616)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __270: ; goto __269 @@ -127476,7 +128012,7 @@ __269: ; __267: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 576))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 616))-1, 1) i9 = 0 __271: @@ -127626,7 +128162,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+19032, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+19079, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -127653,178 +128189,307 @@ __300: goto __298 __301: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __302 } + pPk1 = uintptr(0) + r2 = 0 + goto __303 +__302: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__303: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+580, bp+584) + 1, uintptr(0), bp+620, bp+624) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__302: +__304: if !(pIdx5 != 0) { - goto __304 + goto __306 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __303 -__303: + goto __305 +__305: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __302 goto __304 -__304: + goto __306 +__306: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 580)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 620)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__307: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __308 + } + mxCol-- + goto __307 +__308: + ; + if !(mxCol >= 0) { + goto __309 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__309: + ; if !!(isQuick != 0) { - goto __305 + goto __310 } + if !(pPk1 != 0) { + goto __311 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 620)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 580)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__305: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+19103, + libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__312: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __314 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 620)), j4, r2+j4) + goto __313 +__313: + j4++ + goto __312 + goto __314 +__314: + ; +__311: + ; +__310: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__306: +__315: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __308 + goto __317 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __309 + goto __318 } - goto __307 -__309: + goto __316 +__318: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __310 + if !(bStrict != 0) { + goto __319 } - goto __307 -__310: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) + goto __320 +__319: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__320: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __321 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 580)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __311 + goto __316 +__321: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __322 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__311: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) + p11 = -1 + p3 = 3 + goto __323 +__322: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __324 + } + *(*uintptr)(unsafe.Pointer(bp + 632)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+632) + if !(*(*uintptr)(unsafe.Pointer(bp + 632)) != 0) { + goto __325 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) +__325: + ; +__324: ; + p11 = *(*int32)(unsafe.Pointer(bp + 620)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __326 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __327 +__326: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__327: + ; +__323: + ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __312 + goto __328 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+19056, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19139, libc.VaList(bp+384, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __313 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __329 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __314 -__313: - integrityCheckResultRow(tls, v) -__314: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__312: + goto __330 +__329: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __315 +__330: + ; +__328: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __331 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) - zErr = Xsqlite3MPrintf(tls, db, ts+19076, - libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19159, + libc.VaList(bp+400, 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, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__315: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __332 +__331: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __333 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19181, + libc.VaList(bp+424, (*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, zErr1, -6) + goto __334 +__333: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __335 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __336 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 620)), j4, 3) +__336: ; - goto __307 -__307: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+19204, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+19206, + libc.VaList(bp+440, (*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, zErr1, -6) +__335: + ; +__334: + ; +__332: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __316 +__316: j4++ - goto __306 - goto __308 -__308: + goto __315 + goto __317 +__317: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __316 + goto __337 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __317 + goto __338 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 580)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 620)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__318: +__339: if !(k3 > 0) { - goto __320 + goto __341 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __319 -__319: + goto __340 +__340: k3-- - goto __318 - goto __320 -__320: + goto __339 + goto __341 +__341: ; 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+19098, - libc.VaList(bp+416, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+19226, + libc.VaList(bp+456, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__317: +__338: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__316: +__337: ; if !!(isQuick != 0) { - goto __321 + goto __342 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__322: +__343: if !(pIdx5 != 0) { - goto __324 + goto __345 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __325 + goto __346 } - goto __323 -__325: + goto __344 +__346: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 580)), 0, 0, bp+588, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 620)), 0, 0, bp+640, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 624))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+19128) + Xsqlite3VdbeLoadString(tls, v, 3, ts+19256) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+19133) + Xsqlite3VdbeLoadString(tls, v, 4, ts+19261) 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) @@ -127832,87 +128497,93 @@ __325: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __326 + goto __347 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__327: +__348: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __329 + goto __350 } 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 __330 + goto __351 } - goto __328 -__330: + goto __349 +__351: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __328 -__328: + goto __349 +__349: kk++ - goto __327 - goto __329 -__329: + goto __348 + goto __350 +__350: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 584))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 624))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 624))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+19154) + Xsqlite3VdbeLoadString(tls, v, 3, ts+19282) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__326: +__347: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 588))) - goto __323 -__323: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 640))) + goto __344 +__344: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __322 - goto __324 -__324: + goto __343 + goto __345 +__345: ; -__321: +__342: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 580)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 620)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __331 + goto __352 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+19181) + Xsqlite3VdbeLoadString(tls, v, 2, ts+19309) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__332: +__353: if !(pIdx5 != 0) { - goto __334 + goto __355 } if !(pPk1 == pIdx5) { - goto __335 + goto __356 } - goto __333 -__335: + goto __354 +__356: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 584))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 624))+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 __333 -__333: + goto __354 +__354: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __332 - goto __334 -__334: + goto __353 + goto __355 +__355: ; -__331: + if !(pPk1 != 0) { + goto __357 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__357: + ; +__352: ; goto __298 __298: @@ -127930,14 +128601,14 @@ __273: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __336 + goto __358 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 616)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19210 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19338 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__336: +__358: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -127945,27 +128616,27 @@ __336: __46: if !!(zRight != 0) { - goto __337 + goto __359 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __339 + goto __361 } goto pragma_out -__339: +__361: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __338 -__337: + goto __360 +__359: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __340 + goto __362 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__341: +__363: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __343 + goto __365 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __344 + goto __366 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -127974,25 +128645,25 @@ __341: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __343 -__344: + goto __365 +__366: ; - goto __342 -__342: + goto __364 +__364: pEnc += 16 - goto __341 - goto __343 -__343: + goto __363 + goto __365 +__365: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __345 + goto __367 } - Xsqlite3ErrorMsg(tls, pParse, ts+19213, libc.VaList(bp+424, zRight)) -__345: + Xsqlite3ErrorMsg(tls, pParse, ts+19341, libc.VaList(bp+464, zRight)) +__367: ; -__340: +__362: ; -__338: +__360: ; goto __15 @@ -128000,50 +128671,57 @@ __47: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __346 + goto __368 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __348 + goto __370 } goto __15 -__348: +__370: ; (*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 __347 -__346: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __371 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__371: + ; + goto __369 +__368: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __349 + goto __372 } goto __15 -__349: +__372: ; (*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) -__347: +__369: ; goto __15 __48: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__350: +__373: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __351 + goto __374 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __350 -__351: + goto __373 +__374: ; Xsqlite3VdbeReusable(tls, v) @@ -128058,31 +128736,31 @@ __49: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __352 + goto __375 } - if !(Xsqlite3StrICmp(tls, zRight, ts+18651) == 0) { - goto __353 + if !(Xsqlite3StrICmp(tls, zRight, ts+18698) == 0) { + goto __376 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __354 -__353: - if !(Xsqlite3StrICmp(tls, zRight, ts+19238) == 0) { - goto __355 + goto __377 +__376: + if !(Xsqlite3StrICmp(tls, zRight, ts+19366) == 0) { + goto __378 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __356 -__355: - if !(Xsqlite3StrICmp(tls, zRight, ts+18804) == 0) { - goto __357 + goto __379 +__378: + if !(Xsqlite3StrICmp(tls, zRight, ts+18851) == 0) { + goto __380 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__357: +__380: ; -__356: +__379: ; -__354: +__377: ; -__352: +__375: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -128092,10 +128770,10 @@ __352: __50: if !(zRight != 0) { - goto __358 + goto __381 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__358: +__381: ; returnSingleInt(tls, v, func() int64 { @@ -128115,19 +128793,19 @@ __51: __52: if !(zRight != 0) { - goto __359 + goto __382 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __361 + goto __384 } goto __15 -__361: +__384: ; - goto __360 -__359: + goto __383 +__382: opMask = U32(0xfffe) -__360: +__383: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -128136,86 +128814,86 @@ __360: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__362: +__385: if !(iDb <= iDbLast) { - goto __364 + goto __387 } if !(iDb == 1) { - goto __365 + goto __388 } - goto __363 -__365: + goto __386 +__388: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__366: +__389: if !(k4 != 0) { - goto __368 + goto __391 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __369 + goto __392 } - goto __367 -__369: + goto __390 +__392: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__370: +__393: if !(pIdx6 != 0) { - goto __372 + goto __395 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __373 + goto __396 } szThreshold = int16(0) - goto __372 -__373: + goto __395 +__396: ; - goto __371 -__371: + goto __394 +__394: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __370 - goto __372 -__372: + goto __393 + goto __395 +__395: ; if !(szThreshold != 0) { - goto __374 + goto __397 } 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)) -__374: +__397: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+19246, - libc.VaList(bp+432, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+19374, + libc.VaList(bp+472, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __375 + goto __398 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __376 -__375: + goto __399 +__398: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__376: +__399: ; - goto __367 -__367: + goto __390 +__390: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __366 - goto __368 -__368: + goto __389 + goto __391 +__391: ; - goto __363 -__363: + goto __386 +__386: iDb++ - goto __362 - goto __364 -__364: + goto __385 + goto __387 +__387: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -128223,60 +128901,60 @@ __364: __53: ; if !(zRight != 0) { - goto __377 + goto __400 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__377: +__400: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __378 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __401 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__378: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__401: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __55: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK) { - goto __379 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK) { + goto __402 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)))) { - goto __380 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)))) { + goto __403 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 600))) -__380: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 656))) +__403: ; -__379: +__402: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __381 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __404 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608))&int64(0x7fffffff))) -__381: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664))&int64(0x7fffffff))) +__404: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __57: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+616) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) >= int64(0)) { - goto __382 + Xsqlite3DecOrHexToI64(tls, zRight, bp+672) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) >= int64(0)) { + goto __405 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) & int64(0x7fffffff)) -__382: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 672)) & int64(0x7fffffff)) +__405: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -128284,10 +128962,10 @@ __382: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __383 + goto __406 } -__383: +__406: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -128320,6 +128998,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -128331,14 +129017,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 19264, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 19269, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 19275, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 19284, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 19293, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 19301, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 19309}, - {FzName: ts + 19316}, + {FzName: ts + 19392, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 19397, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 19403, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 19412, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 19421, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 19429, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 19437}, + {FzName: ts + 19444}, {}, } var setCookie = [2]VdbeOpList{ @@ -128390,7 +129076,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+19322) + Xsqlite3_str_appendall(tls, bp+32, ts+19450) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -128398,7 +129084,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+19337, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+19465, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -128411,19 +129097,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19344, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+19472, 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+19350) + Xsqlite3_str_appendall(tls, bp+32, ts+19478) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+19362) + Xsqlite3_str_appendall(tls, bp+32, ts+19490) j++ } - Xsqlite3_str_append(tls, bp+32, ts+6295, 1) + Xsqlite3_str_append(tls, bp+32, ts+6309, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -128439,7 +129125,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -128587,7 +129273,7 @@ __1: 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+4479, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -128603,13 +129289,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+19377) + Xsqlite3_str_appendall(tls, bp+32, ts+19505) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+19513, 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+19389, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+19517, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -128618,7 +129304,7 @@ __3: 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+4479, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -128686,33 +129372,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+19393, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+19521, 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, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } 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 + 6346 + zObj = ts + 6360 } - z = Xsqlite3MPrintf(tls, db, ts+19421, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+19549, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+19452, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+19580, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 19460, - ts + 19467, - ts + 19479, + ts + 19588, + ts + 19595, + ts + 19607, } // Check to see if any sibling index (another index on the same table) @@ -128772,7 +129458,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+15473) + corruptSchema(tls, pData, argv, ts+15487) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -128804,13 +129490,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+19490) + corruptSchema(tls, pData, argv, ts+19618) } 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+15473) + corruptSchema(tls, pData, argv, ts+15487) } } } @@ -128843,16 +129529,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 10152 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 10166 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 9216 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19503 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 9230 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19631 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -128937,7 +129623,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+13051) + ts+13065) rc = SQLITE_ERROR goto initone_error_out __13: @@ -128972,7 +129658,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+19575) + Xsqlite3SetString(tls, pzErrMsg, db, ts+19703) rc = SQLITE_ERROR goto initone_error_out __17: @@ -128986,7 +129672,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+19599, + ts+19727, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -129169,16 +129855,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(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) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -129246,20 +129936,20 @@ 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) { - 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)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*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+1460, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1480, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -129271,8 +129961,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - 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)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -129281,7 +129971,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1460, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1480, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -129292,7 +129982,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -129312,7 +130002,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+19633, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+19761, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -129328,100 +130018,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19663, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19791, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).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)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+4479, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+4493, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -129434,7 +130128,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -129533,7 +130227,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, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -129676,7 +130370,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -129851,8 +130545,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 12196 - var zSp2 uintptr = ts + 12196 + var zSp1 uintptr = ts + 12210 + var zSp2 uintptr = ts + 12210 if pB == uintptr(0) { zSp1++ } @@ -129860,13 +130554,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+19682, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+19810, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19712)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19840)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -130041,7 +130735,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19746, libc.VaList(bp, 0)) + ts+19874, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -130086,7 +130780,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19796, libc.VaList(bp+8, zName)) + ts+19924, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -130097,7 +130791,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19860, + Xsqlite3ErrorMsg(tls, pParse, ts+19988, libc.VaList(bp+16, zName)) break } @@ -130141,7 +130835,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 7864, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 7878, Fn: uint32(8)} // 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. @@ -130488,6 +131182,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -130663,7 +131360,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -130725,16 +131422,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 19897 + z = ts + 20025 break case TK_INTERSECT: - z = ts + 19907 + z = ts + 20035 break case TK_EXCEPT: - z = ts + 19917 + z = ts + 20045 break default: - z = ts + 19924 + z = ts + 20052 break } return z @@ -130744,7 +131441,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19930, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20058, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -130950,8 +131647,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1089 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 17562 + zType = ts + 1109 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 17609 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*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)) @@ -131090,13 +131787,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 17562 + zCol = ts + 17609 } 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+13337, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+13351, 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) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -131104,7 +131801,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+19953, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+20081, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -131194,7 +131891,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 17562 + zName = ts + 17609 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -131204,7 +131901,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+19953, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+20081, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -131220,7 +131917,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+19962, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+20090, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -131507,7 +132204,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+19970, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20098, 0) return __1: ; @@ -131598,7 +132295,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+20019, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20147, 0) goto end_of_recursive_query __15: ; @@ -131618,7 +132315,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20061, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20189, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -131655,7 +132352,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20067, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20195, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -131689,11 +132386,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+20082, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20210, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1524 + return ts + 1544 } - return ts + 20105 + return ts + 20233 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -131794,8 +132491,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20107, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20122, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20235, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20250, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -131842,7 +132539,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19897, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20025, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -131909,7 +132606,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20141, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20269, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -131971,7 +132668,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20141, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20269, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -132124,10 +132821,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20162, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20290, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+20208, + ts+20336, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -132381,8 +133078,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*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+8512) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+8512) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8526) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+8526) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -132409,13 +133106,13 @@ 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+20290, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20418, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) 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+20301, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20429, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -132427,7 +133124,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+20306, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20434, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -132528,7 +133225,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -132554,6 +133251,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -132570,7 +133268,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -132607,7 +133305,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*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 iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -132618,6 +133317,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -132642,15 +133342,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - 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 + 1069 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1089 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -132827,9 +133532,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -132898,7 +133610,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { 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) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -132914,17 +133625,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x400>>10)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x800>>11)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -132945,7 +133647,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } 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 @@ -132957,6 +133658,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff int8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -133112,6 +133824,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -133135,8 +133848,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -133312,8 +134025,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -133330,6 +134043,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -133359,6 +134077,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -133392,12 +134111,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+16464) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+16511) == 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+16468) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+16515) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -133463,7 +134182,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+20312, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+20440, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -133546,7 +134265,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20330, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20458, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -133675,7 +134394,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+20353, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20481, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -133701,7 +134420,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+20373, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+20501, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -133717,7 +134436,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20416 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20544 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -133743,7 +134462,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+20439, + Xsqlite3ErrorMsg(tls, pParse, ts+20567, 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 @@ -133754,9 +134473,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 + 20477 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20605 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20511 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20639 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -133783,9 +134502,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem 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, +// allocates and populates the SrcItem.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 { @@ -133803,7 +134522,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+20549, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+20677, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -133915,7 +134634,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+20553, + Xsqlite3ErrorMsg(tls, pParse, ts+20681, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -133934,7 +134653,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+20592, + Xsqlite3ErrorMsg(tls, pParse, ts+20720, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -133942,7 +134661,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 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+20623, + Xsqlite3ErrorMsg(tls, pParse, ts+16080, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -134043,7 +134762,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 7724 + zSchemaName = ts + 7738 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -134058,7 +134777,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20656, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20751, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -134123,7 +134842,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20661, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20756, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -134135,7 +134854,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+13337, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+13351, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -134154,9 +134873,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20670, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20765, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+20688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20783, 0) } } } @@ -134166,7 +134885,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+20708, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20803, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -134316,13 +135035,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+20739, 0) + ts+20834, 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, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20790, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20885, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -134503,19 +135222,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt 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+20823, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20918, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 20835 + return ts + 20930 } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1524 + return ts + 1544 }())) } } @@ -134528,7 +135247,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|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+9216) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+9230) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -134686,7 +135405,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -134785,7 +135503,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+20858, + ts+20953, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -134846,7 +135564,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+20912, + Xsqlite3ErrorMsg(tls, pParse, ts+21007, 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 __15: @@ -134950,7 +135668,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1524, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1544, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -134960,7 +135678,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -134992,7 +135710,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20952, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21047, 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), 5, 0x20) @@ -135050,8 +135768,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20967, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21062, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -135085,7 +135806,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -135178,16 +135899,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -135196,13 +135922,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -135214,52 +135940,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -135277,111 +136003,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -135400,33 +136126,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*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 __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -135434,28 +136160,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -135466,7 +136192,7 @@ __98: (*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 __101 + goto __102 } 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) @@ -135477,7 +136203,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -135503,7 +136229,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -135516,27 +136242,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: 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 + 20983 + return ts + 21078 } - return ts + 20992 + return ts + 21087 }()) groupBySort = 1 @@ -135544,49 +136270,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - 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) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -135600,45 +136326,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -135657,16 +136383,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -135697,16 +136423,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -135719,98 +136445,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } 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 __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; 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 __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -135819,79 +136545,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+20983) -__147: + explainTempTable(tls, pParse, ts+21078) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 21001 + return ts + 21096 } - return ts + 21024 + return ts + 21119 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -135966,7 +136692,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -135988,7 +136714,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+21033, 0) + ts+21128, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -136084,7 +136810,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp 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+4479, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -136176,7 +136902,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { 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)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -136221,7 +136947,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+21098, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21193, 0) goto trigger_cleanup __3: ; @@ -136265,7 +136991,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+21144, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+21239, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -136283,7 +137009,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+21152, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21247, 0) goto trigger_orphan_error __11: ; @@ -136295,7 +137021,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+21144, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+21239, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -136310,7 +137036,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+21193, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21288, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -136322,22 +137048,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9410, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9424, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+21219, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21314, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+21257, + Xsqlite3ErrorMsg(tls, pParse, ts+21352, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 21294 + return ts + 21389 } - return ts + 21301 + return ts + 21396 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -136346,7 +137072,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+21307, libc.VaList(bp+24, pTableName+8)) + ts+21402, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -136375,9 +137101,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -136495,7 +137221,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+21144, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+21239, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -136528,7 +137254,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+21353, + ts+21448, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -136553,13 +137279,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+21401, + ts+21496, libc.VaList(bp+16, (*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+21476, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+21571, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -136815,7 +137541,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+21505, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+21600, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -136854,9 +137580,9 @@ 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 + 13424 + return ts + 13438 } - return ts + 7231 + return ts + 7245 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -136868,7 +137594,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+21525, + ts+21620, 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) @@ -136982,12 +137708,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+21587, + ts+21682, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 21635 + return ts + 21730 } - return ts + 21642 + return ts + 21737 }())) __15: ; @@ -137101,7 +137827,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+21649, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21744, 0) return 1 } @@ -137152,7 +137878,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -137221,7 +137947,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+7418, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+7432, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -137284,8 +138010,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -137318,26 +138044,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+21691, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+21786, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } 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) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -137354,7 +138080,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt 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)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -137547,10 +138273,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = 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, @@ -137559,7 +138287,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - 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) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -137921,7 +138649,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+21705, + ts+21800, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -137953,7 +138681,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+21741, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21836, 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: @@ -137963,7 +138691,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 8991 + return ts + 9005 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -138833,7 +139561,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+21760) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+21855) __169: ; update_cleanup: @@ -139139,10 +139867,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+21773, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+21868, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+21777, libc.VaList(bp+8, bp+216)) + ts+21872, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -139233,7 +139961,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+13478, -1) + ts+13492, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -139265,7 +139993,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+21850, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21854, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+21945, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21949, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -139402,23 +140130,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21858) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21953) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21898) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21993) return SQLITE_ERROR __2: ; @@ -139429,7 +140159,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21941) + Xsqlite3SetString(tls, pzErrMsg, db, ts+22036) return SQLITE_ERROR __5: ; @@ -139438,7 +140168,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1524 + zOut = ts + 1544 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -139457,7 +140187,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21959, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+22054, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -139477,20 +140207,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21982) + Xsqlite3SetString(tls, pzErrMsg, db, ts+22077) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __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)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+15836) + rc = execSql(tls, db, pzErrMsg, ts+15850) if !(rc != SQLITE_OK) { goto __9 } @@ -139535,7 +140267,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+22009, + ts+22104, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -139544,7 +140276,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+22117, + ts+22212, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -139555,7 +140287,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+22171, + ts+22266, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -139566,7 +140298,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+22322, + ts+22417, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -139688,7 +140420,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -139730,7 +140462,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -139887,7 +140619,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -139911,7 +140643,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+13705, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13719, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -139995,11 +140727,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { 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+22452, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+22547, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+22476, + ts+22571, 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, @@ -140009,7 +140741,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+22575, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+22670, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -140043,7 +140775,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // 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) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 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 @@ -140070,7 +140802,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+22594, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+22689, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -140108,9 +140840,9 @@ 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+22636, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22731, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+4479, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+4493, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -140120,7 +140852,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 + 22666 + var zFormat uintptr = ts + 22761 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -140132,12 +140864,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = 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+1524) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1544) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+17453, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+17500, 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 @@ -140190,17 +140922,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+22712, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+22807, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = 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+4479, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -140249,10 +140981,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) 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+22712, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22807, 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) @@ -140272,8 +141004,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // 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 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -140286,7 +141018,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, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -140328,7 +141060,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -140696,7 +141428,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) 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+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -140739,7 +141471,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, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -140766,7 +141498,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -140994,31 +141726,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// 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 -} - -// 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 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 22731 + return ts + 22826 } if i == -1 { - return ts + 17562 + return ts + 17609 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -141027,35 +141741,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+22738, 5) + Xsqlite3_str_append(tls, pStr, ts+22833, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+22744, 1) + Xsqlite3_str_append(tls, pStr, ts+22839, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+14095, 1) + Xsqlite3_str_append(tls, pStr, ts+14109, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+6295, 1) + Xsqlite3_str_append(tls, pStr, ts+6309, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+22744, 1) + Xsqlite3_str_append(tls, pStr, ts+22839, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+14095, 1) + Xsqlite3_str_append(tls, pStr, ts+14109, 1) } - Xsqlite3_str_append(tls, pStr, ts+6346, 1) + Xsqlite3_str_append(tls, pStr, ts+6360, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+6295, 1) + Xsqlite3_str_append(tls, pStr, ts+6309, 1) } } @@ -141072,29 +141786,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { 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+22746, 2) + Xsqlite3_str_append(tls, pStr, ts+22841, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+22738, 5) + Xsqlite3_str_append(tls, pStr, ts+22833, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 22749 + return ts + 22844 } - return ts + 22754 + return ts + 22849 }(), 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))), j, i, ts+22762) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+22857) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+22764) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+22859) } - Xsqlite3_str_append(tls, pStr, ts+6295, 1) + Xsqlite3_str_append(tls, pStr, ts+6309, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -141135,11 +141849,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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+22766, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+22861, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 22772 + return ts + 22867 } - return ts + 22779 + return ts + 22874 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -141149,43 +141863,43 @@ 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 + 12252 + zFmt = ts + 12266 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 22784 + zFmt = ts + 22879 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 22817 + zFmt = ts + 22912 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 22842 + zFmt = ts + 22937 } else { - zFmt = ts + 22860 + zFmt = ts + 22955 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+22869, 7) + Xsqlite3_str_append(tls, bp+64, ts+22964, 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 + 17562 - Xsqlite3_str_appendf(tls, bp+64, ts+22877, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 17609 + Xsqlite3_str_appendf(tls, bp+64, ts+22972, 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+22908, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+23003, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+22918, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+23013, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22923, + Xsqlite3_str_appendf(tls, bp+64, ts+23018, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+22950, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+23045, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -141217,25 +141931,25 @@ 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)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22961, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+23056, 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+22749, 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+22844, 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+22982, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+23077, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+22738, 5) + Xsqlite3_str_append(tls, bp+24, ts+22833, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+22749, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+22844, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+6295, 1) + Xsqlite3_str_append(tls, bp+24, ts+6309, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -141596,7 +142310,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -141649,104 +142363,6 @@ 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 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - 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{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - 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) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - 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 -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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)).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)).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) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).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) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -141785,7 +142401,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -141805,6 +142421,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -141955,12 +142573,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 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)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -141979,13 +142597,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -141998,7 +142616,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0) { goto __7 @@ -142060,7 +142678,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -142207,6 +142825,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -142549,13 +143169,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -142563,104 +143190,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -142669,92 +143305,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } 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) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -142764,24 +143394,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -142801,152 +143431,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*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 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22990, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23085, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23005, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23100, 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) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -142955,121 +143586,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x2>>1)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).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))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 0, 0x1) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -143078,36 +143709,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x40>>6)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*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) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -143125,219 +143756,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 1, 0x2) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*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 __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; 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 __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -143347,24 +143978,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -143375,41 +144006,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -143443,7 +144074,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -143451,13 +144082,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23014, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23109, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -143736,7 +144367,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && 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 @@ -143749,7 +144380,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -143773,11 +144404,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin 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 { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && 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) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -143809,10 +144440,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 17411, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 16741, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 16267, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 23028, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 17458, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 16788, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 16314, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 23123, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -143954,7 +144585,7 @@ __1: { 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+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -143971,10 +144602,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*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+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -144031,7 +144662,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -144217,6 +144848,7 @@ __3: 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 @@ -144272,7 +144904,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -144309,12 +144941,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+23035, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23130, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23035, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23130, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -144393,7 +145025,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8047 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8061 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -144487,7 +145119,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 23076 + return ts + 23171 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -144681,7 +145313,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // 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) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(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 @@ -144860,7 +145492,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+23083, + Xsqlite3ErrorMsg(tls, pParse, ts+23178, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -144930,6 +145562,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -144956,10 +145591,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x4>>2) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -144979,14 +145614,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&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 + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 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 @@ -145023,14 +145658,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // 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 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, 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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x1 >> 0) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -145473,6 +146108,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -145482,11 +146129,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -145581,7 +146226,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+23119, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+23214, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -145652,7 +146297,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 23145 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 23240 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -145886,7 +146531,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -145948,11 +146593,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -146020,7 +146663,7 @@ __3: 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+1460, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1480, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -146142,9 +146785,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 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+4479, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+4479, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+4493, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -146212,7 +146855,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro 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)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -146561,9 +147204,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -146587,7 +147233,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -146603,32 +147250,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) 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) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - 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) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -146774,7 +147411,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -147017,13 +147654,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 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 { @@ -147034,7 +147668,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -147089,31 +147724,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } 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)) = 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 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*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)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = 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)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + 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)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*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)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + 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) + } } } @@ -147316,6 +147953,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -147447,6 +148142,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -147461,6 +148159,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -147491,7 +148192,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 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) { @@ -147647,7 +148348,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+23156, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23251, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -147705,7 +148406,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+23156, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23251, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -148063,7 +148764,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -148075,7 +148776,7 @@ __1: 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+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -148090,7 +148791,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -148103,7 +148804,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+23182, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+23277, 0) rc = SQLITE_OK } else { goto __3 @@ -148204,7 +148905,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -148378,7 +149079,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -148430,7 +149131,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 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x8 >> 3) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -148458,7 +149159,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -148479,7 +149179,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -148501,7 +149200,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { 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)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -148563,9 +149262,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -148581,7 +149279,9 @@ __3: 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 + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -148601,6 +149301,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -148697,8 +149402,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23217, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+23312, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -148710,7 +149415,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*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)*104)).FiCursor @@ -148725,7 +149430,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 2, 0x4) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -148745,7 +149450,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -148753,7 +149458,7 @@ __3: } 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 2, 0x4) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -148763,7 +149468,7 @@ __3: 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) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 3, 0x8) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -148771,7 +149476,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -148803,7 +149508,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -148860,10 +149565,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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) @@ -148907,16 +149612,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*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 + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -148949,7 +149654,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } 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+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -148961,9 +149666,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).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) { @@ -148981,6 +149686,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // 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 @@ -149067,7 +149824,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // 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 { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -149124,7 +149881,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+23235, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+23330, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -149147,31 +149904,30 @@ __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) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+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)).FiBreak = libc.AssignPtrInt32(pWInfo+48, 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)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -149189,13 +149945,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+23263, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+23358, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -149206,169 +149962,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } 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 __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } 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+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; 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 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).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 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -149377,26 +150138,26 @@ __35: 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 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -149404,37 +150165,37 @@ __40: 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 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -149442,92 +150203,98 @@ __51: 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 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead 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 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x800>>11)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -149537,24 +150304,24 @@ __58: (*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 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -149564,96 +150331,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x10>>4)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -149661,30 +150428,28 @@ __80: 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 __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -149704,7 +150469,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -149840,11 +150605,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -149883,6 +150645,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -150055,7 +150827,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+23281, -1) + pCtx, ts+23376, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -150188,7 +150960,7 @@ 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+23337, -1) + pCtx, ts+23432, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -150278,17 +151050,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 23382)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 23393)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 23404)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 23409)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 23422)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 23432)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 23438)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 23449)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 23459)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 23471)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23476)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 23477)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 23488)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 23499)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 23504)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 23517)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 23527)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 23533)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 23544)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 23554)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 23566)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23571)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -150334,7 +151106,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+23480, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23575, libc.VaList(bp, zName)) } return p } @@ -150378,12 +151150,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+23499, 0) + ts+23594, 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+23570, 0) + ts+23665, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -150406,7 +151178,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*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+9216) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+9230) } break } @@ -150576,7 +151348,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui 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 @@ -150613,7 +151384,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr 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+23633, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+23728, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -150729,7 +151500,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+8808)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+8822)) } pSub = Xsqlite3SelectNew(tls, @@ -150843,7 +151614,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+23659, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23754, 0) goto windowAllocErr __2: ; @@ -150908,15 +151679,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 23691 + zErr = ts + 23786 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 23708 + zErr = ts + 23803 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 23724 + zErr = ts + 23819 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+23744, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+23839, 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 { @@ -150937,7 +151708,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+23777, 0) + ts+23872, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -151075,7 +151846,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { 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+1524, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1544, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -151093,11 +151864,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 23824, - ts + 23877, - ts + 23281, - ts + 23928, - ts + 23980, + ts + 23919, + ts + 23972, + ts + 23376, + ts + 24023, + ts + 24075, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -151578,13 +152349,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1524, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1544, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -152492,19 +153267,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24030, + Xsqlite3ErrorMsg(tls, pParse, ts+24125, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 21024 + return ts + 21119 } - return ts + 24072 + return ts + 24167 }(), 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+24078, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24173, 0) } } @@ -152572,7 +153347,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT 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+24112, + Xsqlite3ErrorMsg(tls, pParse, ts+24207, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -153669,7 +154444,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+24150, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24245, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -154644,21 +155419,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17562, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17609, 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+24172, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+24267, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17475, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17522, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+24172, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+24267, 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)) @@ -155401,7 +156176,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { 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+24199) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+24294) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -155565,7 +156340,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24208, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+24303, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -155782,9 +156557,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in 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_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 8042 + return ts + 8056 } - return ts + 8047 + return ts + 8061 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -156063,19 +156838,19 @@ 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+24232, 0) + ts+24327, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+24327, 0) + ts+24422, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+24411, 0) + ts+24506, 0) } break case uint32(273): @@ -156454,9 +157229,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24208, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+24303, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+24496, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24591, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -157224,7 +157999,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+24513, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+24608, libc.VaList(bp, bp+2464)) break } } @@ -157245,9 +158020,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } 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+4479, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+4493, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+24538, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+24633, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -157260,7 +158035,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -157420,7 +158195,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+24549, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+24644, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -157433,11 +158208,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+21144, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+21239, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+24556, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+24651, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+24561, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+24656, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -157450,9 +158225,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+24571, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+24666, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+24575, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+24670, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -157562,36 +158337,14 @@ var Xsqlite3_temp_directory uintptr = uintptr(0) // See also the "PRAGMA data_store_directory" SQL command. var Xsqlite3_data_directory uintptr = uintptr(0) -// 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. +var mu mutex + +func init() { mu.recursive = true } + func Xsqlite3_initialize(tls *libc.TLS) int32 { + mu.enter(tls.ID) + defer mu.leave(tls.ID) + var pMainMtx uintptr var rc int32 @@ -157708,7 +158461,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 171131) + return Xsqlite3MisuseError(tls, 172925) } ap = va @@ -157979,16 +158732,17 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 }() (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) } else { - (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = uintptr(0) (*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.FpMiddle = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = uintptr(0) (*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) } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd return SQLITE_OK } @@ -158052,6 +158806,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { var ap Va_list _ = ap var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) ap = va switch op { case SQLITE_DBCONFIG_MAINDBNAME: @@ -158102,6 +158857,7 @@ func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { } } _ = ap + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } @@ -158250,7 +159006,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { } } } - for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + for p = (*Hash)(unsafe.Pointer(db + 576)).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) @@ -158280,7 +159036,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171902) + return Xsqlite3MisuseError(tls, 173699) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -158295,7 +159051,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24583, 0) + ts+24678, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -158391,7 +159147,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { Xsqlite3ConnectionClosed(tls, db) - for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + for i = (*Hash)(unsafe.Pointer(db + 624)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pNext uintptr var p uintptr p = (*HashElem)(unsafe.Pointer(i)).Fdata @@ -158402,8 +159158,8 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { p = pNext } } - Xsqlite3HashClear(tls, db+616) - for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+624) + for i = (*Hash)(unsafe.Pointer(db + 648)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata for j = 0; j < 3; j++ { @@ -158413,13 +159169,13 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { } Xsqlite3DbFree(tls, db, pColl) } - Xsqlite3HashClear(tls, db+640) - for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + Xsqlite3HashClear(tls, db+648) + for i = (*Hash)(unsafe.Pointer(db + 576)).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) + Xsqlite3HashClear(tls, db+576) Xsqlite3Error(tls, db, SQLITE_OK) Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) @@ -158486,23 +159242,23 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { // Return a static string that describes the kind of error specified in the // argument. func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { - var zErr uintptr = ts + 24651 + var zErr uintptr = ts + 24746 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 24665 + zErr = ts + 24760 break } case SQLITE_ROW: { - zErr = ts + 24687 + zErr = ts + 24782 break } case SQLITE_DONE: { - zErr = ts + 24709 + zErr = ts + 24804 break } @@ -158520,35 +159276,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 24732, - ts + 24745, + ts + 24827, + ts + 24840, uintptr(0), - ts + 24761, - ts + 24786, - ts + 24800, - ts + 24819, - ts + 1460, - ts + 24844, + ts + 24856, ts + 24881, - ts + 24893, - ts + 24908, - ts + 24941, - ts + 24959, - ts + 24984, - ts + 25013, + ts + 24895, + ts + 24914, + ts + 1480, + ts + 24939, + ts + 24976, + ts + 24988, + ts + 25003, + ts + 25036, + ts + 25054, + ts + 25079, + ts + 25108, uintptr(0), - ts + 7186, - ts + 6672, - ts + 25030, - ts + 25048, - ts + 25066, + ts + 7200, + ts + 6686, + ts + 25125, + ts + 25143, + ts + 25161, uintptr(0), - ts + 25100, + ts + 25195, uintptr(0), - ts + 25121, - ts + 25147, - ts + 25170, - ts + 25191, + ts + 25216, + ts + 25242, + ts + 25265, + ts + 25286, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -158663,7 +159419,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, 172531) + return Xsqlite3MisuseError(tls, 174328) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -158708,7 +159464,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+25207, 0) + ts+25302, 0) return SQLITE_BUSY } else { @@ -158825,7 +159581,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+25270, libc.VaList(bp, zName)) + ts+25365, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -158841,6 +159597,9 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // 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 { + bp := tls.Alloc(8) + defer tls.Free(8) + var rc int32 var zCopy uintptr @@ -158850,7 +159609,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, zName, 0) + zCopy = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, zName)) if zCopy == uintptr(0) { return SQLITE_NOMEM } @@ -159058,7 +159817,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+25321, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+25416, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -159151,7 +159910,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 173276)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 175073)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -159221,7 +159980,7 @@ var misuse = [34]U16{ // passed to this function, we assume a malloc() failed during sqlite3_open(). func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173355) + return Xsqlite3MisuseError(tls, 175152) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -159231,7 +159990,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173364) + return Xsqlite3MisuseError(tls, 175161) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -159263,20 +160022,20 @@ 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, 173412) + return Xsqlite3MisuseError(tls, 175209) } 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+25342, 0) + ts+25437, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { - var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var aColl uintptr = Xsqlite3HashFind(tls, db+648, zName) var j int32 for j = 0; j < 3; j++ { var p uintptr = aColl + uintptr(j)*40 @@ -159400,7 +160159,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+25410, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+25505, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -159445,10 +160204,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+25416, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+25511, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25426, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25521, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -159553,7 +160312,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+25454, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+25549, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -159564,17 +160323,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+25458, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+25553, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 25458 + zModeType = ts + 25553 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+25464, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+25559, zOpt, uint64(4)) == 0) { goto __32 } @@ -159582,7 +160341,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 25469 + zModeType = ts + 25564 __32: ; if !(aMode != 0) { @@ -159612,7 +160371,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25476, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25571, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -159620,7 +160379,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25496, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25591, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -159660,7 +160419,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25520, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25615, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -159684,15 +160443,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 25536, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 25543, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 25631, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 25638, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 25551, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 25554, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 25557, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 18668, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 25646, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 25649, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 25652, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 18715, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -159807,7 +160566,7 @@ __12: }() (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) @@ -159826,8 +160585,8 @@ __12: uint32(SQLITE_DqsDML) | uint32(SQLITE_DqsDDL) | uint32(SQLITE_AutoIndex)) - Xsqlite3HashInit(tls, db+640) - Xsqlite3HashInit(tls, db+568) + Xsqlite3HashInit(tls, db+648) + Xsqlite3HashInit(tls, db+576) 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 @@ -159838,10 +160597,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+23076, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+23171, 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+25561, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+25656, 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) { @@ -159855,7 +160614,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 174068) + rc = Xsqlite3MisuseError(tls, 175878) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -159872,7 +160631,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -159906,9 +160665,9 @@ __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)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 7719 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 7733 (*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 + 24556 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 24651 (*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) @@ -160013,7 +160772,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 25567 + zFilename = ts + 25662 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -160116,21 +160875,21 @@ func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+25570, + Xsqlite3_log(tls, iErr, ts+25665, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+25595) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+25690) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+25615) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+25710) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+25622) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+25717) } // This is a convenience routine that makes sure that all thread-specific @@ -160241,7 +161000,7 @@ __4: 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 + 1089 + zDataType = ts + 1109 primarykey = 1 __13: ; @@ -160288,14 +161047,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+25639, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+25734, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 4479 + return ts + 4493 } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24)))) @@ -160365,6 +161124,9 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) } rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESET_CACHE { + Xsqlite3BtreeClearCache(tls, pBtree) + rc = SQLITE_OK } else { var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy rc = Xsqlite3OsFileControl(tls, fd, op, pArg) @@ -160941,7 +161703,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+25667, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+25762, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -160974,7 +161736,7 @@ var sqlite3BlockedList uintptr = uintptr(0) func removeFromBlockedList(tls *libc.TLS, db uintptr) { var pp uintptr - for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 840 { if *(*uintptr)(unsafe.Pointer(pp)) == db { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked break @@ -160985,7 +161747,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { func addToBlockedList(tls *libc.TLS, db uintptr) { 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 { + 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)) + 840 { } (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = db @@ -161059,7 +161821,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 + 25675 + return ts + 25770 } return uintptr(0) }(), 0) @@ -161154,7 +161916,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) } else { - pp = p + 832 + pp = p + 840 } } @@ -161237,7 +161999,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 7519, ts + 8042, ts + 8047, ts + 7529, ts + 7524, ts + 9283, ts + 25698, ts + 25704, + ts + 7533, ts + 8056, ts + 8061, ts + 7543, ts + 7538, ts + 9297, ts + 25793, ts + 25799, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -161390,7 +162152,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 + 25711 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 25806 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -161416,7 +162178,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+7519, uint32(4)) + jsonAppendRaw(tls, p, ts+7533, uint32(4)) break } @@ -161445,7 +162207,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+25728, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+25823, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -161503,19 +162265,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { default: { - jsonAppendRaw(tls, pOut, ts+7519, uint32(4)) + jsonAppendRaw(tls, pOut, ts+7533, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+8042, uint32(4)) + jsonAppendRaw(tls, pOut, ts+8056, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+8047, uint32(5)) + jsonAppendRaw(tls, pOut, ts+8061, uint32(5)) break } @@ -162060,17 +162822,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+7519, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+7533, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+8042, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+8056, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(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+8047, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+8061, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -162171,7 +162933,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+25757, -1) + Xsqlite3_result_error(tls, pCtx, ts+25852, -1) } } jsonParseReset(tls, pParse) @@ -162477,7 +163239,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+25772, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+25867, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -162492,7 +163254,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+25776, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+25871, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -162546,7 +163308,7 @@ func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+25802, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+25897, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -162651,11 +163413,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+25845, uint32(2)) + jsonAppendRaw(tls, bp, ts+25940, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) - jsonAppendRaw(tls, bp, ts+6336, uint32(2)) + jsonAppendRaw(tls, bp, ts+6350, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+25848, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+25943, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -162696,7 +163458,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if pNode != 0 { jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp, ts+7519, uint32(4)) + jsonAppendRaw(tls, bp, ts+7533, uint32(4)) } } if i == argc { @@ -162812,14 +163574,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+25851, -1) + ts+25946, -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+25902, -1) + Xsqlite3_result_error(tls, ctx, ts+25997, -1) jsonReset(tls, bp) return } @@ -162914,7 +163676,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+16674) + jsonWrongNumArgs(tls, ctx, ts+16721) return __2: ; @@ -162989,9 +163751,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 25936 + return ts + 26031 } - return ts + 25940 + return ts + 26035 }()) return __2: @@ -163124,7 +163886,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25947, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+26042, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -163221,7 +163983,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25950, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+26045, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -163265,7 +164027,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25953) + ts+26048) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -163396,7 +164158,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+26036, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+26131, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -163415,7 +164177,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { 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+26042, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+26137, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -163511,7 +164273,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+26042, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+26137, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -163535,7 +164297,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 + 26047 + zRoot = ts + 26142 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -163651,7 +164413,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+25757, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+25852, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -163746,25 +164508,25 @@ func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { } 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 + 26049}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26054}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26065}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26065}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), 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_JSON)), FxSFunc: 0, FzName: ts + 26096}, - {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 + 26099}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26103}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26115}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26138}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26144}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26149}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26161}, - {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 + 26174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26183}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26183}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26193}, - {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 + 26204}, - {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 + 26221}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26160}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26160}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26178}, + {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 + 26191}, + {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 + 26194}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26198}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26210}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26222}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26233}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26244}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26256}, + {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 + 26269}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26278}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26288}, + {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 + 26299}, + {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 + 26316}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -163783,8 +164545,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 26239, FpModule: 0}, - {FzName: ts + 26249, FpModule: 0}, + {FzName: ts + 26334, FpModule: 0}, + {FzName: ts + 26344, FpModule: 0}, } type Rtree1 = struct { @@ -164044,11 +164806,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+26259, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+26354, 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+26267, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+26362, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -164259,7 +165021,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+26272, + ts+26367, 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)) @@ -164957,7 +165719,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+26354) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+26449) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -165169,7 +165931,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { (*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+4479, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -166298,7 +167060,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+26368, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+26463, 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 { @@ -166310,12 +167072,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)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+26388, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+26483, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+26420, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+26515, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -166356,7 +167118,7 @@ __1: ; rtreeReference(tls, pRtree) - (*RtreeCell)(unsafe.Pointer(bp)).FiRowid = int64(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeCell{}))) if !(nData > 1) { goto __2 @@ -166541,7 +167303,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+26457, 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+26552, 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)) @@ -166564,14 +167326,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 26602 + var zFmt uintptr = ts + 26697 var zSql uintptr var rc int32 var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+12624, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+12638, 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 { @@ -166612,7 +167374,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 26658, ts + 6398, ts + 17562, + ts + 26753, ts + 6412, ts + 17609, } var rtreeModule = Sqlite3_module{ @@ -166655,19 +167417,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+26663, + ts+26758, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+26725, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+26820, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+26730, + ts+26825, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+26794, + ts+26889, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+26864, + ts+26959, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -166696,7 +167458,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 26913 + zFormat = ts + 27008 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -166708,7 +167470,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+27021, + ts+27116, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -166716,18 +167478,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+27066, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+27161, 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+14095, 1) + Xsqlite3_str_append(tls, p, ts+14109, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+27093, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+27188, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+27115, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+27210, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+27123, 0) + Xsqlite3_str_appendf(tls, p, ts+27218, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -166742,14 +167504,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 27139, - ts + 27192, - ts + 27237, - ts + 27289, - ts + 27343, - ts + 27388, - ts + 27446, - ts + 27501, + ts + 27234, + ts + 27287, + ts + 27332, + ts + 27384, + ts + 27438, + ts + 27483, + ts + 27541, + ts + 27596, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -166778,7 +167540,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+27548, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+27643, 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 @@ -166786,19 +167548,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+27568, + ts+27663, 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+4479, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, 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+27625, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+27720, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -166840,16 +167602,16 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96)) = [5]uintptr{ uintptr(0), - ts + 27660, - ts + 27703, - ts + 27738, - ts + 27774, + ts + 27755, + ts + 27798, + ts + 27833, + ts + 27869, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) return SQLITE_ERROR __1: ; @@ -166874,7 +167636,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27811, + Xsqlite3_str_appendf(tls, pSql, ts+27906, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -166886,7 +167648,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27835, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+27930, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -166909,7 +167671,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+27841, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27936, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -166920,14 +167682,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, 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+4479, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -166970,7 +167732,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -166987,7 +167749,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -167005,7 +167767,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 27844, ts + 27855} +var azFormat = [2]uintptr{ts + 27939, ts + 27950} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -167043,13 +167805,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+12196, 1) + Xsqlite3_str_append(tls, pOut, ts+12210, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+27865, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+27960, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+27871, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+27966, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+27875, 1) + Xsqlite3_str_append(tls, pOut, ts+27970, 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}))) @@ -167060,7 +167822,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = 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+27877, -1) + Xsqlite3_result_error(tls, ctx, ts+27972, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -167138,12 +167900,12 @@ 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+27910, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+28005, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 5400 + return ts + 5414 } - return ts + 1524 + return ts + 1544 }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -167162,7 +167924,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+27917, + ts+28012, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -167181,7 +167943,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+27962, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+28057, libc.VaList(bp+16, iNode)) } } @@ -167195,8 +167957,8 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80)) = [2]uintptr{ - ts + 27994, - ts + 28048, + ts + 28089, + ts + 28143, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -167211,23 +167973,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+28096, + rtreeCheckAppendMsg(tls, pCheck, ts+28191, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 28141 + return ts + 28236 } - return ts + 28149 + return ts + 28244 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+28158, + ts+28253, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 28141 + return ts + 28236 } - return ts + 28149 + return ts + 28244 }(), iKey, iVal)) } } @@ -167251,7 +168013,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+28216, libc.VaList(bp, i, iCell, iNode)) + ts+28311, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -167271,7 +168033,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+28264, libc.VaList(bp+24, i, iCell, iNode)) + ts+28359, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -167288,14 +168050,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+28331, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+28426, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) } else { var nCell int32 var i int32 if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+28365, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+28460, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -167303,7 +168065,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+28395, + ts+28490, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -167332,14 +168094,14 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+28450, + pCount = rtreeCheckPrepare(tls, pCheck, ts+28545, 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+28481, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+28576, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -167361,12 +168123,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep (*RtreeCheck)(unsafe.Pointer(bp + 32)).FzTab = zTab if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+15836, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+15850, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+28548, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+28643, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -167375,12 +168137,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+26368, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+26463, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+28576, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+28671, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -167394,8 +168156,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+28607, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+28614, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+28702, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+28709, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -167403,7 +168165,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+28622, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+28717, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -167418,7 +168180,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+28626, -1) + ts+28721, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -167426,7 +168188,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 7719 + zDb = ts + 7733 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -167436,7 +168198,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp)) } - return ts + 19210 + return ts + 19338 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -167805,11 +168567,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+28677, 1) + Xsqlite3_str_append(tls, x, ts+28772, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+28679, 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+28774, 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+28690, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+28785, 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) } @@ -167829,19 +168591,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+28701, 0) + Xsqlite3_str_appendf(tls, x, ts+28796, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+28719, 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+28814, 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+28727, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+28822, 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+28735, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+28830, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+28739, 0) + Xsqlite3_str_appendf(tls, x, ts+28834, 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) } @@ -168747,7 +169509,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+28752, 0) + Xsqlite3_str_appendf(tls, pSql, ts+28847, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -168756,7 +169518,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+28774, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+28869, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -168764,7 +169526,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+27841, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27936, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -168775,7 +169537,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -168800,7 +169562,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -168989,7 +169751,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 17562 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 17609 (*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 @@ -168999,7 +169761,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28778 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28873 (*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 @@ -169007,7 +169769,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28784 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28879 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -169119,7 +169881,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+28793, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+28888, 0) __4: ; goto geopoly_update_end @@ -169249,14 +170011,14 @@ geopoly_update_end: } func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { - if Xsqlite3_stricmp(tls, zName, ts+28833) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28928) == 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+28849) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28944) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -169321,7 +170083,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+28864, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28959, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -169333,25 +170095,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28872}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28885}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28898}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 28911}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28849}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 28923}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28833}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 28946}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28960}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28973}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28987}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 29003}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28967}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28980}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28993}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 29006}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28944}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 29018}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28928}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 29041}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 29055}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 29068}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 29082}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 29098}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 29015}, + {FxStep: 0, FxFinal: 0, FzName: ts + 29110}, } // Register the r-tree module with database handle db. This creates the @@ -169361,26 +170123,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+29034, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29129, 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+29044, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29139, 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+29055, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29150, -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+28778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28873, 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+29066, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+29161, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -169434,7 +170196,7 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+26354, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+26449, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -169501,6 +170263,8 @@ type sqlite3rbu = struct { F__ccgo_pad4 [4]byte FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -169759,7 +170523,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+29076, -1) + Xsqlite3_result_error(tls, context, ts+29171, -1) return } @@ -169770,7 +170534,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+29076, -1) + Xsqlite3_result_error(tls, context, ts+29171, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -169783,7 +170547,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -169795,7 +170559,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -169871,7 +170635,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuObjIterClearStatements(tls, pIter) if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29097, uintptr(0), uintptr(0), p+64) + ts+29192, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -169935,7 +170699,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+26267, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+26362, 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++ { } @@ -169956,16 +170720,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+29268, libc.VaList(bp, func() uintptr { + ts+29363, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 29418 + return ts + 29513 } - return ts + 1524 + return ts + 1544 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+29459) + ts+29554) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -170063,7 +170827,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -170081,7 +170845,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+29584, libc.VaList(bp, zTab))) + ts+29679, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -170099,7 +170863,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+29703, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+29798, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -170117,7 +170881,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+29724, libc.VaList(bp+16, zIdx))) + ts+29819, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -170140,7 +170904,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+29775, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+29870, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -170186,7 +170950,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+29796, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -170201,7 +170965,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { 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+29824, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+29919, 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)), 1) if iCid >= 0 { @@ -170241,7 +171005,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+20670, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+20765, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -170251,18 +171015,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29853, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+29948, 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))) 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)), i) - if Xsqlite3_strnicmp(tls, ts+29872, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+29967, 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+29877, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+29972, zName) { bRbuRowid = 1 } } @@ -170274,18 +171038,18 @@ 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+29887, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+29982, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 29916 + return ts + 30011 } - return ts + 29929 + return ts + 30024 }())) } 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+29938, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+30033, 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)), 1) @@ -170299,7 +171063,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+29960, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30055, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -170342,12 +171106,12 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+29987, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 15947 + zList = rbuMPrintf(tls, p, ts+30082, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 15961 } return zList } @@ -170358,13 +171122,13 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+29996, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+30091, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -170386,25 +171150,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+30009, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+30104, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+30041, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+30136, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15947, ts+30064) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+30070, ts+30077, ts+6295) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15947, ts+1524) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1544, ts+15961, ts+30159) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+30165, ts+30172, ts+6309) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1544, ts+15961, ts+1544) 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+30085, + ts+30180, 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)), 0) - zRet = rbuMPrintf(tls, p, ts+30127, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+30222, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -170441,12 +171205,12 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1524 + zSep = ts + 1544 iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+29919, 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 @@ -170481,7 +171245,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 30147 + zCol = ts + 30242 __7: ; goto __5 @@ -170489,13 +171253,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+30155, + zLhs = rbuMPrintf(tls, p, ts+30250, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+30176, + zOrder = rbuMPrintf(tls, p, ts+30271, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+30212, + zSelect = rbuMPrintf(tls, p, ts+30307, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 15947 + zSep = ts + 15961 iCol++ goto __1 __2: @@ -170513,12 +171277,12 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+30239, + Xsqlite3_mprintf(tls, ts+30334, 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 + 1524 + zSep = ts + 1544 iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -170540,8 +171304,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+30287, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 15947 + zVector = rbuMPrintf(tls, p, ts+30382, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 15961 goto __15 __15: iCol++ @@ -170552,7 +171316,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+30294, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+30389, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -170579,13 +171343,13 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) var zWhere uintptr = uintptr(0) var nBind int32 = 0 - var zCom uintptr = ts + 1524 - var zAnd uintptr = ts + 1524 + var zCom uintptr = ts + 1544 + var zAnd uintptr = ts + 1544 *(*uintptr)(unsafe.Pointer(bp + 200)) = uintptr(0) if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+29919, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -170597,9 +171361,9 @@ 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)), 0) - zRet = Xsqlite3_mprintf(tls, ts+30306, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+30401, 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 + zType = ts + 1544 } else { if iCid < 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { @@ -170609,37 +171373,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 + 30147 + zCol = ts + 30242 } else { - zCol = ts + 29877 + zCol = ts + 29972 } - zType = ts + 1089 + zType = ts + 1109 } 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+30328, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+30423, 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 + 30064 + return ts + 30159 } - return ts + 1524 + return ts + 1544 }() - zImpPK = Xsqlite3_mprintf(tls, ts+30348, + zImpPK = Xsqlite3_mprintf(tls, ts+30443, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+30369, + zImpCols = Xsqlite3_mprintf(tls, ts+30464, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+30402, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+30497, 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 + 15947 - zAnd = ts + 22738 + zCom = ts + 15961 + zAnd = ts + 22833 nBind++ } @@ -170673,16 +171437,16 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1524 + var zS uintptr = ts + 1544 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+30426, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+30521, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+30438, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+30533, libc.VaList(bp+32, zList, zS)) } - zS = ts + 15947 + zS = ts + 15961 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -170690,7 +171454,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+30447, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+30542, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -170702,27 +171466,27 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { 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+30462, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+30557, 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 zSep uintptr = ts + 1544 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+30476, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 22738 + zList = rbuMPrintf(tls, p, ts+30571, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 22833 } } zList = rbuMPrintf(tls, p, - ts+30488, libc.VaList(bp+40, zList)) + ts+30583, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+30538, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 22738 + zList = rbuMPrintf(tls, p, ts+30633, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 22833 } } } @@ -170731,7 +171495,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { func rbuBadControlError(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30551, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30646, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -170745,21 +171509,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+30538, + zList = rbuMPrintf(tls, p, ts+30633, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 15947 + zSep = ts + 15961 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+30577, + zList = rbuMPrintf(tls, p, ts+30672, 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 + 15947 + zSep = ts + 15961 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+30607, + zList = rbuMPrintf(tls, p, ts+30702, 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 + 15947 + zSep = ts + 15961 } } } @@ -170794,19 +171558,19 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 30644 + var zSep uintptr = ts + 30739 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+29796, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29891, 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)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+17450) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+17497) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+29919, libc.VaList(bp+8, zIdx))) } break } @@ -170818,15 +171582,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 30064 + zDesc = ts + 30159 } else { - zDesc = ts + 1524 + zDesc = ts + 1544 } - z = rbuMPrintf(tls, p, ts+30657, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 15947 + z = rbuMPrintf(tls, p, ts+30752, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 15961 } } - z = rbuMPrintf(tls, p, ts+30668, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+30763, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -170841,12 +171605,12 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 168)) = uintptr(0) var zIdx uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) - var zComma uintptr = ts + 1524 + var zComma uintptr = ts + 1544 var zCols uintptr = uintptr(0) var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+30672) + ts+30767) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -170855,7 +171619,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+29824, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+29919, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -170865,25 +171629,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 4) - zCols = rbuMPrintf(tls, p, ts+30722, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+30817, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+30744, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+30839, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 30064 + return ts + 30159 } - return ts + 1524 + return ts + 1544 }())) - zComma = ts + 15947 + zComma = ts + 15961 } } - zCols = rbuMPrintf(tls, p, ts+30754, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+30849, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30769, + ts+30864, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 0)) } } @@ -170893,50 +171657,50 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { 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 + 1524 + var zComma uintptr = ts + 1544 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1524 + var zPk uintptr = ts + 1544 var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, (*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 { - zPk = ts + 30831 + zPk = ts + 30926 } - zSql = rbuMPrintf(tls, p, ts+30844, + zSql = rbuMPrintf(tls, p, ts+30939, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 30871 + return ts + 30966 } - return ts + 1524 + return ts + 1544 }())) - zComma = ts + 15947 + zComma = ts + 15961 } 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+30881, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+30976, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30888, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30983, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 30920 + return ts + 31015 } - return ts + 1524 + return ts + 1544 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 0)) } } @@ -170949,7 +171713,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+30935, + ts+31030, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -170986,7 +171750,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30992) + ts+31087) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -171091,7 +171855,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+31058, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+31153, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -171111,24 +171875,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+608, bp+616, bp+624) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31078, + ts+31173, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 608)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624)) 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+31143, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+31238, libc.VaList(bp+128, zTbl, zBind))) } 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+31179, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+31274, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -171144,7 +171908,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+31213, + ts+31308, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -171152,31 +171916,31 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 31274 + return ts + 31369 } - return ts + 31278 + return ts + 31373 }() } - return ts + 1524 + return ts + 1544 }(), 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+31284, + ts+31379, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+31345, + ts+31440, 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 + 31274 + return ts + 31369 } - return ts + 31278 + return ts + 31373 }(), zCollist, zLimit)) } @@ -171201,8 +171965,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 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+7730) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+7726) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+7744) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+7740) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -171211,52 +171975,52 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1524 + return ts + 1544 } - return ts + 31504 + return ts + 31599 }() 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+31513, + ts+31608, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 31549 + return ts + 31644 } - return ts + 1524 + return ts + 1544 }(), zBindings))) } 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+31559, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+31654, 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 + var zRbuRowid uintptr = ts + 1544 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 31587 + zRbuRowid = ts + 31682 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31599, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+31694, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 31675 + return ts + 31770 } - return ts + 1524 + return ts + 1544 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31692, + ts+31787, 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+31991, + ts+32086, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -171264,14 +172028,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1524 + var zRbuRowid uintptr = ts + 1544 var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 32090 + zRbuRowid = ts + 32185 } else { - zRbuRowid = ts + 32100 + zRbuRowid = ts + 32195 } } @@ -171284,35 +172048,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+30147, 0) + zOrder = rbuMPrintf(tls, p, ts+30242, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15947, ts+1524) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1544, ts+15961, ts+1544) } } 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+32111, + ts+32206, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32159 + return ts + 32254 } - return ts + 1524 + return ts + 1544 }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if zOrder != 0 { - return ts + 21024 + return ts + 21119 } - return ts + 1524 + return ts + 1544 }(), zOrder, zLimit))) } @@ -171375,12 +172139,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1524 + var zPrefix uintptr = ts + 1544 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 31504 + zPrefix = ts + 31599 } - zUpdate = Xsqlite3_mprintf(tls, ts+32165, + zUpdate = Xsqlite3_mprintf(tls, ts+32260, 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) @@ -171407,7 +172171,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) } @@ -171439,7 +172203,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 16)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+32195, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+32290, 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)), 0) { case RBU_STATE_STAGE: @@ -171509,28 +172273,28 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*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+7719, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733, 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+7719) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+32225, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+32320, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32252, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+14805, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32348, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+14819, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+7719, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+7733, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32270, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32366, 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+7719, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -171563,11 +172327,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+32336, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32432, 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+25410, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+25505, (*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)))) == '?' { @@ -171579,16 +172343,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+32368, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7719), + zTarget = Xsqlite3_mprintf(tls, ts+32464, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733), func() uintptr { if zExtra == uintptr(0) { - return ts + 1524 + return ts + 1544 } - return ts + 32400 + return ts + 32496 }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1524 + return ts + 1544 } return zExtra }())) @@ -171604,37 +172368,37 @@ 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+32402, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32498, -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+32417, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+32513, 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+32434, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32530, -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+7719, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32450, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32546, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733, 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+32478, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32574, 0) } } @@ -171663,14 +172427,14 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { 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+32450, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32546, uintptr(0), uintptr(0), uintptr(0)) } } 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+32496, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32592, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -171779,7 +172543,7 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+7719, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+7733, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -171796,23 +172560,23 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+32531, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+32627, 0) } func rbuMoveOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7719) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7733) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7719) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7733) } - zOal = Xsqlite3_mprintf(tls, ts+32556, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+32563, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+32652, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+32659, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -171833,12 +172597,9 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { } 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 - }() + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3rbu)(unsafe.Pointer(p)).FxRename})).f(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FpRenameArg, zOal, zWal) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || @@ -171932,7 +172693,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { (*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+25048, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+25143, 0) return } @@ -172025,7 +172786,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+32570) + ts+32666) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) @@ -172033,7 +172794,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32592, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32688, libc.VaList(bp, iCookie+1)) } } } @@ -172054,7 +172815,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+32619, + ts+32715, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -172084,9 +172845,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+32777, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+32873, 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+32792, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32888, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -172100,10 +172861,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32812, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32908, 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+32837) + ts+32933) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -172117,12 +172878,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32945) + ts+33041) } 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+33010) + ts+33106) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -172134,7 +172895,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33054, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33150, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -172154,15 +172915,15 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+18556) - rbuCopyPragma(tls, p, ts+17646) + rbuCopyPragma(tls, p, ts+18603) + rbuCopyPragma(tls, p, ts+17693) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { 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+33079, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+33175, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -172186,10 +172947,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15865, 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15865, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -172284,7 +173045,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33107, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33203, 0) } if rc == SQLITE_OK { @@ -172300,7 +173061,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+32556, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+32652, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -172316,7 +173077,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+33132, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+33228, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) (*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) @@ -172350,7 +173111,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+33143, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+33239, 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)), -1) } else { @@ -172380,13 +173141,13 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+33215, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+33311, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+33229) + ts+33325) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -172397,7 +173158,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { 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+33286) + ts+33382) 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)), 0) @@ -172427,10 +173188,11 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var pState uintptr = uintptr(0) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + Xsqlite3rbu_rename_handler(tls, p, uintptr(0), uintptr(0)) rbuCreateVfs(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pCsr uintptr = p + 1*392 + var pCsr uintptr = p + 1*408 *(*int32)(unsafe.Pointer(bp + 16)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr @@ -172441,7 +173203,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) 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+4479, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+4493, libc.VaList(bp, zState)) } rbuOpenDatabase(tls, p, uintptr(0), bp+16) @@ -172470,7 +173232,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+33360, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33456, 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 @@ -172488,12 +173250,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) }() if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33392, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33488, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 33424 + return ts + 33520 } - return ts + 33431 + return ts + 33527 }())) } } @@ -172501,7 +173263,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+15836, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15850, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -172512,19 +173274,19 @@ 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+18270) - rbuCopyPragma(tls, p, ts+17661) + rbuCopyPragma(tls, p, ts+18317) + rbuCopyPragma(tls, p, ts+17708) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+33438, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+33534, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+7719, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+7733, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+33454, uintptr(0), uintptr(0), p+64) + db, ts+33550, uintptr(0), uintptr(0), p+64) } } @@ -172578,7 +173340,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+33478, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+33574, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -172605,7 +173367,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { 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+31504, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+31599, 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++ @@ -172622,7 +173384,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { var rc int32 if p != 0 { 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15865, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -172635,13 +173397,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { 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+15851, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15865, uintptr(0), uintptr(0), p+64) } rbuObjIterFinalize(tls, p+80) 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+33486, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+33582, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -172736,7 +173498,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15851, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15865, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172753,19 +173515,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15851, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15865, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 15836 + zBegin = ts + 15850 } else { - zBegin = ts + 33438 + zBegin = ts + 33534 } 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+33438, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33534, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172773,6 +173535,28 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { return rc } +func xDefaultRename(tls *libc.TLS, pArg uintptr, zOld uintptr, zNew uintptr) int32 { + var rc int32 = SQLITE_OK + if libc.Xrename(tls, zOld, zNew) != 0 { + rc = SQLITE_IOERR + } else { + rc = SQLITE_OK + } + return rc +} + +func Xsqlite3rbu_rename_handler(tls *libc.TLS, pRbu uintptr, pArg uintptr, xRename uintptr) { + if xRename != 0 { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = xRename + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = pArg + } else { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FxRename = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{xDefaultRename})) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRenameArg = uintptr(0) + } +} + func rbuUnlockShm(tls *libc.TLS, p uintptr) { 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 @@ -172791,7 +173575,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { 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 + *(*I64)(unsafe.Pointer(pRbu + 376)) += nDiff (*Rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { @@ -173086,7 +173870,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) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33513, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33609, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -173111,7 +173895,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+33536, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+33632, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -173156,7 +173940,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 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)<= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 215674) + rc = Xsqlite3CorruptError(tls, 217555) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -175967,7 +176751,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) 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, 215694) + rc = Xsqlite3CorruptError(tls, 217575) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -176009,7 +176793,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 215748) + rc = Xsqlite3CorruptError(tls, 217629) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -176070,7 +176854,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 215836) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) } } @@ -176144,13 +176928,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } 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 { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 215922)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217803)) } (*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, 215928)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217809)) } if paRec != 0 { @@ -176212,7 +176996,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint 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, 215972)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 217853)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -176224,6 +177008,15 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT } } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if int32(*(*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+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) == uintptr(0) { + Xsqlite3ValueFree(tls, *(*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)*8)) = uintptr(0) + } + } + } } return SQLITE_ROW @@ -176576,7 +177369,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 216321) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) goto finished_invert __6: ; @@ -176744,45 +177537,45 @@ 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+12624) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+12638) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 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+34123, bp+16) + sessionAppendStr(tls, bp, ts+34219, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+34136, bp+16) + sessionAppendStr(tls, bp, ts+34232, bp+16) 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+34142, bp+16) + sessionAppendStr(tls, bp, ts+34238, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 15947 + zSep = ts + 15961 } } - zSep = ts + 1524 - sessionAppendStr(tls, bp, ts+34071, bp+16) + zSep = ts + 1544 + sessionAppendStr(tls, bp, ts+34167, 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+34147, bp+16) + ts+34243, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+34079, bp+16) + sessionAppendStr(tls, bp, ts+34175, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 22738 + zSep = ts + 22833 } } @@ -176829,42 +177622,42 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 defer tls.Free(20) var i int32 - var zSep uintptr = ts + 1524 + var zSep uintptr = ts + 1544 *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+34222, bp+16) + sessionAppendStr(tls, bp, ts+34318, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+34071, bp+16) + sessionAppendStr(tls, bp, ts+34167, 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+34142, bp+16) + sessionAppendStr(tls, bp, ts+34238, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 22738 + zSep = ts + 22833 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+34240, bp+16) + sessionAppendStr(tls, bp, ts+34336, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+33783, bp+16) + sessionAppendStr(tls, bp, ts+33879, bp+16) - zSep = ts + 1524 + zSep = ts + 1544 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+34079, bp+16) + sessionAppendStr(tls, bp, ts+34175, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 34248 + zSep = ts + 34344 } } - sessionAppendStr(tls, bp, ts+6295, bp+16) + sessionAppendStr(tls, bp, ts+6309, bp+16) } if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -176877,7 +177670,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { return sessionSelectStmt(tls, - db, ts+7719, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+7733, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -176888,21 +177681,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+34253, bp+16) + sessionAppendStr(tls, bp, ts+34349, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+22744, bp+16) + sessionAppendStr(tls, bp, ts+22839, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+15947, bp+16) + sessionAppendStr(tls, bp, ts+15961, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+34271, bp+16) + sessionAppendStr(tls, bp, ts+34367, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+34282, bp+16) + sessionAppendStr(tls, bp, ts+34378, bp+16) } - sessionAppendStr(tls, bp, ts+6295, bp+16) + sessionAppendStr(tls, bp, ts+6309, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf, p+16, uintptr(0)) @@ -176916,14 +177709,14 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { } func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { - var rc int32 = sessionSelectRow(tls, db, ts+12624, p) + var rc int32 = sessionSelectRow(tls, db, ts+12638, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+34286) + ts+34382) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+34399) + ts+34495) } return rc } @@ -176951,7 +177744,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 216799) + rc = Xsqlite3CorruptError(tls, 218696) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -177204,7 +177997,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u 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+34543, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34639, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -177220,7 +178013,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+34564, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34660, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -177293,10 +178086,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).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+34583, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34679, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34609, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34705, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) @@ -177329,7 +178122,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin 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)) = Xsqlite3_mprintf(tls, ts+4479, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) + *(*uintptr)(unsafe.Pointer(bp + 200)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176)))) if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -177342,7 +178135,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+7719, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+7733, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -177355,19 +178148,19 @@ 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+34639, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+34735, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+34683, + ts+34779, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 184)))) } 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+34754, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+34850, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 184)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+12624) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+12638) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -177418,14 +178211,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+34814, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34910, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34844, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34940, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+34868, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+34844, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34964, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34940, uintptr(0), uintptr(0), uintptr(0)) } } @@ -177939,7 +178732,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec } libc.Xmemcpy(tls, pOut, a1, uint64(n1)) pOut += uintptr(n1) - } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF && *(*U8)(unsafe.Pointer(a1)) != 0 { bData = 1 libc.Xmemcpy(tls, pOut, a2, uint64(n2)) pOut += uintptr(n2) @@ -178673,7 +179466,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+34896, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34992, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -178961,7 +179754,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+34924, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+35020, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -179148,7 +179941,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+34955, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+35051, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -179216,7 +180009,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34962 + var zErr uintptr = ts + 35058 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -179375,7 +180168,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { if zRet != 0 { return zRet } - return ts + 1524 + return ts + 1544 } func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { @@ -179398,7 +180191,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 35012 + var zErr uintptr = ts + 35108 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -179722,13 +180515,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 35060, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35156, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 35068, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35164, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 35078, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35174, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -180139,7 +180932,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+7519, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+7533, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -180279,7 +181072,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+35083, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35179, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -180306,14 +181099,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+35090, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35186, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+35121, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+35217, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -180324,7 +181117,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35154, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35250, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -180337,7 +181130,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35191, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35287, 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))) @@ -180346,7 +181139,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+35200, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35296, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -180365,7 +181158,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35233, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35329, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -180380,14 +181173,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35267, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35363, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35275, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35371, 0) *(*int32)(unsafe.Pointer(bp + 40)) = 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+35307, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+35403, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -180395,9 +181188,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35313, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35409, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35327, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35423, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -180405,9 +181198,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+35365, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35461, 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+35376, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35472, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -180415,21 +181208,21 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+6413, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+6427, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 9296, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 18651}, - {FzName: ts + 35411, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 9310, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 18698}, + {FzName: ts + 35507, 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+35419, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35515, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35450, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35546, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -180476,15 +181269,15 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+23404) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+17562) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35478, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+23499) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+17609) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35574, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+35508) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+35604) { *(*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+35518, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -180501,13 +181294,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35549, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35645, 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+35554, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35650, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35561, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35657, libc.VaList(bp+16, i)) } } } @@ -180545,8 +181338,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+23404) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35569, 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+23499) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35665, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -180578,7 +181371,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+35598, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35694, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -180587,13 +181380,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 48)) } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 64)) } - return ts + 1524 + return ts + 1544 }(), pzErr) } else { @@ -180615,19 +181408,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 + 35267 + zTail = ts + 35363 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 35618 + zTail = ts + 35714 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+35626, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+35722, 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+17562, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+17609, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -180671,18 +181464,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35637, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35733, 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 + 1544 } - return ts + 15947 + return ts + 15961 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35653, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35749, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35660, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+23404)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35756, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+23499)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -180792,7 +181585,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+35686) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+35782) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -180802,7 +181595,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+35691) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35787) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -180812,7 +181605,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+35700) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35796) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -180825,7 +181618,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+35710) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35806) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -180835,7 +181628,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+35720) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35816) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -180851,7 +181644,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+23404) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+23499) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -180874,7 +181667,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 35732 + var zSelect uintptr = ts + 35828 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -180896,7 +181689,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)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+35764) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+35860) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -180910,7 +181703,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35772, + ts+35868, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -181008,7 +181801,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+35837, 0) + sqlite3Fts5ParseError(tls, pParse, ts+35933, 0) return FTS5_EOF } } @@ -181021,20 +181814,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+35857, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+35953, 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+35888, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35984, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35891, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35987, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31274, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31369, uint64(3)) == 0 { tok = FTS5_AND } break @@ -182801,9 +183594,9 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35895, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35991, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+34924, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+35020, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -182819,7 +183612,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+35900, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+35996, 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') @@ -182906,7 +183699,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+21741, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+21836, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -182987,7 +183780,7 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+35929, 0) + ts+36025, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -183157,12 +183950,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+35982, + ts+36078, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 36032 + return ts + 36128 } - return ts + 35895 + return ts + 35991 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -184105,7 +184898,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { 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+36039, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+36135, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -184184,7 +184977,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+36045, + ts+36141, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -184209,7 +185002,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+36096, + ts+36192, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -184232,7 +185025,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { 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+36145, + ts+36241, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -184471,7 +185264,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { 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+36185, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+36281, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -184544,13 +185337,13 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } @@ -185670,7 +186463,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { 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+36208, + ts+36304, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -186863,7 +187656,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1524 + return ts + 1544 }() Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) @@ -187029,10 +187822,10 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } } else { nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nPrefix)) } - sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, I64(nTerm)-I64(nPrefix)) sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) @@ -187060,7 +187853,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) 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) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(U64(I64(U64(iRowid)))-U64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid))) } (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) @@ -187136,7 +187929,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+36292, + ts+36388, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -187179,7 +187972,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { 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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*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 { @@ -187191,7 +187984,7 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { (*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)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, I64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)-int64(1)-I64(nDiff)-int64(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)) } @@ -187311,7 +188104,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } } else { nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) - sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, I64(nPos)) fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) @@ -187710,12 +188503,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta U64, pUnused uintptr, pBuf uintptr) { _ = pUnused - sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, I64(iDelta)) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta U64, pMulti uintptr, pBuf uintptr) { var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -187726,7 +188519,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu 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), iDelta) } { @@ -187907,7 +188700,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf 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)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), U64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid)-U64(iLastRowid)) } iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid } @@ -188031,7 +188824,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergeRowidLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendRowid})) } else { nMerge = FTS5_MERGE_NLIST - 1 @@ -188040,7 +188833,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{fts5MergePrefixLists})) xAppend = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) }{fts5AppendPoslist})) } @@ -188072,8 +188865,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } } @@ -188126,8 +188919,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } (*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)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16)), bp) + f func(*libc.TLS, uintptr, U64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, U64((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid)-U64(iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16)), bp) iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid } @@ -188197,7 +188990,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1524, 0) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1544, 0) fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -188213,13 +189006,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+36349, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+36445, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+26267, ts+36357, 0, pzErr) + pConfig, ts+26362, ts+36453, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+12764, - ts+36392, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+12778, + ts+36488, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -188472,7 +189265,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+36039, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+36135, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -188586,7 +189379,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+36436, + ts+36532, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { @@ -188745,6 +189538,10 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp))) var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + 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))) @@ -188752,7 +189549,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16)).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+36522) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+36618) 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)) @@ -189023,7 +189820,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+36527, 0) + ts+36623, 0) return SQLITE_ERROR } @@ -189054,7 +189851,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6313, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6327, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -189069,7 +189866,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6313, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+6327, 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) @@ -189383,7 +190180,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -189415,7 +190212,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -189447,25 +190244,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+36566, + ts+36662, 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 + 15947 + return ts + 15961 } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1524 + return ts + 1544 }(), func() uintptr { if bDesc != 0 { - return ts + 36621 + return ts + 36717 } - return ts + 36626 + return ts + 36722 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -189511,12 +190308,12 @@ 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+36630, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+36726, 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+6395, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+6409, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36636, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -189547,7 +190344,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+36664, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+36760, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -189578,7 +190375,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { 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+36674, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36770, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -189610,14 +190407,14 @@ 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+36695, libc.VaList(bp, z)) + ts+36791, 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 + 35078 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 35174 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -189673,7 +190470,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+36527, 0) + ts+36623, 0) return SQLITE_ERROR __1: ; @@ -189716,7 +190513,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1524 + zText = ts + 1544 __14: ; iCol = 0 @@ -189890,7 +190687,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+36728, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+36824, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -190011,7 +190808,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { 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+4479, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+4493, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } @@ -190035,28 +190832,28 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+36764, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+36860, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+36775, 0) + ts+36871, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+36855, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36951, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+36863, 0) + ts+36959, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+18250, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+18297, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+36919, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+37015, 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+36925, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+37021, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -190114,7 +190911,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { 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+18785, z) { + 0 == Xsqlite3_stricmp(tls, ts+18832, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -190127,12 +190924,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36941, + ts+37037, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 21642 + return ts + 21737 } - return ts + 36978 + return ts + 37074 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -190762,7 +191559,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+36990, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+37086, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -191006,7 +191803,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+37011, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37107, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -191025,7 +191822,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+37033, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37129, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -191072,7 +191869,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+37064) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+37160) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -191081,7 +191878,7 @@ func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+37077, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+37173, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -191095,7 +191892,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 37168, ts + 35267, ts + 26267, ts + 35618, ts + 12764, + ts + 37264, ts + 35363, ts + 26362, ts + 35714, ts + 12778, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -191119,7 +191916,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { (*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+37175, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+37271, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -191137,13 +191934,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+37175, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+37271, 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+37180, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+37276, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -191198,17 +191995,17 @@ 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)) = [11]uintptr{ - ts + 37195, - ts + 37263, - ts + 37332, - ts + 37365, - ts + 37404, - ts + 37444, - ts + 37483, - ts + 37524, - ts + 37563, - ts + 37605, - ts + 37645, + ts + 37291, + ts + 37359, + ts + 37428, + ts + 37461, + ts + 37500, + ts + 37540, + ts + 37579, + ts + 37620, + ts + 37659, + ts + 37701, + ts + 37741, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -191275,7 +192072,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*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+4479, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+4493, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -191310,18 +192107,18 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37668, + ts+37764, 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+37772, + ts+37868, 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+37810, + ts+37906, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -191333,7 +192130,7 @@ func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uin if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37848, + ts+37944, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -191345,14 +192142,14 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+26267, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+12764, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+37168, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+26362, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+12778, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+37264, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+35618, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35714, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+35267, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35363, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -191364,17 +192161,17 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37890, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37986, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 30920 + return ts + 31015 } - return ts + 1524 + return ts + 1544 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+37920, + ts+38016, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -191411,27 +192208,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37964, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+38060, 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+37987, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+38083, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+35267, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+35363, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35618, ts+37993, 0, pzErr) + pConfig, ts+35714, ts+38089, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+37168, ts+38025, 1, pzErr) + pConfig, ts+37264, ts+38121, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35764, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35860, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -191637,12 +192434,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+38042, + ts+38138, 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+38092, + ts+38188, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191650,7 +192447,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35764, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35860, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -191826,7 +192623,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+38121, + zSql = Xsqlite3_mprintf(tls, ts+38217, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -192008,14 +192805,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+35267, bp+48) + rc = fts5StorageCount(tls, p, ts+35363, 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)) = int64(0) - rc = fts5StorageCount(tls, p, ts+35618, bp+56) + rc = fts5StorageCount(tls, p, ts+35714, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -192210,9 +193007,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+38153) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38249) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38164) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38260) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -192427,7 +193224,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 + 38175 + var zCat uintptr = ts + 38271 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -192439,7 +193236,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38184) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38280) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -192450,18 +193247,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+38195) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38291) { 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+38153) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38249) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38164) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38260) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38184) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38280) { } else { rc = SQLITE_ERROR } @@ -192737,7 +193534,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)) = uintptr(0) - var zBase uintptr = ts + 38213 + var zBase uintptr = ts + 38309 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192879,7 +193676,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38223, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38319, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192887,11 +193684,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38226, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38322, 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+38231, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38327, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192899,7 +193696,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38236, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38332, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192907,7 +193704,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38239, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38335, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192915,11 +193712,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38242, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38338, 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+38247, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38343, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192927,19 +193724,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38252, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38348, 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+38256, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38352, 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+38262, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38358, 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+38267, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38363, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192947,11 +193744,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38271, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38367, 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+38275, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38371, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192959,7 +193756,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38278, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38374, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192967,11 +193764,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38282, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38378, 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+38286, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38382, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192979,7 +193776,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38290, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38386, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192987,7 +193784,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38294, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38390, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192995,7 +193792,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38298, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38394, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193011,24 +193808,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38302, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38282, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38398, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38305, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38308, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38401, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38404, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38312, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38298, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38408, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38394, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -193043,137 +193840,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38315, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38411, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38282, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38323, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38419, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38330, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38426, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38335, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38431, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38231, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38327, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38340, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38436, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38226, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38322, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38345, 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+38298, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38394, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38350, 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 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+16774, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+16821, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38355, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38451, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38308, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38404, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38359, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38455, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38364, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38460, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38267, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38363, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38370, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38466, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38374, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38470, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38376, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38472, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38290, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38386, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38382, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38478, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38298, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38394, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38390, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38486, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38282, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38396, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38492, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38282, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38378, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38401, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38497, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38407, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38503, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38294, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38390, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38415, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38511, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38423, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38519, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38427, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38523, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38290, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38386, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38435, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38531, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38441, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38537, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38294, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38390, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38447, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38543, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38308, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38404, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -193188,16 +193985,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38454, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38550, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38239, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38335, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38459, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38555, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -193205,21 +194002,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38464, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38560, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38239, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38335, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38470, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38566, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38239, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38335, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38423, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38519, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193227,7 +194024,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38476, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38572, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -193235,9 +194032,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38482, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38578, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38223, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38319, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -193252,12 +194049,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { 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+38488, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38584, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38492, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38588, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38495, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38591, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -193266,7 +194063,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38498, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38594, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -193422,7 +194219,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+38502) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38598) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193602,22 +194399,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 38213, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38309, 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 + 38517, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38613, 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 + 38523, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38619, 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 + 38530, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38626, 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 @@ -194760,14 +195557,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+38538) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+38634) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+38542) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+38638) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+38546) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+38642) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38555, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38651, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -194793,19 +195590,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8)) = [3]uintptr{ - ts + 38589, - ts + 38629, - ts + 38664, + ts + 38685, + ts + 38725, + ts + 38760, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+24556, *(*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+24651, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38707, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38803, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -194938,11 +195735,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+38740, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+38836, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+38771, + ts+38867, 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)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -194966,7 +195763,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+38822, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+38918, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -195250,7 +196047,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1524 + zCopy = ts + 1544 } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -195361,7 +196158,7 @@ func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+38848, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+38944, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195383,7 +196180,7 @@ var fts5Vocab = Sqlite3_module{ // ************* End of stmt.c *********************************************** // Return the source-id for this library func Xsqlite3_sourceid(tls *libc.TLS) uintptr { - return ts + 38858 + return ts + 38954 } func init() { @@ -195948,7 +196745,7 @@ func init() { *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbUnlock *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch @@ -196221,16 +197018,16 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter + *(*func(*libc.TLS, Sqlite3_filename, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean + *(*func(*libc.TLS, Sqlite3_filename, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 + *(*func(*libc.TLS, Sqlite3_filename, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension @@ -196287,12 +197084,12 @@ func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename + *(*func(*libc.TLS, Sqlite3_filename, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal + *(*func(*libc.TLS, Sqlite3_filename) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) Sqlite3_filename)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename + *(*func(*libc.TLS, Sqlite3_filename))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 @@ -196307,6 +197104,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2096)) = Xsqlite3_deserialize *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2104)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2112)) = Xsqlite3_db_name + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2120)) = Xsqlite3_value_encoding *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit @@ -196434,5 +197232,5 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 160)) = winNextSystemCall } -var ts1 = "3.39.4\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsNullOrType\x00IfNullRow\x00Not\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\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\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\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-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309\x00" +var ts1 = "3.40.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=msvc-1900\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\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.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\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\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\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\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\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\"\x00coalesce\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\x00HAVING clause on a non-aggregate query\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\x00unsafe use of virtual table \"%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\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\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT 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 join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\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\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%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\x00trigger \"%s\" may not write to shadow 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\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\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.%.*s\x00[%d]\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\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 1bef9f475a..61826cd0f7 100644 --- a/vendor/modernc.org/sqlite/sqlite.go +++ b/vendor/modernc.org/sqlite/sqlite.go @@ -657,14 +657,14 @@ type tx struct { c *conn } -func newTx(c *conn) (*tx, error) { +func newTx(c *conn, opts driver.TxOptions) (*tx, error) { r := &tx{c: c} - var sql string - if c.beginMode != "" { + + sql := "begin" + if !opts.ReadOnly && c.beginMode != "" { sql = "begin " + c.beginMode - } else { - sql = "begin" } + if err := r.exec(context.Background(), sql); err != nil { return nil, err } @@ -752,7 +752,7 @@ type conn struct { } func newConn(dsn string) (*conn, error) { - var query string + var query, vfsName string // Parse the query parameters from the dsn and them from the dsn if not prefixed by file: // https://github.com/mattn/go-sqlite3/blob/3392062c729d77820afc1f5cae3427f0de39e954/sqlite3.go#L1046 @@ -760,6 +760,12 @@ func newConn(dsn string) (*conn, error) { pos := strings.IndexRune(dsn, '?') if pos >= 1 { query = dsn[pos+1:] + var err error + vfsName, err = getVFSName(query) + if err != nil { + return nil, err + } + if !strings.HasPrefix(dsn, "file:") { dsn = dsn[:pos] } @@ -768,6 +774,7 @@ func newConn(dsn string) (*conn, error) { c := &conn{tls: libc.NewTLS()} db, err := c.openV2( dsn, + vfsName, sqlite3.SQLITE_OPEN_READWRITE|sqlite3.SQLITE_OPEN_CREATE| sqlite3.SQLITE_OPEN_FULLMUTEX| sqlite3.SQLITE_OPEN_URI, @@ -790,6 +797,23 @@ func newConn(dsn string) (*conn, error) { return c, nil } +func getVFSName(query string) (r string, err error) { + q, err := url.ParseQuery(query) + if err != nil { + return "", err + } + + for _, v := range q["vfs"] { + if r != "" && r != v { + return "", fmt.Errorf("conflicting vfs query parameters: %v", q["vfs"]) + } + + r = v + } + + return r, nil +} + func applyQueryParams(c *conn, query string) error { q, err := url.ParseQuery(query) if err != nil { @@ -810,7 +834,6 @@ func applyQueryParams(c *conn, query string) error { return fmt.Errorf("unknown _time_format %q", v) } c.writeTimeFormat = f - return nil } if v := q.Get("_txlock"); v != "" { @@ -1225,8 +1248,8 @@ func (c *conn) extendedResultCodes(on bool) error { // int flags, /* Flags */ // const char *zVfs /* Name of VFS module to use */ // ); -func (c *conn) openV2(name string, flags int32) (uintptr, error) { - var p, s uintptr +func (c *conn) openV2(name, vfsName string, flags int32) (uintptr, error) { + var p, s, vfs uintptr defer func() { if p != 0 { @@ -1235,6 +1258,9 @@ func (c *conn) openV2(name string, flags int32) (uintptr, error) { if s != 0 { c.free(s) } + if vfs != 0 { + c.free(vfs) + } }() p, err := c.malloc(int(ptrSize)) @@ -1246,7 +1272,13 @@ func (c *conn) openV2(name string, flags int32) (uintptr, error) { return 0, err } - if rc := sqlite3.Xsqlite3_open_v2(c.tls, s, p, flags, 0); rc != sqlite3.SQLITE_OK { + if vfsName != "" { + if vfs, err = libc.CString(vfsName); err != nil { + return 0, err + } + } + + if rc := sqlite3.Xsqlite3_open_v2(c.tls, s, p, flags, vfs); rc != sqlite3.SQLITE_OK { return 0, c.errstr(rc) } @@ -1292,7 +1324,7 @@ func (c *conn) Begin() (driver.Tx, error) { } func (c *conn) begin(ctx context.Context, opts driver.TxOptions) (t driver.Tx, err error) { - return newTx(c) + return newTx(c, opts) } // Close invalidates and potentially stops any current prepared statements and diff --git a/vendor/modules.txt b/vendor/modules.txt index 51193accde..4653ba7a06 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -170,6 +170,9 @@ github.com/desertbit/readline ## explicit github.com/dlclark/regexp2 github.com/dlclark/regexp2/syntax +# github.com/dustin/go-humanize v1.0.0 +## explicit +github.com/dustin/go-humanize # github.com/fatih/color v1.14.1 ## explicit; go 1.17 github.com/fatih/color @@ -681,10 +684,10 @@ lukechampine.com/uint128 # modernc.org/cc/v3 v3.40.0 ## explicit; go 1.17 modernc.org/cc/v3 -# modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8 +# modernc.org/ccgo/v3 v3.16.13 ## explicit; go 1.17 modernc.org/ccgo/v3/lib -# modernc.org/libc v1.21.2 +# modernc.org/libc v1.22.2 ## explicit; go 1.17 modernc.org/libc modernc.org/libc/errno @@ -721,7 +724,7 @@ modernc.org/memory # modernc.org/opt v0.1.3 ## explicit; go 1.13 modernc.org/opt -# modernc.org/sqlite v1.19.3 +# modernc.org/sqlite v1.20.4 ## explicit; go 1.17 modernc.org/sqlite modernc.org/sqlite/lib